jwo.landserf.gui3d
Class SurfaceDetailBox
java.lang.Object
java.awt.Component
java.awt.Container
java.awt.Window
java.awt.Dialog
javax.swing.JDialog
jwo.utils.gui.JWDialogue
jwo.landserf.gui3d.SurfaceDetailBox
- All Implemented Interfaces:
- Accessible, ActionListener, ChangeListener, EventListener, ImageObserver, ItemListener, MenuContainer, RootPaneContainer, Serializable, WindowConstants
- public class SurfaceDetailBox
- extends JWDialogue
- implements ItemListener, ActionListener, ChangeListener
Allows surface detail texture to be controlled (texture to
use, level of transparency, size etc).
- Version:
- 2.2, 25th August, 2004.
- Author:
- Jo Wood
- See Also:
- Serialized Form
Constructor Summary |
SurfaceDetailBox(GUI3d gui3d)
Create a dialog allowing vector appearance to be changed. |
Method Summary |
void |
actionPerformed(ActionEvent event)
Responds to a button press by updating the relevant scale of drape. |
float |
getDetailSize()
Reports the size at which the the texture should be drawn in multiples
of the raster grid resolution. |
int |
getDetailType()
Reports the type of detail image used (for example USER_DEFINED, RIPPLES
or one of the other default types). |
Image |
getTextureImage()
Reports the image used for texture.
|
float |
getTransparency()
Reports the transparency value selected.
|
boolean |
isDrawDetail()
Reports if the detailed texture is drawn or not. |
boolean |
isFadeDetail()
Reports if the detailed texture is to fade with distance. |
void |
itemStateChanged(ItemEvent event)
Sets the clip and smooth state of the vector display. |
void |
stateChanged(ChangeEvent e)
Responds to a change in a slider by updating the relevent contol. |
Methods inherited from class javax.swing.JDialog |
addImpl, createRootPane, dialogInit, getAccessibleContext, getDefaultCloseOperation, getGlassPane, getJMenuBar, getLayeredPane, getRootPane, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, update |
Methods inherited from class java.awt.Dialog |
addNotify, dispose, getTitle, hide, isModal, isResizable, isUndecorated, setModal, setResizable, setTitle, setUndecorated, show |
Methods inherited from class java.awt.Window |
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, finalize, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getGraphicsConfiguration, getInputContext, getListeners, getLocale, getMostRecentFocusOwner, getOwnedWindows, getOwner, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindowStateListeners, isActive, isFocusableWindow, isFocusCycleRoot, isFocused, isShowing, pack, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, setCursor, setFocusableWindowState, setFocusCycleRoot, setLocationRelativeTo, toBack, toFront |
Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, removeNotify, setFocusTraversalKeys, setFocusTraversalPolicy, setFont, 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, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isOpaque, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, size, toString, transferFocus, transferFocusUpCycle |
RIPPLES
public static final int RIPPLES
- Ripple texture.
- See Also:
- Constant Field Values
STONES
public static final int STONES
- Stoney texture.
- See Also:
- Constant Field Values
MARBLE
public static final int MARBLE
- Marbled texture.
- See Also:
- Constant Field Values
OPAQUE_GRID
public static final int OPAQUE_GRID
- Opaque grid.
- See Also:
- Constant Field Values
TRANSPARENT_GRID
public static final int TRANSPARENT_GRID
- Transparent grid.
- See Also:
- Constant Field Values
USER_DEFINED
public static final int USER_DEFINED
- User defined texture.
- See Also:
- Constant Field Values
NONE
public static final int NONE
- No surface detail defined.
- See Also:
- Constant Field Values
SurfaceDetailBox
public SurfaceDetailBox(GUI3d gui3d)
- Create a dialog allowing vector appearance to be changed.
- Parameters:
gui3d
- Parent GUI controlling 3d view.
getTransparency
public float getTransparency()
- Reports the transparency value selected.
return Transparency value.
getTextureImage
public Image getTextureImage()
- Reports the image used for texture.
return Texture image.
isDrawDetail
public boolean isDrawDetail()
- Reports if the detailed texture is drawn or not.
- Returns:
- True if detail is drawn.
isFadeDetail
public boolean isFadeDetail()
- Reports if the detailed texture is to fade with distance.
- Returns:
- True if detail is to fade with distance.
getDetailSize
public float getDetailSize()
- Reports the size at which the the texture should be drawn in multiples
of the raster grid resolution.
- Returns:
- Number of grid cells over which the texture should be drawn (can
be fractional).
getDetailType
public int getDetailType()
- Reports the type of detail image used (for example USER_DEFINED, RIPPLES
or one of the other default types).
- Returns:
- surface detail type.
actionPerformed
public void actionPerformed(ActionEvent event)
- Responds to a button press by updating the relevant scale of drape.
- Specified by:
actionPerformed
in interface ActionListener
- Parameters:
event
- Button press event.
itemStateChanged
public void itemStateChanged(ItemEvent event)
- Sets the clip and smooth state of the vector display.
- Specified by:
itemStateChanged
in interface ItemListener
- Parameters:
event
- Checkbox item that has changed.
stateChanged
public void stateChanged(ChangeEvent e)
- Responds to a change in a slider by updating the relevent contol.
- Specified by:
stateChanged
in interface ChangeListener
- Parameters:
e
- Slider change event.
Copyright Jo Wood, 1996-2005, last modified, 11th March, 2005