|
################################################################## Appearance3DChooser v1.1 Copyright (C) 2009 Frederic Roudaut This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. ################################################################### |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
com.appearance3Dchooser.Appearance3DChooserPanel
public class Appearance3DChooserPanel
Appearance3DChooserPanel Class.
A basic class with a Panel for updating your objects appearances. It takes into account following attributes :
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JPanel |
---|
javax.swing.JPanel.AccessibleJPanel |
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
javax.swing.JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class java.awt.Container |
---|
java.awt.Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
Field Summary | |
---|---|
static java.lang.String |
AMBIENT
|
protected float[] |
ambientColor
|
protected javax.swing.JPanel |
ambientColorPanel
|
protected com.colorpicker.swing.ColorPicker |
ambientColorPicker
|
protected javax.swing.JCheckBox |
checkBoxLighting
|
protected int |
colorTarget
|
static java.lang.String |
COLORTARGET
|
static int |
COLORTARGET_AMBIENT
|
static int |
COLORTARGET_AMBIENT_AND_DIFFUSE
|
static int |
COLORTARGET_DIFFUSE
|
static int |
COLORTARGET_EMISSIVE
|
static int |
COLORTARGET_SPECULAR
|
protected java.net.URL |
DefaultTextureName
|
static java.lang.String |
DIFFUSE
|
protected float[] |
diffuseColor
|
protected javax.swing.JPanel |
diffuseColorPanel
|
protected com.colorpicker.swing.ColorPicker |
diffuseColorPicker
|
static java.lang.String |
EMISSIVE
|
protected float[] |
emissiveColor
|
protected javax.swing.JPanel |
emissiveColorPanel
|
protected com.colorpicker.swing.ColorPicker |
emissiveColorPicker
|
protected boolean |
isTextureSet
|
protected boolean |
lighting
|
static java.lang.String |
LIGHTING
|
protected javax.swing.JComboBox |
listColorTarget
|
protected javax.swing.JComboBox |
listTransparencyDstBlendFunction
|
protected javax.swing.JComboBox |
listTransparencyMode
|
protected javax.swing.JComboBox |
listTransparencySrcBlendFunction
|
protected javax.swing.JTabbedPane |
mainTabbedPane
|
protected javax.swing.JTabbedPane |
MaterialTabPane
|
protected javax.swing.JPanel |
miscellaneousPanel
|
protected RenderingViewPanel |
renderingViewPanel
|
private static long |
serialVersionUID
|
protected float |
shininess
|
static java.lang.String |
SHININESS
|
protected boolean |
showMaterial
|
protected boolean |
showRendering
|
protected boolean |
showTexture
|
protected boolean |
showTransparency
|
protected javax.swing.JSlider |
sliderShininess
|
protected javax.swing.JSlider |
sliderTransparency
|
static java.lang.String |
SPECULAR
|
protected float[] |
specularColor
|
protected javax.swing.JPanel |
specularColorPanel
|
protected com.colorpicker.swing.ColorPicker |
specularColorPicker
|
protected javax.swing.JSpinner |
spinnerShininess
|
protected javax.swing.JSpinner |
spinnerTransparency
|
static java.lang.String |
TEXTURE_BLEND
|
static java.lang.String |
TEXTURE_COMBINE_ALPHA_FUNCTION
|
static java.lang.String |
TEXTURE_COMBINE_ALPHA_MODE
|
static java.lang.String |
TEXTURE_COMBINE_ALPHA_SCALE
|
static java.lang.String |
TEXTURE_COMBINE_ALPHA_SOURCE
|
static java.lang.String |
TEXTURE_COMBINE_RGB_FUNCTION
|
static java.lang.String |
TEXTURE_COMBINE_RGB_MODE
|
static java.lang.String |
TEXTURE_COMBINE_RGB_SCALE
|
static java.lang.String |
TEXTURE_COMBINE_RGB_SOURCE
|
static java.lang.String |
TEXTURE_FILE
|
static java.lang.String |
TEXTURE_MODE
|
static java.lang.String |
TEXTURE_PERSPECTIVE_CORRECTION_MODE
|
static java.lang.String |
TEXTURE_TRANSFORM
|
static java.lang.String |
TEXTURE_USE
|
protected float[] |
textureBlendColor
|
protected int[] |
textureCombineAlphaFunction
|
protected int |
textureCombineAlphaMode
|
protected int |
textureCombineAlphaScale
|
protected int[] |
textureCombineAlphaSource
|
protected int[] |
textureCombineRGBFunction
|
protected int |
textureCombineRGBMode
|
protected int |
textureCombineRGBScale
|
protected int[] |
textureCombineRGBSource
|
protected int |
textureMode
|
protected java.net.URL |
textureName
|
protected TexturePane |
texturePane
|
protected int |
texturePerspectiveCorrectionMode
|
protected javax.media.j3d.Transform3D |
textureTransform
|
protected float |
transparency
|
static java.lang.String |
TRANSPARENCY
|
static java.lang.String |
TRANSPARENCY_DST_BLEND_FUNCTION
|
static int |
TRANSPARENCY_DST_BLEND_ONE
|
static int |
TRANSPARENCY_DST_BLEND_ONE_MINUS_SRC_ALPHA
|
static int |
TRANSPARENCY_DST_BLEND_ONE_MINUS_SRC_COLOR
|
static int |
TRANSPARENCY_DST_BLEND_SRC_ALPHA
|
static int |
TRANSPARENCY_DST_BLEND_SRC_COLOR
|
static int |
TRANSPARENCY_DST_BLEND_ZERO
|
static java.lang.String |
TRANSPARENCY_MODE
|
static int |
TRANSPARENCY_MODE_BLENDED
|
static int |
TRANSPARENCY_MODE_FASTEST
|
static int |
TRANSPARENCY_MODE_NICEST
|
static int |
TRANSPARENCY_MODE_NONE
|
static int |
TRANSPARENCY_MODE_SCREEN_DOOR
|
static int |
TRANSPARENCY_SRC_BLEND_DST_COLOR
|
static java.lang.String |
TRANSPARENCY_SRC_BLEND_FUNCTION
|
static int |
TRANSPARENCY_SRC_BLEND_ONE
|
static int |
TRANSPARENCY_SRC_BLEND_ONE_MINUS_DST_COLOR
|
static int |
TRANSPARENCY_SRC_BLEND_ONE_MINUS_SRC_ALPHA
|
static int |
TRANSPARENCY_SRC_BLEND_SRC_ALPHA
|
static int |
TRANSPARENCY_SRC_BLEND_ZERO
|
protected int |
transparencyDstBlendFunction
|
protected int |
transparencyMode
|
protected javax.swing.JPanel |
transparencyPanel
|
protected int |
transparencySrcBlendFunction
|
Fields inherited from class javax.swing.JComponent |
---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
Fields inherited from class java.awt.Component |
---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
Appearance3DChooserPanel(boolean showMaterial,
boolean showTransparency,
boolean showTexture,
boolean showRendering)
Main Appearance3DChooserPanel constructor. |
Method Summary | |
---|---|
void |
actionPerformed(java.awt.event.ActionEvent e)
Called when an action is performed on the Transparency Pane mainly. |
static int |
convertExternTransparencyDstBlendFunction(int f)
Convert a Transparency Destination Blend Function from Internal representation to TransparencyAttributes representation. |
static int |
convertExternTransparencyMode(int m)
Convert a Transparency Mode from Internal representation to TransparencyAttributes representation. |
static int |
convertExternTransparencySrcBlendFunction(int f)
Convert a Transparency Source Blend Function from Internal representation to TransparencyAttributes representation. |
static int |
convertInternTransparencyDstBlendFunction(int f)
Convert a Transparency Destination Blend Function from TransparencyAttributes representation to Internal representation. |
static int |
convertInternTransparencyMode(int m)
Convert a Transparency Mode from TransparencyAttributes representation to Internal representation. |
static int |
convertInternTransparencySrcBlendFunction(int f)
Convert a Transparency Source Blend Function from TransparencyAttributes representation to Internal representation. |
float[] |
getAmbientColor()
Return the Ambient Color. |
int |
getColorTarget()
Return the Color Target. |
float[] |
getDiffuseColor()
Return the Diffuse Color. |
float[] |
getEmissiveColor()
Return the Emissive Color. |
boolean |
getLighting()
Return the Lighting mode. |
float |
getShininess()
Return the Shininess. |
float[] |
getSpecularColor()
Return the Specular Color. |
float[] |
getTextureBlendColor()
Return the Texture Blend Color. |
int[] |
getTextureCombineAlphaFunction()
Return the Texture Combine Alpha Function. |
int |
getTextureCombineAlphaMode()
Return the Texture Combine Alpha Mode. |
int |
getTextureCombineAlphaScale()
Return the Texture Combine Alpha Scale. |
int[] |
getTextureCombineAlphaSource()
Return the Texture Combine Alpha Source. |
int[] |
getTextureCombineRGBFunction()
Return the Texture Combine RGB Function. |
int |
getTextureCombineRGBMode()
Return the Texture Combine RGB Mode. |
int |
getTextureCombineRGBScale()
Return the Texture Combine RGB Scale. |
int[] |
getTextureCombineRGBSource()
Return the Texture Combine RGB Source. |
java.net.URL |
getTextureFile()
Return the Texture File URL. |
int |
getTextureMode()
Return the Texture Mode. |
int |
getTexturePerspectiveCorrectionMode()
Return the Texture Perspective Correction Mode. |
javax.media.j3d.Transform3D |
getTextureTransform()
Return the Texture Transform. |
float |
getTextureTransformRotZ()
Return the Texture Transform Rotation on Z axis. |
float |
getTextureTransformScaleX()
Return the Texture Transform Scale on X axis. |
float |
getTextureTransformScaleY()
Return the Texture Transform Scale on Y axis. |
float |
getTextureTransformTranslatX()
Return the Texture Transform Translation on X axis. |
float |
getTextureTransformTranslatY()
Return the Texture Transform Translation on Y axis. |
float |
getTransparency()
Return the transparency value. |
int |
getTransparencyDstBlendFunction()
Return the transparency Destination Blend Function. |
int |
getTransparencyMode()
Return the transparency Mode. |
int |
getTransparencySrcBlendFunction()
Return the transparency Source Blend Function. |
boolean |
isTextureSet()
Return the Texture Setting. |
void |
itemStateChanged(java.awt.event.ItemEvent e)
Called when the Lighting checkbox in the Material Pane is clicked. |
static void |
main(java.lang.String[] args)
A Main Exemple. |
private void |
makeMaterialPane()
Create a Material Pane. |
private void |
makeRenderPane()
Create a Rendering Pane. |
private void |
makeTexturePane()
Create a Texture Pane. |
private void |
makeTransparencyPane()
Create a Transparency Pane. |
void |
setAmbientColor(float[] c)
Set the Ambient Color |
void |
setColorTarget(int c)
Set the Color Target. |
void |
setDefaultTextureFile(java.net.URL t)
Set the Default Texture File URL. |
void |
setDiffuseColor(float[] c)
Set the Diffuse Color |
void |
setEmissiveColor(float[] c)
Set the Emissive Color. |
void |
setLighting(boolean l)
Set the Lighting mode. |
void |
setShininess(float s)
Set the Shininess. |
void |
setSpecularColor(float[] c)
Set the Specular Color. |
void |
setTextureBlendColor(float[] c)
Set the Texture Blend Color. |
void |
setTextureCombineAlphaFunction(int[] m)
Set the Texture Combine Alpha Function. |
void |
setTextureCombineAlphaMode(int m)
Set the Texture Combine Alpha Mode. |
void |
setTextureCombineAlphaScale(int s)
Set the Texture Combine Alpha Scale. |
void |
setTextureCombineAlphaSource(int[] m)
Set the Texture Combine Alpha Source. |
void |
setTextureCombineRGBFunction(int[] m)
Set the Texture Combine RGB Function. |
void |
setTextureCombineRGBMode(int m)
Set the Texture Combine RGB Mode. |
void |
setTextureCombineRGBScale(int s)
Set the Texture Combine RGB Scale. |
void |
setTextureCombineRGBSource(int[] m)
Set the Texture Combine RGB Source |
void |
setTextureFile(java.net.URL t)
Set the Texture File URL. |
void |
setTextureMode(int m)
Set the Texture Mode. |
void |
setTexturePerspectiveCorrectionMode(int m)
Set the Texture Perspective Correction Mode. |
void |
setTextureTransform(javax.media.j3d.Transform3D t)
Set the Texture Transform. |
void |
setTextureTransformRotZ(float v)
Set the Texture Transform Rotation on Z axis. |
void |
setTextureTransformScaleX(float v)
Set the Texture Transform Scale on X axis. |
void |
setTextureTransformScaleY(float v)
Set the Texture Transform Scale on Y axis. |
void |
setTextureTransformTranslatX(float v)
Set the Texture Transform Translation on X axis. |
void |
setTextureTransformTranslatY(float v)
Set the Texture Transform Translation on Y axis. |
void |
setTextureUse(boolean b)
Set the Texture Setting. |
void |
setTransparency(float o)
Set the transparency value. |
void |
setTransparencyDstBlendFunction(int m)
Set the transparency Destination Blend Function. |
void |
setTransparencyMode(int m)
Set the transparency Mode. |
void |
setTransparencySrcBlendFunction(int m)
Set the transparency Source Blend Function. |
void |
stateChanged(javax.swing.event.ChangeEvent e)
Called when a state changes on the Transparency and the Material Pane mainly (ie a slider is used ...). |
private void |
updateAmbientColor(float[] c)
Internal update of the Ambient Color Parameters and fire of an associated property. |
private void |
updateColorTarget(int c)
Internal update of the Color Target Parameters and fire of an associated property. |
private void |
updateDiffuseColor(float[] c)
Internal update of the Diffuse Color Parameters and fire of an associated property. |
private void |
updateEmissiveColor(float[] c)
Internal update of the Emissive Color Parameters and fire of an associated property. |
private void |
updateIsTextureSet(boolean on)
Internal update of the Texture Setting Parameters and fire of an associated property. |
private void |
updateLighting(boolean l)
Internal update of the Lighting mode Parameters and fire of an associated property. |
private void |
updateShininess(float s)
Internal update of the Shininess Parameters and fire of an associated property. |
private void |
updateSpecularColor(float[] c)
|
private void |
updateTexture(java.net.URL t)
Internal update of the Texture File URL Parameters and fire of an associated property. |
private void |
updateTextureBlendColor(float[] c)
Internal update of the Texture Blend Color Parameters and fire of an associated property. |
private void |
updateTextureCombineAlphaFunction(int[] m)
Internal update of the Texture Combine Alpha Function Parameters and fire of an associated property. |
private void |
updateTextureCombineAlphaMode(int m)
Internal update of the Texture Combine Alpha Mode Parameters and fire of an associated property. |
private void |
updateTextureCombineAlphaScale(int m)
Internal update of the Texture Combine Alpha Scale Parameters and fire of an associated property. |
private void |
updateTextureCombineAlphaSource(int[] m)
Internal update of the Texture Combine Alpha Source Parameters and fire of an associated property. |
private void |
updateTextureCombineRGBFunction(int[] m)
Internal update of the Texture Combine RGB Function Parameters and fire of an associated property. |
private void |
updateTextureCombineRGBMode(int m)
Internal update of the Texture Combine RGB Mode Parameters and fire of an associated property. |
private void |
updateTextureCombineRGBScale(int m)
Internal update of the Texture Combine RGB Scale Parameters and fire of an associated property. |
private void |
updateTextureCombineRGBSource(int[] m)
Internal update of the Texture Combine RGB Source Parameters and fire of an associated property. |
protected void |
updateTextureMode(int m)
Internal update of the Texture Mode Parameters and fire of an associated property. |
protected void |
updateTexturePerspectiveCorrectionMode(int m)
|
private void |
updateTextureTransform(javax.media.j3d.Transform3D t)
Internal update of the Texture Transform Parameters and fire of an associated property. |
private void |
updateTransparency(float o)
Internal update of the transparency value Parameters and fire of an associated property. |
private void |
updateTransparencyDstBlendFunction(int f)
Internal update of the transparency Destination Blend Function Parameters and fire of an associated property. |
private void |
updateTransparencyMode(int m)
Internal update of the transparency Mode Parameters and fire of an associated property. |
private void |
updateTransparencySrcBlendFunction(int f)
Internal update of the transparency Source Blend Function Parameters and fire of an associated property. |
Methods inherited from class javax.swing.JPanel |
---|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
Methods inherited from class javax.swing.JComponent |
---|
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update |
Methods inherited from class java.awt.Container |
---|
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree |
Methods inherited from class java.awt.Component |
---|
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private static final long serialVersionUID
public static final java.lang.String SPECULAR
public static final java.lang.String AMBIENT
public static final java.lang.String EMISSIVE
public static final java.lang.String DIFFUSE
public static final java.lang.String COLORTARGET
public static final java.lang.String SHININESS
public static final java.lang.String LIGHTING
public static final java.lang.String TRANSPARENCY
public static final java.lang.String TRANSPARENCY_MODE
public static final java.lang.String TRANSPARENCY_SRC_BLEND_FUNCTION
public static final java.lang.String TRANSPARENCY_DST_BLEND_FUNCTION
public static final java.lang.String TEXTURE_FILE
public static final java.lang.String TEXTURE_USE
public static final java.lang.String TEXTURE_TRANSFORM
public static final java.lang.String TEXTURE_PERSPECTIVE_CORRECTION_MODE
public static final java.lang.String TEXTURE_MODE
public static final java.lang.String TEXTURE_BLEND
public static final java.lang.String TEXTURE_COMBINE_RGB_MODE
public static final java.lang.String TEXTURE_COMBINE_RGB_SOURCE
public static final java.lang.String TEXTURE_COMBINE_RGB_FUNCTION
public static final java.lang.String TEXTURE_COMBINE_RGB_SCALE
public static final java.lang.String TEXTURE_COMBINE_ALPHA_MODE
public static final java.lang.String TEXTURE_COMBINE_ALPHA_SOURCE
public static final java.lang.String TEXTURE_COMBINE_ALPHA_FUNCTION
public static final java.lang.String TEXTURE_COMBINE_ALPHA_SCALE
public static final int COLORTARGET_AMBIENT
public static final int COLORTARGET_EMISSIVE
public static final int COLORTARGET_DIFFUSE
public static final int COLORTARGET_SPECULAR
public static final int COLORTARGET_AMBIENT_AND_DIFFUSE
public static final int TRANSPARENCY_MODE_FASTEST
public static final int TRANSPARENCY_MODE_NICEST
public static final int TRANSPARENCY_MODE_BLENDED
public static final int TRANSPARENCY_MODE_SCREEN_DOOR
public static final int TRANSPARENCY_MODE_NONE
public static final int TRANSPARENCY_SRC_BLEND_ZERO
public static final int TRANSPARENCY_SRC_BLEND_ONE
public static final int TRANSPARENCY_SRC_BLEND_SRC_ALPHA
public static final int TRANSPARENCY_SRC_BLEND_ONE_MINUS_SRC_ALPHA
public static final int TRANSPARENCY_SRC_BLEND_DST_COLOR
public static final int TRANSPARENCY_SRC_BLEND_ONE_MINUS_DST_COLOR
public static final int TRANSPARENCY_DST_BLEND_ZERO
public static final int TRANSPARENCY_DST_BLEND_ONE
public static final int TRANSPARENCY_DST_BLEND_SRC_ALPHA
public static final int TRANSPARENCY_DST_BLEND_ONE_MINUS_SRC_ALPHA
public static final int TRANSPARENCY_DST_BLEND_SRC_COLOR
public static final int TRANSPARENCY_DST_BLEND_ONE_MINUS_SRC_COLOR
protected float[] ambientColor
protected float[] diffuseColor
protected float[] specularColor
protected float[] emissiveColor
protected float shininess
protected int colorTarget
protected boolean lighting
protected int transparencyMode
protected int transparencySrcBlendFunction
protected int transparencyDstBlendFunction
protected float transparency
protected java.net.URL DefaultTextureName
protected java.net.URL textureName
protected boolean isTextureSet
protected javax.media.j3d.Transform3D textureTransform
protected int texturePerspectiveCorrectionMode
protected int textureMode
protected float[] textureBlendColor
protected int[] textureCombineRGBSource
protected int[] textureCombineRGBFunction
protected int textureCombineRGBMode
protected int textureCombineRGBScale
protected int textureCombineAlphaMode
protected int[] textureCombineAlphaSource
protected int[] textureCombineAlphaFunction
protected int textureCombineAlphaScale
protected javax.swing.JTabbedPane mainTabbedPane
protected javax.swing.JTabbedPane MaterialTabPane
protected javax.swing.JPanel ambientColorPanel
protected javax.swing.JPanel diffuseColorPanel
protected javax.swing.JPanel specularColorPanel
protected javax.swing.JPanel emissiveColorPanel
protected javax.swing.JPanel miscellaneousPanel
protected javax.swing.JPanel transparencyPanel
protected TexturePane texturePane
protected RenderingViewPanel renderingViewPanel
protected com.colorpicker.swing.ColorPicker ambientColorPicker
protected com.colorpicker.swing.ColorPicker diffuseColorPicker
protected com.colorpicker.swing.ColorPicker emissiveColorPicker
protected com.colorpicker.swing.ColorPicker specularColorPicker
protected javax.swing.JComboBox listColorTarget
protected javax.swing.JComboBox listTransparencyMode
protected javax.swing.JComboBox listTransparencySrcBlendFunction
protected javax.swing.JComboBox listTransparencyDstBlendFunction
protected javax.swing.JSlider sliderShininess
protected javax.swing.JSpinner spinnerShininess
protected javax.swing.JCheckBox checkBoxLighting
protected javax.swing.JSlider sliderTransparency
protected javax.swing.JSpinner spinnerTransparency
protected boolean showMaterial
protected boolean showTransparency
protected boolean showTexture
protected boolean showRendering
Constructor Detail |
---|
public Appearance3DChooserPanel(boolean showMaterial, boolean showTransparency, boolean showTexture, boolean showRendering)
showMaterial
- set it to true if you want to see the Material Panel.showTransparency
- set it to true if you want to see the Transparency Panel.showTexture
- set it to true if you want to see the Texture Panel.showRendering
- set it to true if you want to see the Rendering Panel.Method Detail |
---|
private void makeRenderPane()
private void makeTexturePane()
private void makeTransparencyPane()
private void makeMaterialPane()
public void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed
in interface java.awt.event.ActionListener
e
- the related action.public void stateChanged(javax.swing.event.ChangeEvent e)
stateChanged
in interface javax.swing.event.ChangeListener
e
- the related event.public void itemStateChanged(java.awt.event.ItemEvent e)
itemStateChanged
in interface java.awt.event.ItemListener
e
- the related event.public float getTransparency()
public void setTransparency(float o)
o
- the amount of transparency to be applied to the Appearance component object.
The transparency values are in the range [0.0, 1.0], with 0.0 being fully opaque and 1.0 being fully transparent.private void updateTransparency(float o)
o
- the amount of transparency to be applied to the Appearance component object.
The transparency values are in the range [0.0, 1.0], with 0.0 being fully opaque and 1.0 being fully transparent.public int getTransparencyMode()
public void setTransparencyMode(int m)
m
- the transparency Mode between TransparencyAttributes.FASTEST, TransparencyAttributes.NICEST, TransparencyAttributes.SCREEN_DOOR, TransparencyAttributes.BLENDED, TransparencyAttributes.NONEprivate void updateTransparencyMode(int m)
m
- the transparency Mode between TransparencyAttributes.FASTEST, TransparencyAttributes.NICEST, TransparencyAttributes.SCREEN_DOOR, TransparencyAttributes.BLENDED, TransparencyAttributes.NONEpublic int getTransparencySrcBlendFunction()
public void setTransparencySrcBlendFunction(int m)
m
- the transparency Source Blend Function between TransparencyAttributes.BLEND_ZERO, TransparencyAttributes.BLEND_ONE, TransparencyAttributes.BLEND_SRC_ALPHA, TransparencyAttributes.BLEND_ONE_MINUS_SRC_ALPHA,
TransparencyAttributes.BLEND_DST_COLOR, TransparencyAttributes.BLEND_ONE_MINUS_DST_COLOR.private void updateTransparencySrcBlendFunction(int f)
f
- the transparency Source Blend Function between TransparencyAttributes.BLEND_ZERO, TransparencyAttributes.BLEND_ONE, TransparencyAttributes.BLEND_SRC_ALPHA, TransparencyAttributes.BLEND_ONE_MINUS_SRC_ALPHA,
TransparencyAttributes.BLEND_DST_COLOR, TransparencyAttributes.BLEND_ONE_MINUS_DST_COLOR.public int getTransparencyDstBlendFunction()
public void setTransparencyDstBlendFunction(int m)
m
- the transparency Destination Blend Function between TransparencyAttributes.BLEND_ZERO, TransparencyAttributes.BLEND_ONE, TransparencyAttributes.BLEND_SRC_ALPHA, TransparencyAttributes.BLEND_ONE_MINUS_SRC_ALPHA,
TransparencyAttributes.BLEND_SRC_COLOR, TransparencyAttributes.BLEND_ONE_MINUS_SRC_COLOR.private void updateTransparencyDstBlendFunction(int f)
f
- the transparency Destination Blend Function between TransparencyAttributes.BLEND_ZERO, TransparencyAttributes.BLEND_ONE, TransparencyAttributes.BLEND_SRC_ALPHA, TransparencyAttributes.BLEND_ONE_MINUS_SRC_ALPHA,
TransparencyAttributes.BLEND_SRC_COLOR, TransparencyAttributes.BLEND_ONE_MINUS_SRC_COLOR.public boolean getLighting()
public void setLighting(boolean l)
l
- true lighting is enabled for the object, false otherwise.private void updateLighting(boolean l)
l
- true lighting is enabled for the object, false otherwise.public int getColorTarget()
public void setColorTarget(int c)
c
- the Color Target. One of: Material.AMBIENT, Material.EMISSIVE, Material.DIFFUSE, Material.SPECULAR,
or Material.AMBIENT_AND_DIFFUSE.private void updateColorTarget(int c)
c
- the Color Target. One of: Material.AMBIENT, Material.EMISSIVE, Material.DIFFUSE, Material.SPECULAR,
or Material.AMBIENT_AND_DIFFUSE.public float getShininess()
public void setShininess(float s)
s
- the Shininess in the range [1.0, 128.0] with 1.0 being not shiny and 128.0 being very shiny.private void updateShininess(float s)
s
- the Shininess in the range [1.0, 128.0] with 1.0 being not shiny and 128.0 being very shiny.public float[] getAmbientColor()
public void setAmbientColor(float[] c)
c
- the Ambient Color in (R,G,B).private void updateAmbientColor(float[] c)
c
- the Ambient Color in (R,G,B).public float[] getDiffuseColor()
public void setDiffuseColor(float[] c)
c
- the Diffuse Color in (R,G,B).private void updateDiffuseColor(float[] c)
c
- the Diffuse Color in (R,G,B).public float[] getSpecularColor()
public void setSpecularColor(float[] c)
c
- the Specular Color in (R,G,B).private void updateSpecularColor(float[] c)
public float[] getEmissiveColor()
public void setEmissiveColor(float[] c)
c
- the Emissive Color in (R,G,B).private void updateEmissiveColor(float[] c)
c
- the Emissive Color in (R,G,B).public boolean isTextureSet()
public void setTextureUse(boolean b)
b
- true if the texture is used, false otherwise.private void updateIsTextureSet(boolean on)
on
- true if the texture is used, false otherwise.public java.net.URL getTextureFile()
public void setTextureFile(java.net.URL t)
t
- the Texture File URL.public void setDefaultTextureFile(java.net.URL t)
t
- the Default Texture File URL.private void updateTexture(java.net.URL t)
t
- the Texture File URL.public javax.media.j3d.Transform3D getTextureTransform()
public void setTextureTransform(javax.media.j3d.Transform3D t)
t
- the Texture Transform.private void updateTextureTransform(javax.media.j3d.Transform3D t)
t
- the Texture Transform.public float getTextureTransformScaleX()
public void setTextureTransformScaleX(float v)
v
- the Texture Transform Scale on X axis.public float getTextureTransformScaleY()
public void setTextureTransformScaleY(float v)
v
- the Texture Transform Scale on Y axis.public float getTextureTransformTranslatX()
public void setTextureTransformTranslatX(float v)
v
- the Texture Transform Translation on X axis.public float getTextureTransformTranslatY()
public void setTextureTransformTranslatY(float v)
v
- the Texture Transform Translation on Y axis.public float getTextureTransformRotZ()
public void setTextureTransformRotZ(float v)
v
- the Texture Transform Rotation on Z axis.public int getTexturePerspectiveCorrectionMode()
public void setTexturePerspectiveCorrectionMode(int m)
m
- the Texture Perspective Correction Mode between TextureAttributes.NICEST, TextureAttributes.FASTEST.protected void updateTexturePerspectiveCorrectionMode(int m)
public int getTextureMode()
public void setTextureMode(int m)
m
- the Texture Mode between TextureAttributes.MODULATE, TextureAttributes.DECAL, TextureAttributes.BLEND,
TextureAttributes.REPLACE, TextureAttributes.COMBINE.protected void updateTextureMode(int m)
m
- the Texture Mode between TextureAttributes.MODULATE, TextureAttributes.DECAL, TextureAttributes.BLEND,
TextureAttributes.REPLACE, TextureAttributes.COMBINE.public float[] getTextureBlendColor()
public void setTextureBlendColor(float[] c)
c
- the Texture Blend Color in (R,G,B,A).private void updateTextureBlendColor(float[] c)
c
- the Texture Blend Color in (R,G,B,A).public int getTextureCombineRGBMode()
public void setTextureCombineRGBMode(int m)
m
- the Texture Combine RGB Mode between TextureAttributes.COMBINE_REPLACE, TextureAttributes.COMBINE_MODULATE,
TextureAttributes.COMBINE_ADD, TextureAttributes.COMBINE_ADD_SIGNED, TextureAttributes.COMBINE_SUBTRACT,
TextureAttributes.COMBINE_INTERPOLATE, TextureAttributes.COMBINE_DOT3.private void updateTextureCombineRGBMode(int m)
m
- the Texture Combine RGB Mode between TextureAttributes.COMBINE_REPLACE, TextureAttributes.COMBINE_MODULATE,
TextureAttributes.COMBINE_ADD, TextureAttributes.COMBINE_ADD_SIGNED, TextureAttributes.COMBINE_SUBTRACT,
TextureAttributes.COMBINE_INTERPOLATE, TextureAttributes.COMBINE_DOT3.public int[] getTextureCombineRGBSource()
public void setTextureCombineRGBSource(int[] m)
m
- the Texture Combine RGB Source (C0,C1,C2) between TextureAttributes.COMBINE_OBJECT_COLOR,
TextureAttributes.COMBINE_TEXTURE_COLOR, TextureAttributes.COMBINE_CONSTANT_COLOR,
TextureAttributes.COMBINE_PREVIOUS_TEXTURE_UNIT_STATEprivate void updateTextureCombineRGBSource(int[] m)
m
- the Texture Combine RGB Source (C0,C1,C2) between TextureAttributes.COMBINE_OBJECT_COLOR,
TextureAttributes.COMBINE_TEXTURE_COLOR, TextureAttributes.COMBINE_CONSTANT_COLOR,
TextureAttributes.COMBINE_PREVIOUS_TEXTURE_UNIT_STATE.public int[] getTextureCombineRGBFunction()
public void setTextureCombineRGBFunction(int[] m)
m
- the Texture Combine RGB Function (C0,C1,C2) between TextureAttributes.COMBINE_SRC_COLOR,
TextureAttributes.COMBINE_ONE_MINUS_SRC_COLOR, TextureAttributes.COMBINE_SRC_ALPHA,
TextureAttributes.COMBINE_ONE_MINUS_SRC_ALPHA.private void updateTextureCombineRGBFunction(int[] m)
m
- the Texture Combine RGB Function (C0,C1,C2) between TextureAttributes.COMBINE_SRC_COLOR,
TextureAttributes.COMBINE_ONE_MINUS_SRC_COLOR, TextureAttributes.COMBINE_SRC_ALPHA,
TextureAttributes.COMBINE_ONE_MINUS_SRC_ALPHA.public int getTextureCombineRGBScale()
public void setTextureCombineRGBScale(int s)
s
- the Texture Combine RGB Scale.private void updateTextureCombineRGBScale(int m)
m
- the Texture Combine RGB Scale.public int getTextureCombineAlphaMode()
public void setTextureCombineAlphaMode(int m)
m
- the Texture Combine Alpha Mode between TextureAttributes.COMBINE_REPLACE, TextureAttributes.COMBINE_MODULATE,
TextureAttributes.COMBINE_ADD, TextureAttributes.COMBINE_ADD_SIGNED, TextureAttributes.COMBINE_SUBTRACT,
TextureAttributes.COMBINE_INTERPOLATE, TextureAttributes.COMBINE_DOT3.private void updateTextureCombineAlphaMode(int m)
m
- the Texture Combine Alpha Mode between TextureAttributes.COMBINE_REPLACE, TextureAttributes.COMBINE_MODULATE,
TextureAttributes.COMBINE_ADD, TextureAttributes.COMBINE_ADD_SIGNED, TextureAttributes.COMBINE_SUBTRACT,
TextureAttributes.COMBINE_INTERPOLATE, TextureAttributes.COMBINE_DOT3.public int[] getTextureCombineAlphaSource()
public void setTextureCombineAlphaSource(int[] m)
m
- the Texture Combine Alpha Source (C0,C1,C2) between TextureAttributes.COMBINE_OBJECT_COLOR,
TextureAttributes.COMBINE_TEXTURE_COLOR, TextureAttributes.COMBINE_CONSTANT_COLOR,
TextureAttributes.COMBINE_PREVIOUS_TEXTURE_UNIT_STATE.private void updateTextureCombineAlphaSource(int[] m)
m
- the Texture Combine Alpha Source (C0,C1,C2) between TextureAttributes.COMBINE_OBJECT_COLOR,
TextureAttributes.COMBINE_TEXTURE_COLOR, TextureAttributes.COMBINE_CONSTANT_COLOR,
TextureAttributes.COMBINE_PREVIOUS_TEXTURE_UNIT_STATE.public int[] getTextureCombineAlphaFunction()
public void setTextureCombineAlphaFunction(int[] m)
m
- the Texture Combine Alpha Function (C0,C1,C2) between TextureAttributes.COMBINE_SRC_ALPHA,
TextureAttributes.COMBINE_ONE_MINUS_SRC_ALPHA.private void updateTextureCombineAlphaFunction(int[] m)
m
- the Texture Combine Alpha Function (C0,C1,C2) between TextureAttributes.COMBINE_SRC_ALPHA,
TextureAttributes.COMBINE_ONE_MINUS_SRC_ALPHA.public int getTextureCombineAlphaScale()
public void setTextureCombineAlphaScale(int s)
s
- the Texture Combine Alpha Scale.private void updateTextureCombineAlphaScale(int m)
m
- the Texture Combine Alpha Scale.public static int convertInternTransparencyMode(int m)
m
- a Transparency Mode in TransparencyAttributes representation.
public static int convertExternTransparencyMode(int m)
m
- a Transparency Mode in Internal representation.
public static int convertExternTransparencySrcBlendFunction(int f)
f
- a Transparency Source Blend Function in Internal representation.
public static int convertInternTransparencySrcBlendFunction(int f)
f
- a Transparency Source Blend Function in TransparencyAttributes representation.
public static int convertExternTransparencyDstBlendFunction(int f)
f
- a Transparency Destination Blend Function in Internal representation.
public static int convertInternTransparencyDstBlendFunction(int f)
f
- a Transparency Destination Blend Function in TransparencyAttributes representation.
public static void main(java.lang.String[] args)
|
################################################################## Appearance3DChooser v1.1 Copyright (C) 2009 Frederic Roudaut This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. ################################################################### |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |