Package mgui.interfaces.graphs
Class InterfaceGraphDisplay
java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
- All Implemented Interfaces:
edu.uci.ics.jung.graph.event.GraphEventListener<AbstractGraphNode,AbstractGraphEdge>,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<ToolGraph>>,java.util.EventListener,javax.accessibility.Accessible,AttributeListener,AttributeObject,DisplayListener,InterfaceGraphListener,InterfaceMouseObject,InterfaceObject,CategoryObject,MapListener,PopupMenuObject,NamedObject,ShapeListener,Toolable<ToolGraph>,ToolListener,TreeObject,CleanableObject,XMLObject,IconObject
public class InterfaceGraphDisplay extends InterfaceGraphic<ToolGraph> implements InterfaceGraphListener, edu.uci.ics.jung.graph.event.GraphEventListener<AbstractGraphNode,AbstractGraphEdge>
Displays graphs and allows user interaction with them. Interfaces with the JUNG API
(http://jung.sourceforge.net/)
- Version:
- 1.0
- Author:
- Andrew Reid
- See Also:
- Serialized Form
-
Nested Class Summary
Nested classes/interfaces inherited from class mgui.interfaces.graphics.InterfaceGraphic
InterfaceGraphic.GraphicTypeNested classes/interfaces inherited from class javax.swing.JPanel
javax.swing.JPanel.AccessibleJPanelNested classes/interfaces inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponentNested classes/interfaces inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainerNested classes/interfaces inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategyNested classes/interfaces inherited from interface mgui.interfaces.xml.XMLObject
XMLObject.XMLEncoding, XMLObject.XMLType -
Field Summary
Fields Modifier and Type Field Description protected ToolGraphcurrentToolprotected ToolGraphdefaultToolprotected GraphFunctions.GraphEdgeLabelRendereredge_label_rendererprotected InterfaceAbstractGraphgraphprotected edu.uci.ics.jung.visualization.renderers.Renderer.VertexLabel.Positionlabel_positionprotected GraphFunctions.GraphNodeLabelRenderernode_label_rendererprotected edu.uci.ics.jung.graph.ObservableGraph<AbstractGraphNode,AbstractGraphEdge>observable_graphprotected edu.uci.ics.jung.visualization.GraphZoomScrollPanescrollPaneprotected GraphFunctions.ArrowVisibilityshow_arrowsprotected GraphFunctions.EdgeVisibilityshow_edgesprotected GraphFunctions.NodeVisibilityshow_nodesprotected booleantoolLockprotected edu.uci.ics.jung.visualization.VisualizationViewer<AbstractGraphNode,AbstractGraphEdge>viewerprotected mgui.interfaces.graphs.InterfaceGraphDisplay.ViewerMouseListenerviewer_adapterFields 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, toolInputAdapterFields inherited from class mgui.interfaces.InterfacePanel
attributes, displayListeners, isDestroyed, last_click_point, statusBar, tree_nodes, treeNode, typeFields inherited from class javax.swing.JComponent
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOWFields inherited from class java.awt.Component
accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENTFields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH -
Constructor Summary
Constructors Constructor Description InterfaceGraphDisplay()InterfaceGraphDisplay(InterfaceAbstractGraph graph, java.lang.String layout) -
Method Summary
Modifier and Type Method Description voidaddPropertyChangeListener(java.beans.PropertyChangeListener thisListener)voidaddPropertyChangeObject(GraphicPropertyListener thisObj)voidappendPaintable(edu.uci.ics.jung.visualization.VisualizationServer.Paintable paintable)voidattributeUpdated(AttributeEvent e)Called when an Attribute's value has been updated.voidfinishTool()ToolGraphgetCurrentTool()javax.swing.tree.DefaultMutableTreeNodegetDisplayObjectsNode()Returns a tree node containing a list of objects displayable by a class of InterfaceGraphic.javax.swing.tree.DefaultMutableTreeNodegetDisplayObjectsNode(InterfaceDisplayPanel p)java.lang.StringgetDTD()Returns the Data Type Declaration (DTD) for this object's XML representationColourMapgetEdgeWeightColourMap()edu.uci.ics.jung.algorithms.layout.Layout<AbstractGraphNode,AbstractGraphEdge>getGraphLayoutInstance()protected edu.uci.ics.jung.visualization.renderers.Renderer.VertexLabel.PositiongetLabelPosition()java.lang.Class<?>getLayoutClass()java.lang.StringgetLocalName()Returns the local name associated with this XML object.org.jogamp.vecmath.Point2fgetMouseCoords(java.awt.Point p)Return the mapped coordinates, depending on the InterfaceGraphic window, for the given screen coordinates.java.awt.FontgetNodeLabelFont()javax.swing.IcongetObjectIcon()Returns theIconassociated with this object.InterfacePopupMenugetPopupMenu()Produces and returns a popup menu for this object.java.lang.StringgetShortXML(int tab)Returns a short XML representation of this object.java.lang.StringgetTitle()booleangetToolLock()edu.uci.ics.jung.visualization.VisualizationViewer<AbstractGraphNode,AbstractGraphEdge>getViewer()Gets theVisualizationViewerfor this window.java.lang.StringgetXML()Returns this object's XML representation as a single string.java.lang.StringgetXML(int tab)Returns this object's XML representation as a single string.java.lang.StringgetXMLSchema()Returns the XML schema for this object's XML representationvoidgraphUpdated(InterfaceGraphEvent e)voidhandleGraphEvent(edu.uci.ics.jung.graph.event.GraphEvent<AbstractGraphNode,AbstractGraphEdge> evt)Handle a graph event on the current ObservableGraph.voidhandlePopupEvent(java.awt.event.ActionEvent e)Handles an event on this object's popup menu.voidhandleXMLElementEnd(java.lang.String localName)Handles the end of an XML element.voidhandleXMLElementStart(java.lang.String localName, org.xml.sax.Attributes attributes, XMLObject.XMLType type)Handles the start of an XML element.voidhandleXMLString(java.lang.String s)Handles a string within an XML element.voidinsertPaintable(edu.uci.ics.jung.visualization.VisualizationServer.Paintable paintable)booleanisDisplayable(java.lang.Object obj)booleanisToolable(Tool tool)Tests whether this object is toolable bytoolvoidremovePropertyChangeListener(java.beans.PropertyChangeListener thisListener)protected booleanrequiresRedraw(java.lang.String attribute)Returns true is an update to the attributeattributerequires the display window to redraw itself.booleansetCurrentTool(ToolGraph tool)booleansetDefaultTool(ToolGraph tool)voidsetGraph(InterfaceAbstractGraph graph)booleansetGraphLayout(java.lang.String name)booleansetSource(java.lang.Object obj)Sets the source object for this panel.voidsetToolLock(boolean lock)voidsetTreeNode(InterfaceTreeNode treeNode)Sets the children for this node'sInterfaceTreeNode.voidsetViewer()java.lang.StringtoString()voidupdateFromGraph()voidupdateFromGraph(int code)intupdateStatusBox(InterfaceGraphicTextBox box, java.awt.event.MouseEvent e)Notifies this window to update the given status text box with information as it sees fit.protected voidupdateViewer()booleanwriteSnapshotToFile(java.io.File file)Writes a snapshot of this window to file as a Portable Network Graphics (png) image.voidwriteXML(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
addGraphicListener, addMouseListener, addStatusListener, compareTo, fireGraphicListeners, getBackgroundColour, getMap, getName, getPopupLength, getSourceTypes, getStatusMessages, getTreeNode, getType, getTypeStr, init, mapUpdated, mouseDragged, mouseMoved, removeGraphicListener, removeMouseListener, removeMouseObject, setBackgroundColour, setExcludeToSelection, setMap, setName, setStatusBar, setTool, toolDeactivated, toolStateChanged, writeXML, writeXMLMethods inherited from class mgui.interfaces.InterfacePanel
_init, addDisplayListener, clean, cleanUpPanel, collapseAllCategories, collapseCategory, collapseOtherCategories, componentHidden, componentMoved, componentResized, componentShown, destroy, expandAllCategories, expandCategory, fireDisplayListeners, getAttribute, getAttributes, getAttributeValue, getLocalAttributes, getPopupMenu, getSource, getTreeLabel, getType, isDestroyed, issueTreeNode, keyPressed, keyReleased, keyTyped, mouseClicked, mouseEntered, mouseExited, mousePressed, mouseReleased, removeDisplayListener, setAttribute, setAttributes, setType, shapeUpdated, showPanel, showPopupMenu, updateDisplay, updateDisplays, updateFromDialog, updateTreeNodesMethods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUIMethods 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, 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, updateMethods 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, validateTreeMethods 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, transferFocusUpCycleMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Field Details
-
viewer
protected edu.uci.ics.jung.visualization.VisualizationViewer<AbstractGraphNode,AbstractGraphEdge> viewer -
scrollPane
protected edu.uci.ics.jung.visualization.GraphZoomScrollPane scrollPane -
graph
-
observable_graph
protected edu.uci.ics.jung.graph.ObservableGraph<AbstractGraphNode,AbstractGraphEdge> observable_graph -
currentTool
-
defaultTool
-
toolLock
protected boolean toolLock -
viewer_adapter
protected mgui.interfaces.graphs.InterfaceGraphDisplay.ViewerMouseListener viewer_adapter -
show_edges
-
show_nodes
-
show_arrows
-
label_position
protected edu.uci.ics.jung.visualization.renderers.Renderer.VertexLabel.Position label_position -
node_label_renderer
-
edge_label_renderer
-
-
Constructor Details
-
InterfaceGraphDisplay
public InterfaceGraphDisplay() -
InterfaceGraphDisplay
-
-
Method Details
-
getViewer
public edu.uci.ics.jung.visualization.VisualizationViewer<AbstractGraphNode,AbstractGraphEdge> getViewer()Gets theVisualizationViewerfor this window.- Returns:
- the viewer, or
nullif none is set.
-
getObjectIcon
public javax.swing.Icon getObjectIcon()Description copied from interface:IconObjectReturns theIconassociated with this object.- Specified by:
getObjectIconin interfaceIconObject- Overrides:
getObjectIconin classInterfaceGraphic<ToolGraph>- Returns:
-
updateStatusBox
Description copied from class:InterfaceGraphicNotifies 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:
updateStatusBoxin classInterfaceGraphic<ToolGraph>- Parameters:
box- Text box to update- Returns:
- The index of the box; mostly useful for internal purposes
-
addPropertyChangeListener
public void addPropertyChangeListener(java.beans.PropertyChangeListener thisListener)- Overrides:
addPropertyChangeListenerin classjava.awt.Container
-
removePropertyChangeListener
public void removePropertyChangeListener(java.beans.PropertyChangeListener thisListener)- Overrides:
removePropertyChangeListenerin classjava.awt.Component
-
getNodeLabelFont
public java.awt.Font getNodeLabelFont() -
isDisplayable
public boolean isDisplayable(java.lang.Object obj)- Overrides:
isDisplayablein classInterfaceGraphic<ToolGraph>
-
handlePopupEvent
public void handlePopupEvent(java.awt.event.ActionEvent e)Description copied from interface:PopupMenuObjectHandles an event on this object's popup menu.- Specified by:
handlePopupEventin interfacePopupMenuObject- Overrides:
handlePopupEventin classInterfaceGraphic<ToolGraph>
-
writeSnapshotToFile
public boolean writeSnapshotToFile(java.io.File file)Description copied from class:InterfaceGraphicWrites a snapshot of this window to file as a Portable Network Graphics (png) image.- Overrides:
writeSnapshotToFilein classInterfaceGraphic<ToolGraph>- Returns:
-
getPopupMenu
Description copied from interface:PopupMenuObjectProduces and returns a popup menu for this object.- Specified by:
getPopupMenuin interfacePopupMenuObject- Overrides:
getPopupMenuin classInterfaceGraphic<ToolGraph>- Returns:
-
getMouseCoords
public org.jogamp.vecmath.Point2f getMouseCoords(java.awt.Point p)Description copied from class:InterfaceGraphicReturn the mapped coordinates, depending on the InterfaceGraphic window, for the given screen coordinates.- Overrides:
getMouseCoordsin classInterfaceGraphic<ToolGraph>- Returns:
- mapped coordinates; or
nullif not applicable.
-
getGraphLayoutInstance
public edu.uci.ics.jung.algorithms.layout.Layout<AbstractGraphNode,AbstractGraphEdge> getGraphLayoutInstance() throws GraphException- Throws:
GraphException
-
getLayoutClass
public java.lang.Class<?> getLayoutClass() -
getDisplayObjectsNode
public javax.swing.tree.DefaultMutableTreeNode getDisplayObjectsNode()Description copied from class:InterfaceGraphicReturns a tree node containing a list of objects displayable by a class of InterfaceGraphic. Must therefore be overriden by that class.- Overrides:
getDisplayObjectsNodein classInterfaceGraphic<ToolGraph>- Returns:
- DefaultMutableTreeNode with a tree list of displayable objects
-
attributeUpdated
Description copied from interface:AttributeListenerCalled when an Attribute's value has been updated.- Specified by:
attributeUpdatedin interfaceAttributeListener- Overrides:
attributeUpdatedin classInterfacePanel
-
requiresRedraw
protected boolean requiresRedraw(java.lang.String attribute)Returns true is an update to the attributeattributerequires the display window to redraw itself.- Parameters:
name-- Returns:
-
updateViewer
protected void updateViewer() -
setViewer
- Throws:
GraphException
-
getLabelPosition
protected edu.uci.ics.jung.visualization.renderers.Renderer.VertexLabel.Position getLabelPosition() -
setGraph
- Throws:
GraphException
-
setGraphLayout
public boolean setGraphLayout(java.lang.String name) -
setSource
public boolean setSource(java.lang.Object obj)Description copied from class:InterfacePanelSets the source object for this panel.- Overrides:
setSourcein classInterfacePanel- Returns:
-
setTreeNode
Description copied from interface:TreeObjectSets the children for this node'sInterfaceTreeNode.- Specified by:
setTreeNodein interfaceTreeObject- Overrides:
setTreeNodein classInterfacePanel
-
getToolLock
public boolean getToolLock() -
setToolLock
public void setToolLock(boolean lock) -
addPropertyChangeObject
-
getCurrentTool
- Specified by:
getCurrentToolin interfaceToolable<ToolGraph>- Overrides:
getCurrentToolin classInterfaceGraphic<ToolGraph>
-
setCurrentTool
- Specified by:
setCurrentToolin interfaceToolable<ToolGraph>- Overrides:
setCurrentToolin classInterfaceGraphic<ToolGraph>
-
finishTool
public void finishTool() -
setDefaultTool
- Specified by:
setDefaultToolin interfaceToolable<ToolGraph>- Overrides:
setDefaultToolin classInterfaceGraphic<ToolGraph>
-
isToolable
Description copied from interface:ToolableTests whether this object is toolable bytool- Specified by:
isToolablein interfaceToolable<ToolGraph>- Overrides:
isToolablein classInterfaceGraphic<ToolGraph>- Returns:
-
getDisplayObjectsNode
-
updateFromGraph
public void updateFromGraph() -
updateFromGraph
public void updateFromGraph(int code) -
appendPaintable
public void appendPaintable(edu.uci.ics.jung.visualization.VisualizationServer.Paintable paintable) -
insertPaintable
public void insertPaintable(edu.uci.ics.jung.visualization.VisualizationServer.Paintable paintable) -
handleGraphEvent
public void handleGraphEvent(edu.uci.ics.jung.graph.event.GraphEvent<AbstractGraphNode,AbstractGraphEdge> evt)Handle a graph event on the current ObservableGraph.- Specified by:
handleGraphEventin interfaceedu.uci.ics.jung.graph.event.GraphEventListener<AbstractGraphNode,AbstractGraphEdge>
-
graphUpdated
- Specified by:
graphUpdatedin interfaceInterfaceGraphListener
-
toString
public java.lang.String toString()- Overrides:
toStringin classjava.awt.Component
-
getTitle
public java.lang.String getTitle()- Overrides:
getTitlein classInterfacePanel
-
getEdgeWeightColourMap
-
getDTD
public java.lang.String getDTD()Description copied from interface:XMLObjectReturns 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:XMLObjectReturns the local name associated with this XML object.- Specified by:
getLocalNamein interfaceXMLObject- Returns:
-
getShortXML
public java.lang.String getShortXML(int tab)Description copied from interface:XMLObjectReturns a short XML representation of this object.- Specified by:
getShortXMLin interfaceXMLObject- Returns:
-
getXML
public java.lang.String getXML()Description copied from interface:XMLObjectReturns 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:XMLObjectReturns 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:XMLObjectReturns the XML schema for this object's XML representation- Specified by:
getXMLSchemain interfaceXMLObject- Returns:
-
handleXMLElementEnd
public void handleXMLElementEnd(java.lang.String localName)Description copied from interface:XMLObjectHandles the end of an XML element.- Specified by:
handleXMLElementEndin 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:XMLObjectHandles the start of an XML element.- Specified by:
handleXMLElementStartin interfaceXMLObject- Parameters:
localName- Local name of the elementattributes- Set of element attributestype- TheXMLTypeof this element
-
handleXMLString
public void handleXMLString(java.lang.String s)Description copied from interface:XMLObjectHandles a string within an XML element.- Specified by:
handleXMLStringin 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:XMLObjectWrites 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.Asciiwill be used.
-