public class ViewerManager extends SettingsBase
Modifier and Type | Field and Description |
---|---|
static AxisAlignedRotation |
DEFAULT_AXIAL_VIEW |
static Renderer.AxisDrawStyle |
DEFAULT_AXIS_DRAW_STYLE |
static double |
DEFAULT_AXIS_RADIUS_RATIO |
static java.awt.Color |
DEFAULT_BACKGROUND_COLOR |
static GLViewer.BlendFactor |
DEFAULT_BLEND_DEST_FACTOR |
static GLViewer.BlendFactor |
DEFAULT_BLEND_SOURCE_FACTOR |
static boolean |
DEFAULT_BLENDING |
static boolean |
DEFAULT_DRAW_AXES |
static boolean |
DEFAULT_DRAW_GRID |
static Vector2d |
DEFAULT_ELLIPTIC_CURSOR_SIZE |
static double |
DEFAULT_MOUSE_WHEEL_ZOOM_SCALE |
static boolean |
DEFAULT_ORTHOGRAPHIC_VIEW |
static int |
DEFAULT_REFRESH_FLAGS |
static Viewer.RotationMode |
DEFAULT_ROTATION_MODE |
static java.awt.Color |
DEFAULT_SELECTION_COLOR |
static int |
DEFAULT_SURFACE_RESOLUTION |
static boolean |
DEFAULT_TRANSPARENCY_FACE_CULLING |
static PropertyList |
myProps |
Constructor and Description |
---|
ViewerManager(boolean createGui) |
Modifier and Type | Method and Description |
---|---|
void |
addDragger(Dragger3d d) |
void |
addKeyListener(java.awt.event.KeyListener listener)
Add a key listener to each of the viewers.
|
void |
addMouseListener(javax.swing.event.MouseInputListener listener)
Add a mouse input listener to each of the viewers.
|
void |
addRenderable(IsRenderable r) |
void |
addViewer(GLViewer viewer) |
void |
clearDraggers() |
void |
clearRenderables() |
PropertyList |
getAllPropertyInfo()
Returns a list giving static information about all properties exported by
this object.
|
Renderer.AxisDrawStyle |
getAxisDrawStyle() |
double |
getAxisRadiusRatio() |
java.awt.Color |
getBackgroundColor() |
GLViewer.BlendFactor |
getBlendDestFactor() |
GLViewer.BlendFactor |
getBlendSourceFactor() |
AxisAlignedRotation |
getDefaultAxialView() |
double |
getDefaultAxisLength() |
boolean |
getDefaultDrawAxes() |
boolean |
getDefaultDrawGrid() |
boolean |
getDefaultOrthographicView() |
MouseBindings |
getEffectiveMouseBindings()
Effective mouse bindings are those which are actually passed to the
viewers.
|
Vector2d |
getEllipticCursorSize() |
boolean |
getEllipticSelection()
Returns true if elliptic selection is enabled for the viewers.
|
java.util.ArrayList<java.awt.event.KeyListener> |
getKeyListeners() |
MouseBindings |
getMouseBindings()
Returns the mouse bindings specified using
setMouseBindings(maspack.widgets.MouseBindings) . |
java.util.ArrayList<javax.swing.event.MouseInputListener> |
getMouseListeners() |
double |
getMouseWheelZoomScale() |
Property |
getProperty(java.lang.String name)
Returns a property associated with a specified path name.
|
RenderList |
getRenderList() |
Viewer.RotationMode |
getRotationMode() |
java.awt.Color |
getSelectionColor() |
Renderer.HighlightStyle |
getSelectionHighlightStyle() |
boolean |
getSelectOnPress()
Returns true if "select on press" is enabled for the viewers.
|
int |
getSurfaceResolution() |
boolean |
getTransparencyBlending() |
boolean |
getTransparencyFaceCulling() |
GLViewer |
getViewer(int idx) |
static GLViewer |
getViewerFromComponent(java.awt.Component comp)
Find the Viewer (if any) associated with a particular component
|
boolean |
isSelectionEnabled()
Returns true if viewer selection is enabled.
|
int |
numViewers() |
void |
removeDragger(Dragger3d d) |
void |
removeKeyListener(java.awt.event.KeyListener listener)
Remove the specified key listener from each of the viewers.
|
void |
removeMouseListener(javax.swing.event.MouseInputListener listener)
Remove the specified mouse input listener from each of the viewers.
|
void |
removeRenderable(IsRenderable r) |
boolean |
removeViewer(Viewer viewer) |
void |
render() |
void |
repaint()
causes the repaint of the viewers
|
void |
resetEllipticCursorSize() |
void |
resetViewer(GLViewer viewer) |
void |
resetViewers(AxisAlignedRotation axialView) |
void |
resetViewers(AxisAngle frontView) |
void |
setAxisDrawStyle(Renderer.AxisDrawStyle style) |
void |
setAxisRadiusRatio(double ratio) |
void |
setBackgroundColor(java.awt.Color color) |
void |
setBlendDestFactor(GLViewer.BlendFactor factor) |
void |
setBlendSourceFactor(GLViewer.BlendFactor factor) |
void |
setCursor(java.awt.Cursor cursor)
Set the cursor on all the viewers.
|
void |
setDefaultAxialView(AxisAlignedRotation axialView) |
void |
setDefaultAxisLength(double l) |
void |
setDefaultDrawAxes(boolean drawAxes) |
void |
setDefaultDrawGrid(boolean drawGrid) |
void |
setDefaultOrthographicView(boolean ortho) |
void |
setEllipticCursorSize(Vector2d size) |
void |
setEllipticSelection(boolean enable)
Set whether or not elliptic selection is enabled in all the viewers.
|
void |
setMouseBindings(MouseBindings bindings)
Sets the mouse bindings to be used by the viewers.
|
void |
setMouseWheelZoomScale(double scale) |
void |
setRotationMode(Viewer.RotationMode mode) |
void |
setSelectionColor(java.awt.Color color) |
void |
setSelectionEnabled(boolean selection)
Set whether or not selection is being allowed on all the existing viewers.
|
void |
setSelectionHighlightStyle(Renderer.HighlightStyle mode) |
void |
setSelectOnPress(boolean enable)
Set whether or not selection is done when the mouse is pressed.
|
void |
setSurfaceResolution(int res) |
void |
setTransparencyBlending(boolean enable) |
void |
setTransparencyFaceCulling(boolean enable) |
createDialog, getDialog, getPreferences, setPreferences
public static java.awt.Color DEFAULT_BACKGROUND_COLOR
public static java.awt.Color DEFAULT_SELECTION_COLOR
public static Renderer.AxisDrawStyle DEFAULT_AXIS_DRAW_STYLE
public static double DEFAULT_AXIS_RADIUS_RATIO
public static Viewer.RotationMode DEFAULT_ROTATION_MODE
public static final AxisAlignedRotation DEFAULT_AXIAL_VIEW
public static Vector2d DEFAULT_ELLIPTIC_CURSOR_SIZE
public static int DEFAULT_SURFACE_RESOLUTION
public static boolean DEFAULT_TRANSPARENCY_FACE_CULLING
public static boolean DEFAULT_BLENDING
public static GLViewer.BlendFactor DEFAULT_BLEND_SOURCE_FACTOR
public static GLViewer.BlendFactor DEFAULT_BLEND_DEST_FACTOR
public static final int DEFAULT_REFRESH_FLAGS
public static final double DEFAULT_MOUSE_WHEEL_ZOOM_SCALE
public static final boolean DEFAULT_DRAW_AXES
public static final boolean DEFAULT_ORTHOGRAPHIC_VIEW
public static final boolean DEFAULT_DRAW_GRID
public static PropertyList myProps
public PropertyList getAllPropertyInfo()
HasProperties
public Property getProperty(java.lang.String name)
.
' characters. A sub-property
exists if the value of a property is itself an object which exports
properties. It is only possible to obtain a sub-property handle if each of
its ancestor properties exports their values by reference.getProperty
in interface HasProperties
getProperty
in class SettingsBase
name
- name of the desired property or sub-propertypublic void setDefaultDrawAxes(boolean drawAxes)
public boolean getDefaultDrawAxes()
public void setDefaultDrawGrid(boolean drawGrid)
public boolean getDefaultDrawGrid()
public void setDefaultOrthographicView(boolean ortho)
public boolean getDefaultOrthographicView()
public void setDefaultAxisLength(double l)
public double getDefaultAxisLength()
public MouseBindings getEffectiveMouseBindings()
setMouseBindings(maspack.widgets.MouseBindings)
, unless the specified binding are equal to MouseBindings.Default
, in which case the effective bindings are
determined automatically based on the number of available mouse buttons.public MouseBindings getMouseBindings()
setMouseBindings(maspack.widgets.MouseBindings)
.public void setMouseBindings(MouseBindings bindings)
MouseBindings.Default
, then the effective
bindings passed to the viewers are determined automatically based on the
number of available mouse buttons.public double getMouseWheelZoomScale()
public void setMouseWheelZoomScale(double scale)
public void addRenderable(IsRenderable r)
public void removeRenderable(IsRenderable r)
public void clearRenderables()
public RenderList getRenderList()
public void addDragger(Dragger3d d)
public void removeDragger(Dragger3d d)
public void clearDraggers()
public void addViewer(GLViewer viewer)
public void setSelectionHighlightStyle(Renderer.HighlightStyle mode)
public Renderer.HighlightStyle getSelectionHighlightStyle()
public boolean removeViewer(Viewer viewer)
public int numViewers()
public GLViewer getViewer(int idx)
public void resetViewer(GLViewer viewer)
public void setBackgroundColor(java.awt.Color color)
public java.awt.Color getBackgroundColor()
public void setSelectionColor(java.awt.Color color)
public java.awt.Color getSelectionColor()
public void setAxisDrawStyle(Renderer.AxisDrawStyle style)
public Renderer.AxisDrawStyle getAxisDrawStyle()
public void setAxisRadiusRatio(double ratio)
public double getAxisRadiusRatio()
public void setRotationMode(Viewer.RotationMode mode)
public Viewer.RotationMode getRotationMode()
public void setDefaultAxialView(AxisAlignedRotation axialView)
public AxisAlignedRotation getDefaultAxialView()
public void setEllipticCursorSize(Vector2d size)
public Vector2d getEllipticCursorSize()
public void setSurfaceResolution(int res)
public int getSurfaceResolution()
public void setTransparencyFaceCulling(boolean enable)
public boolean getTransparencyFaceCulling()
public void setTransparencyBlending(boolean enable)
public boolean getTransparencyBlending()
public void setBlendSourceFactor(GLViewer.BlendFactor factor)
public GLViewer.BlendFactor getBlendSourceFactor()
public void setBlendDestFactor(GLViewer.BlendFactor factor)
public GLViewer.BlendFactor getBlendDestFactor()
public void resetViewers(AxisAngle frontView)
public void resetViewers(AxisAlignedRotation axialView)
public void render()
public void repaint()
public void setCursor(java.awt.Cursor cursor)
cursor
- The type of cursor to display.public void removeMouseListener(javax.swing.event.MouseInputListener listener)
public void addMouseListener(javax.swing.event.MouseInputListener listener)
listener
- listener to addpublic java.util.ArrayList<javax.swing.event.MouseInputListener> getMouseListeners()
public void removeKeyListener(java.awt.event.KeyListener listener)
public void addKeyListener(java.awt.event.KeyListener listener)
listener
- listener to addpublic java.util.ArrayList<java.awt.event.KeyListener> getKeyListeners()
public void setSelectionEnabled(boolean selection)
selection
- Whether or not selection is enabled.public boolean isSelectionEnabled()
public void setSelectOnPress(boolean enable)
enable
- Whether or not selection is enabled.public boolean getSelectOnPress()
public void resetEllipticCursorSize()
public void setEllipticSelection(boolean enable)
enable
- Whether or not elliptic selection is enabled.public boolean getEllipticSelection()
public static GLViewer getViewerFromComponent(java.awt.Component comp)