Package mgui.interfaces.graphics
Class InterfaceGraphic2D
java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
- All Implemented Interfaces:
java.awt.event.ComponentListener
,java.awt.event.KeyListener
,java.awt.event.MouseListener
,java.awt.event.MouseMotionListener
,java.awt.image.ImageObserver
,java.awt.MenuContainer
,java.io.Serializable
,java.lang.Comparable<InterfaceGraphic<Tool2D>>
,java.util.EventListener
,javax.accessibility.Accessible
,AttributeListener
,AttributeObject
,DisplayListener
,InterfaceMouseObject
,InterfaceObject
,CategoryObject
,MapListener
,PopupMenuObject
,NamedObject
,ShapeListener
,Toolable<Tool2D>
,ToolListener
,TreeObject
,CleanableObject
,XMLObject
,IconObject
public class InterfaceGraphic2D extends InterfaceGraphic<Tool2D> implements ShapeListener
Graphical interface window for display 2D shapes (Shape2DInt). Shapes must be contained
by a SectionSet3DInt object to be displayed.
TODO: implement using a JLayeredPane
, allowing annotations, etc.
- Since:
- 1.0
- Version:
- 1.0
- Author:
- Andrew Reid
- See Also:
- Serialized Form
-
Nested Class Summary
Nested classes/interfaces inherited from class mgui.interfaces.graphics.InterfaceGraphic
InterfaceGraphic.GraphicType
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
Nested classes/interfaces inherited from interface mgui.interfaces.xml.XMLObject
XMLObject.XMLEncoding, XMLObject.XMLType
-
Field Summary
Fields Modifier and Type Field Description protected java.util.ArrayList<ShapeSet2DInt>
childSets
SectionSet3DInt
currentSections
ShapeSelectionSet
currentSelection
Tool2D
currentTool
Tool2D
defaultTool
protected DrawingEngine
drawEngine
protected java.util.ArrayList<InterfaceGraphicListener>
graphicListeners
java.util.ArrayList<Graphic2DGrid>
grids
protected boolean
needs_regen
protected boolean
needs_update
protected boolean
section_changed
protected ShapeSet2DInt
shape3DObjects
java.util.ArrayList<Shape2DInt>
shapeList
protected java.util.ArrayList<Shape2DInt>
temp_shapes
Fields inherited from class mgui.interfaces.graphics.InterfaceGraphic
excludeToSelection, graphic_listeners, init_once, is_snapshot, last_screen_shot_file, post_render_tasks, status_listeners, status_map, theMap, title_panel, toolInputAdapter
Fields inherited from class mgui.interfaces.InterfacePanel
attributes, displayListeners, last_click_point, statusBar, tree_nodes, treeNode, type
Fields inherited from class javax.swing.JComponent
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
accessibleContext, 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
Constructors Constructor Description InterfaceGraphic2D()
Instantiate and initialize a new 2D graphics window.InterfaceGraphic2D(java.lang.String name)
Instantiate and initialize a new 2D graphics window calledname
. -
Method Summary
Modifier and Type Method Description void
addGraphicListener(InterfaceGraphicListener l)
void
addGrid(Graphic2DGrid grid)
void
addModelShape2D(Shape2DInt thisShape, boolean update)
void
addModelShape2D(Shape2DInt thisShape, boolean updateShape, boolean updateListeners)
void
addPropertyChangeListener(java.beans.PropertyChangeListener thisListener)
void
addPropertyChangeObject(GraphicPropertyListener thisObj)
void
addShape2D(Shape2DInt thisShape)
void
addShape2D(Shape2DInt thisShape, boolean updateShape, boolean updateListeners)
void
addShapeInt(Shape2DInt thisShape)
void
addShapeInt(Shape2DInt thisShape, int pos)
void
appendTempShape(Shape2DInt shape)
Append a temporary shape to the bottom of the stack (renders first)void
attributeUpdated(AttributeEvent e)
Called when an Attribute's value has been updated.void
centerSectionAt(org.jogamp.vecmath.Point2f point)
Centers the section at the specified 2D pointvoid
centerSectionAt(org.jogamp.vecmath.Point3f point)
Centers the section at the specified 3D point, projected onto its planevoid
clearTempShapes()
Remove all temporary shapes from the stackvoid
destroy()
Destroy this object (prepare it to be removed from memory)void
drawMouseObjects()
void
drawMouseShapes()
void
drawShape2D(Shape2DInt thisShape)
Shape2DInt
find3DChild(Shape3DInt shape)
java.util.ArrayList<Shape2DInt>
find3DChildren(Shape3DInt shape)
void
finishTool()
protected void
fireGraphicListeners(GraphicEvent e)
protected void
fireGraphicSourceChanged()
Plane3D
getCurrentPlane()
int
getCurrentSection()
Gets the current section for the section set being rendered.SectionSet3DInt
getCurrentSectionSet()
Sets the current section set for this graphic object.Tool2D
getCurrentTool()
javax.swing.tree.DefaultMutableTreeNode
getDisplayObjectsNode()
Returns a tree node containing a list of objects displayable by this class of InterfaceGraphic.DrawingEngine
getDrawingEngine()
java.lang.String
getDTD()
Returns the Data Type Declaration (DTD) for this object's XML representationjava.lang.String
getLocalName()
Returns the local name associated with this XML object.javax.swing.Icon
getObjectIcon()
Returns theIcon
associated with this object.java.util.ArrayList<PickInfoShape2D>
getPickShapes(java.awt.Point point)
Return a list of PickInfoShape2D objects containing information about the shapes intersectingpoint
.protected int
getPopupLength()
InterfacePopupMenu
getPopupMenu()
Produces and returns a popup menu for this object.ShapeModel3D
getShapeModel()
ShapeSet2DInt
getShapeSet2D()
java.lang.String
getShortXML(int tab)
Returns a short XML representation of this object.java.lang.Object
getSource()
Returns the source object for this panel; returnsnull
if no source object is set.java.lang.String
getTitle()
boolean
getToolLock()
protected javax.swing.tree.DefaultMutableTreeNode
getTreeNode(ShapeSet3DInt set)
java.lang.String
getXML()
Returns this object's XML representation as a single string.java.lang.String
getXML(int tab)
Returns this object's XML representation as a single string.java.lang.String
getXMLSchema()
Returns the XML schema for this object's XML representationvoid
handlePopupEvent(java.awt.event.ActionEvent e)
Handles an event on this object's popup menu.void
handleXMLElementEnd(java.lang.String localName)
Handles the end of an XML element.void
handleXMLElementStart(java.lang.String localName, org.xml.sax.Attributes attributes, XMLObject.XMLType type)
Handles the start of an XML element.void
handleXMLString(java.lang.String s)
Handles a string within an XML element.protected void
init()
void
insertShape3D(Shape2DInt shape)
void
insertTempShape(Shape2DInt shape)
Insert a temporary shape at the top of the stack (renders last)void
insertTempShape(Shape2DInt shape, int pos)
Insert a temporary shape atpos
in the stackboolean
isDestroyed()
Test whether this object has been destroyedboolean
isDisplayable(java.lang.Object obj)
boolean
isToolable(Tool tool)
Tests whether this object is toolable bytool
void
keyPressed(java.awt.event.KeyEvent e)
void
mapUpdated(MapEvent e)
void
moveSectionTo(org.jogamp.vecmath.Point3f point)
Set the current section to the one which is closest topoint
boolean
needsRedraw(Attribute<?> a)
void
paintComponent(java.awt.Graphics g)
Shape2DInt
pickShape(java.awt.Point pickPt, int pickRadius)
void
regenerateDisplay()
Regenerates all the shapes in this display.void
removeGraphicListener(InterfaceGraphicListener l)
void
removeGrid(Graphic2DGrid grid)
void
removePropertyChangeListener(java.beans.PropertyChangeListener thisListener)
void
removeShape3D(Shape2DInt shape)
void
removeTempShape(Shape2DInt shape)
Remove temporary shapeshape
from the stackprotected void
set3DObjects()
Sets the 2D section-projected shapes from the 3D objects in the current model.void
setCurrentSection(int i)
Sets the current section for the section set to be rendered in this graphic object.void
setCurrentSectionSet(SectionSet3DInt set)
void
setCurrentSelection(ShapeSelectionSet thisSet, boolean exclude)
protected void
setCurrentShapeSet(ShapeSet2DInt set)
boolean
setCurrentTool(Tool2D thisTool)
boolean
setDefaultTool(Tool2D tool)
void
setExcludeToSelection(boolean exclude)
void
setShapeSet2D()
boolean
setSource(java.lang.Object obj)
Sets the source object for this panel.void
setToolLock(boolean val)
void
setTreeNode(InterfaceTreeNode treeNode)
Sets the children for this node'sInterfaceTreeNode
.void
shapeUpdated(ShapeEvent e)
A shape that this object is listening to has been updated.void
toolStateChanged(ToolEvent event)
java.lang.String
toString()
void
updateCurrentSectionSet()
void
updateCurrentSectionSet(boolean update)
void
updateDisplay()
Requests this panel to update its display.void
updateDisplays()
int
updateStatusBox(InterfaceGraphicTextBox box, java.awt.event.MouseEvent e)
Notifies this window to update the given status text box with information as it sees fit.void
writeXML(int tab, java.io.Writer writer, XMLOutputOptions options, ProgressUpdater progress_bar)
Writes the XML representation of this object to file.Methods inherited from class mgui.interfaces.graphics.InterfaceGraphic
addMouseListener, addStatusListener, compareTo, fireGraphicListeners, getBackgroundColour, getMap, getMouseCoords, getName, getSourceTypes, getStatusMessages, getType, getTypeStr, mouseDragged, mouseMoved, removeMouseListener, removeMouseObject, setBackgroundColour, setMap, setName, setStatusBar, setTool, toolDeactivated, writeSnapshotToFile, writeXML, writeXML
Methods inherited from class mgui.interfaces.InterfacePanel
_init, addDisplayListener, clean, cleanUpPanel, collapseAllCategories, collapseCategory, collapseOtherCategories, componentHidden, componentMoved, componentResized, componentShown, expandAllCategories, expandCategory, fireDisplayListeners, getAttribute, getAttributes, getAttributeValue, getLocalAttributes, getPopupMenu, getTreeLabel, getType, issueTreeNode, keyReleased, keyTyped, mouseClicked, mouseEntered, mouseExited, mousePressed, mouseReleased, removeDisplayListener, setAttribute, setAttributes, setType, showPanel, showPopupMenu, updateFromDialog, updateTreeNodes
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, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, 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, 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, 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, getParent, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, 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, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setMixingCutoutShape, setSize, setSize, show, show, size, transferFocus, transferFocusBackward, transferFocusUpCycle
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Field Details
-
drawEngine
-
currentTool
-
defaultTool
-
temp_shapes
-
currentSelection
-
currentSections
-
shape3DObjects
-
childSets
-
grids
-
graphicListeners
-
needs_update
protected transient boolean needs_update -
needs_regen
protected transient boolean needs_regen -
section_changed
protected transient boolean section_changed -
shapeList
-
-
Constructor Details
-
InterfaceGraphic2D
public InterfaceGraphic2D(java.lang.String name)Instantiate and initialize a new 2D graphics window calledname
.- Parameters:
name
-
-
InterfaceGraphic2D
public InterfaceGraphic2D()Instantiate and initialize a new 2D graphics window.
-
-
Method Details
-
getObjectIcon
public javax.swing.Icon getObjectIcon()Description copied from interface:IconObject
Returns theIcon
associated with this object.- Specified by:
getObjectIcon
in interfaceIconObject
- Overrides:
getObjectIcon
in classInterfaceGraphic<Tool2D>
- Returns:
-
init
protected void init()- Overrides:
init
in classInterfaceGraphic<Tool2D>
-
getPickShapes
Return a list of PickInfoShape2D objects containing information about the shapes intersectingpoint
. Shapes will be sorted according to render order.- Parameters:
point
-- Returns:
-
moveSectionTo
public void moveSectionTo(org.jogamp.vecmath.Point3f point)Set the current section to the one which is closest topoint
- Parameters:
point
-
-
centerSectionAt
public void centerSectionAt(org.jogamp.vecmath.Point2f point)Centers the section at the specified 2D point- Parameters:
point
-
-
centerSectionAt
public void centerSectionAt(org.jogamp.vecmath.Point3f point)Centers the section at the specified 3D point, projected onto its plane- Parameters:
point
-
-
getShapeModel
-
destroy
public void destroy()Description copied from interface:InterfaceObject
Destroy this object (prepare it to be removed from memory)- Specified by:
destroy
in interfaceInterfaceObject
- Specified by:
destroy
in interfaceShapeListener
- Overrides:
destroy
in classInterfacePanel
-
isDestroyed
public boolean isDestroyed()Description copied from interface:InterfaceObject
Test whether this object has been destroyed- Specified by:
isDestroyed
in interfaceInterfaceObject
- Specified by:
isDestroyed
in interfaceShapeListener
- Overrides:
isDestroyed
in classInterfacePanel
- Returns:
-
attributeUpdated
Description copied from interface:AttributeListener
Called when an Attribute's value has been updated.- Specified by:
attributeUpdated
in interfaceAttributeListener
- Overrides:
attributeUpdated
in classInterfacePanel
-
needsRedraw
-
paintComponent
public void paintComponent(java.awt.Graphics g)- Overrides:
paintComponent
in classjavax.swing.JComponent
-
updateStatusBox
Description copied from class:InterfaceGraphic
Notifies this window to update the given status text box with information as it sees fit. Boxes are mapped to indices within this class; By default, if the box's index is 1, the value will be set to the name of the current window; otherwise it will be set to an empty string. Overriding classes should call this super method first.- Overrides:
updateStatusBox
in classInterfaceGraphic<Tool2D>
- Parameters:
box
- Text box to update- Returns:
- The index of the box; mostly useful for internal purposes
-
addGrid
-
removeGrid
-
set3DObjects
protected void set3DObjects()Sets the 2D section-projected shapes from the 3D objects in the current model. -
insertShape3D
-
removeShape3D
-
addGraphicListener
- Overrides:
addGraphicListener
in classInterfaceGraphic<Tool2D>
-
removeGraphicListener
- Overrides:
removeGraphicListener
in classInterfaceGraphic<Tool2D>
-
updateDisplay
public void updateDisplay()Description copied from class:InterfacePanel
Requests this panel to update its display.- Specified by:
updateDisplay
in interfaceDisplayListener
- Overrides:
updateDisplay
in classInterfacePanel
-
updateDisplays
public void updateDisplays()- Overrides:
updateDisplays
in classInterfacePanel
-
updateCurrentSectionSet
public void updateCurrentSectionSet() -
updateCurrentSectionSet
public void updateCurrentSectionSet(boolean update) -
getCurrentPlane
-
appendTempShape
Append a temporary shape to the bottom of the stack (renders first)- Parameters:
shape
-
-
insertTempShape
Insert a temporary shape at the top of the stack (renders last)- Parameters:
shape
-
-
insertTempShape
Insert a temporary shape atpos
in the stack- Parameters:
shape
-
-
clearTempShapes
public void clearTempShapes()Remove all temporary shapes from the stack -
removeTempShape
Remove temporary shapeshape
from the stack- Parameters:
shape
-
-
drawShape2D
-
drawMouseShapes
public void drawMouseShapes() -
addShapeInt
-
addShapeInt
-
addModelShape2D
-
addModelShape2D
-
drawMouseObjects
public void drawMouseObjects() -
addPropertyChangeObject
-
addPropertyChangeListener
public void addPropertyChangeListener(java.beans.PropertyChangeListener thisListener)- Overrides:
addPropertyChangeListener
in classjava.awt.Container
-
removePropertyChangeListener
public void removePropertyChangeListener(java.beans.PropertyChangeListener thisListener)- Overrides:
removePropertyChangeListener
in classjava.awt.Component
-
setDefaultTool
- Specified by:
setDefaultTool
in interfaceToolable<Tool2D>
- Overrides:
setDefaultTool
in classInterfaceGraphic<Tool2D>
-
setCurrentTool
- Specified by:
setCurrentTool
in interfaceToolable<Tool2D>
- Overrides:
setCurrentTool
in classInterfaceGraphic<Tool2D>
-
toolStateChanged
- Specified by:
toolStateChanged
in interfaceToolListener
- Overrides:
toolStateChanged
in classInterfaceGraphic<Tool2D>
-
isToolable
Description copied from interface:Toolable
Tests whether this object is toolable bytool
- Specified by:
isToolable
in interfaceToolable<Tool2D>
- Overrides:
isToolable
in classInterfaceGraphic<Tool2D>
- Returns:
-
finishTool
public void finishTool() -
getCurrentTool
- Specified by:
getCurrentTool
in interfaceToolable<Tool2D>
- Overrides:
getCurrentTool
in classInterfaceGraphic<Tool2D>
-
pickShape
-
setTreeNode
Description copied from interface:TreeObject
Sets the children for this node'sInterfaceTreeNode
.- Specified by:
setTreeNode
in interfaceTreeObject
- Overrides:
setTreeNode
in classInterfacePanel
-
toString
public java.lang.String toString()- Overrides:
toString
in classjava.awt.Component
-
getTitle
public java.lang.String getTitle()- Overrides:
getTitle
in classInterfacePanel
-
getToolLock
public boolean getToolLock() -
setToolLock
public void setToolLock(boolean val) -
setCurrentSelection
-
setCurrentSectionSet
-
getCurrentSectionSet
Sets the current section set for this graphic object.- Returns:
-
setCurrentSection
public void setCurrentSection(int i)Sets the current section for the section set to be rendered in this graphic object.- Parameters:
i
-
-
getCurrentSection
public int getCurrentSection()Gets the current section for the section set being rendered.- Returns:
-
setSource
public boolean setSource(java.lang.Object obj)Description copied from class:InterfacePanel
Sets the source object for this panel.- Overrides:
setSource
in classInterfacePanel
- Returns:
-
getSource
public java.lang.Object getSource()Description copied from class:InterfacePanel
Returns the source object for this panel; returnsnull
if no source object is set.- Overrides:
getSource
in classInterfacePanel
- Returns:
-
setExcludeToSelection
public void setExcludeToSelection(boolean exclude)- Overrides:
setExcludeToSelection
in classInterfaceGraphic<Tool2D>
-
isDisplayable
public boolean isDisplayable(java.lang.Object obj)- Overrides:
isDisplayable
in classInterfaceGraphic<Tool2D>
-
fireGraphicSourceChanged
protected void fireGraphicSourceChanged() -
fireGraphicListeners
-
getShapeSet2D
-
addShape2D
-
addShape2D
-
setShapeSet2D
public void setShapeSet2D() -
setCurrentShapeSet
-
getDisplayObjectsNode
public javax.swing.tree.DefaultMutableTreeNode getDisplayObjectsNode()Returns a tree node containing a list of objects displayable by this class of InterfaceGraphic. Thus, a hierarchical list of SectionSet3DInt objects from the data model.- Overrides:
getDisplayObjectsNode
in classInterfaceGraphic<Tool2D>
- Parameters:
p
- InterfaceDisplayPanel containing displayable data objects- Returns:
- DefaultMutableTreeNode with a tree list of SectionSet3DInt objects
-
getTreeNode
- Overrides:
getTreeNode
in classInterfaceGraphic<Tool2D>
-
mapUpdated
- Specified by:
mapUpdated
in interfaceMapListener
- Overrides:
mapUpdated
in classInterfaceGraphic<Tool2D>
-
regenerateDisplay
public void regenerateDisplay()Regenerates all the shapes in this display. -
shapeUpdated
Description copied from interface:ShapeListener
A shape that this object is listening to has been updated. The specific type of event is defined by ShapeEvent.EventType.- Specified by:
shapeUpdated
in interfaceShapeListener
- Overrides:
shapeUpdated
in classInterfacePanel
-
find3DChildren
-
find3DChild
-
getPopupMenu
Description copied from interface:PopupMenuObject
Produces and returns a popup menu for this object.- Specified by:
getPopupMenu
in interfacePopupMenuObject
- Overrides:
getPopupMenu
in classInterfaceGraphic<Tool2D>
- Returns:
-
getPopupLength
protected int getPopupLength()- Overrides:
getPopupLength
in classInterfaceGraphic<Tool2D>
-
handlePopupEvent
public void handlePopupEvent(java.awt.event.ActionEvent e)Description copied from interface:PopupMenuObject
Handles an event on this object's popup menu.- Specified by:
handlePopupEvent
in interfacePopupMenuObject
- Overrides:
handlePopupEvent
in classInterfaceGraphic<Tool2D>
-
keyPressed
public void keyPressed(java.awt.event.KeyEvent e)- Specified by:
keyPressed
in interfacejava.awt.event.KeyListener
- Overrides:
keyPressed
in classInterfacePanel
-
getDTD
public java.lang.String getDTD()Description copied from interface:XMLObject
Returns the Data Type Declaration (DTD) for this object's XML representationSee http://en.wikipedia.org/wiki/Document_Type_Definition for a description.
-
getLocalName
public java.lang.String getLocalName()Description copied from interface:XMLObject
Returns the local name associated with this XML object.- Specified by:
getLocalName
in interfaceXMLObject
- Returns:
-
getShortXML
public java.lang.String getShortXML(int tab)Description copied from interface:XMLObject
Returns a short XML representation of this object.- Specified by:
getShortXML
in interfaceXMLObject
- Returns:
-
getXML
public java.lang.String getXML()Description copied from interface:XMLObject
Returns this object's XML representation as a single string. NOTE: this is not feasible for larger objects and containers, thus may not be implemented for these objects. Use theXMLObject.writeXML(int,java.io.Writer,mgui.io.standard.xml.XMLOutputOptions,mgui.interfaces.ProgressUpdater)
functions to write larger objects to file. -
getXML
public java.lang.String getXML(int tab)Description copied from interface:XMLObject
Returns this object's XML representation as a single string. NOTE: this is not feasible for larger objects and containers, thus may not be implemented for these objects. Use theXMLObject.writeXML(int,java.io.Writer,mgui.io.standard.xml.XMLOutputOptions,mgui.interfaces.ProgressUpdater)
functions to write larger objects to file. -
getXMLSchema
public java.lang.String getXMLSchema()Description copied from interface:XMLObject
Returns the XML schema for this object's XML representation- Specified by:
getXMLSchema
in interfaceXMLObject
- Returns:
-
handleXMLElementEnd
public void handleXMLElementEnd(java.lang.String localName)Description copied from interface:XMLObject
Handles the end of an XML element.- Specified by:
handleXMLElementEnd
in interfaceXMLObject
- Parameters:
localName
- Local name of the element
-
handleXMLElementStart
public void handleXMLElementStart(java.lang.String localName, org.xml.sax.Attributes attributes, XMLObject.XMLType type)Description copied from interface:XMLObject
Handles the start of an XML element.- Specified by:
handleXMLElementStart
in interfaceXMLObject
- Parameters:
localName
- Local name of the elementattributes
- Set of element attributestype
- TheXMLType
of this element
-
handleXMLString
public void handleXMLString(java.lang.String s)Description copied from interface:XMLObject
Handles a string within an XML element.- Specified by:
handleXMLString
in interfaceXMLObject
- Parameters:
s
- String to handle
-
writeXML
public void writeXML(int tab, java.io.Writer writer, XMLOutputOptions options, ProgressUpdater progress_bar) throws java.io.IOExceptionDescription copied from interface:XMLObject
Writes the XML representation of this object to file. The basic contract for this method is that it should not write a newline character at its start or end. The default format ofXMLFormat.Ascii
will be used. -
getDrawingEngine
-