jwo.landserf.gui3d
Class SurfaceDetailBox

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended byjava.awt.Window
              extended byjava.awt.Dialog
                  extended byjavax.swing.JDialog
                      extended byjwo.utils.gui.JWDialogue
                          extended byjwo.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

Nested Class Summary
 
Nested classes inherited from class javax.swing.JDialog
JDialog.AccessibleJDialog
 
Nested classes inherited from class java.awt.Dialog
Dialog.AccessibleAWTDialog
 
Nested classes inherited from class java.awt.Window
Window.AccessibleAWTWindow
 
Nested classes inherited from class java.awt.Container
Container.AccessibleAWTContainer
 
Nested classes inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy
 
Field Summary
static int MARBLE
          Marbled texture.
static int NONE
          No surface detail defined.
static int OPAQUE_GRID
          Opaque grid.
static int RIPPLES
          Ripple texture.
static int STONES
          Stoney texture.
static int TRANSPARENT_GRID
          Transparent grid.
static int USER_DEFINED
          User defined texture.
 
Fields inherited from class jwo.utils.gui.JWDialogue
DIALOGUE, MONOLOGUE
 
Fields inherited from class javax.swing.JDialog
accessibleContext, rootPane, rootPaneCheckingEnabled
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface javax.swing.WindowConstants
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, EXIT_ON_CLOSE, HIDE_ON_CLOSE
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
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 jwo.utils.gui.JWDialogue
addDialogueListener, checkInput, closedown, getContentPane, isChanged, removeDialogueListener, setFullBackground
 
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
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

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
Constructor Detail

SurfaceDetailBox

public SurfaceDetailBox(GUI3d gui3d)
Create a dialog allowing vector appearance to be changed.

Parameters:
gui3d - Parent GUI controlling 3d view.
Method Detail

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