Package mgui.interfaces.shapes.graphs
Class Graph2DInt
java.lang.Object
mgui.interfaces.AbstractInterfaceObject
mgui.interfaces.shapes.InterfaceShape
mgui.interfaces.shapes.Shape2DInt
mgui.interfaces.shapes.PointSet2DInt
mgui.interfaces.shapes.graphs.Graph2DInt
- All Implemented Interfaces:
edu.uci.ics.jung.graph.event.GraphEventListener<AbstractGraphNode,AbstractGraphEdge>
,java.awt.datatransfer.Transferable
,java.lang.Cloneable
,java.lang.Comparable<InterfaceShape>
,java.util.EventListener
,AttributeListener
,AttributeObject
,InterfaceObject
,PersistentObject
,VariableObject
,PopupMenuObject
,NamedObject
,InterfaceQueryObject
,InterfaceShapeQueryObject
,ShapeListener
,VertexDataColumnListener
,InterfaceTransferable
,TreeObject
,CleanableObject
,XMLObject
,IconObject
public class Graph2DInt extends PointSet2DInt implements edu.uci.ics.jung.graph.event.GraphEventListener<AbstractGraphNode,AbstractGraphEdge>
Graph shape represented in R2. A 3D graph will render on a section by first selecting only
those vertices contained by the section extents.
- Since:
- 1.0
- Version:
- 1.0
- Author:
- Andrew Reid
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected class
Graph2DInt.DrawingTransformer
protected class
Graph2DInt.RenderServer
Nested classes/interfaces inherited from class mgui.interfaces.shapes.InterfaceShape
InterfaceShape.VertexDataSet
Nested classes/interfaces inherited from interface mgui.interfaces.xml.XMLObject
XMLObject.XMLEncoding, XMLObject.XMLType
-
Field Summary
Fields Modifier and Type Field Description protected Graph2DInt.DrawingTransformer
drawing_transformer
protected GraphFunctions.GraphEdgeLabelRenderer
edge_label_renderer
protected Graph2DLayout<AbstractGraphNode,AbstractGraphEdge>
graph_layout
protected edu.uci.ics.jung.visualization.renderers.Renderer.VertexLabel.Position
label_position
protected edu.uci.ics.jung.graph.ObservableGraph<AbstractGraphNode,AbstractGraphEdge>
observable_graph
protected GraphFunctions.ArrowVisibility
show_arrows
protected GraphFunctions.EdgeVisibility
show_edges
protected GraphFunctions.NodeVisibility
show_vertices
protected edu.uci.ics.jung.visualization.renderers.DefaultVertexLabelRenderer
vertex_label_color_renderer
protected GraphFunctions.GraphNodeLabelRenderer
vertex_label_renderer
protected java.util.HashMap<AbstractGraphNode,java.lang.Integer>
vertex_map
protected Graph2DInt.RenderServer
view_server
Fields inherited from class mgui.interfaces.shapes.PointSet2DInt
constraints, nameMaps
Fields inherited from class mgui.interfaces.shapes.Shape2DInt
bounds, centerPt, child3D, drawEngine, idStr, map_idx_to_parent, nodeListener, parentShape, sceneNode, thisShape
Fields inherited from class mgui.interfaces.shapes.InterfaceShape
attributes, data_columns, icon, ID, is_auxiliary, is_registered, isDrawable, isImageShape, isLight, isOverridden, last_column_added, last_column_changed, last_column_removed, linked_colour_maps, loader_options, notifyListeners, overrideAttr, parent_set, selected_nodes, shapeListeners, vertex_data, writer_options, xml_current_column, xml_current_loader, xml_current_shape, xml_current_shape_options, xml_current_type, xml_current_url, xml_is_vertex_data, xml_root_dir
Fields inherited from class mgui.interfaces.AbstractInterfaceObject
isDestroyed, tree_nodes
-
Constructor Summary
Constructors Constructor Description Graph2DInt()
Graph2DInt(Graph2D graph, Graph2DLayout<AbstractGraphNode,AbstractGraphEdge> layout)
Graph2DInt(Graph2D graph, Graph2DLayout<AbstractGraphNode,AbstractGraphEdge> layout, java.util.HashMap<AbstractGraphNode,java.lang.Integer> index_map)
-
Method Summary
Modifier and Type Method Description void
attributeUpdated(AttributeEvent event)
Responds to a change in a specific attribute by notifying this ShapeInt's shape listeners with anAttributeModified
shape event.void
draw(java.awt.Graphics2D g, DrawingEngine d)
java.awt.Color
getEdgeColour(AbstractGraphEdge edge)
protected java.awt.Stroke
getEdgeStroke(AbstractGraphEdge edge)
ColourMap
getEdgeWeightColourMap()
java.awt.Color
getVertexColour(AbstractGraphNode node)
float
getVertexScale(AbstractGraphNode node)
protected NodeShape
getVertexShape(AbstractGraphNode vertex)
void
handleGraphEvent(edu.uci.ics.jung.graph.event.GraphEvent<AbstractGraphNode,AbstractGraphEdge> evt)
void
setGraph(Graph2D graph2d)
void
setShape(Shape2D shape)
void
updateShape()
Methods inherited from class mgui.interfaces.shapes.PointSet2DInt
getColourMap, getCurrentColumn, getDataMax, getDataMin, getLabelPosition, getPointSet, getVertexScale, isInheritingAttribute, needsRedraw, setColourMap, setColourMap, setDataMax, setDataMin, setIcon
Methods inherited from class mgui.interfaces.shapes.Shape2DInt
addVertexData, addVertexData, addVertexData, addVertexData, clone, contains, destroy, destroy, drawShape2D, fireShapeListeners, getAllVertexData, getAlpha, getBounds, getBoundShape, getCenterPoint, getChild3D, getClosestVertex, getClosestVertex3D, getCurrentVertexData, getDatumAtVertex, getDimensions, getDTD, getExtBounds, getGeometry, getGeometryInstance, getLabelColour, getLabelFont, getLabelScale, getLineColour, getLineStyle, getLinkedVertexData, getLinkedVertexDatum, getLocalName, getMapIdxToParent, getModifiedAttribute, getNonLinkedDataColumns, getParentAttribute, getParentShape, getPopupMenu, getPopupMenu, getProximity, getShape, getShape3D, getShape3DInt, getShape3DInt, getShortXML, getTransferData, getTransferDataFlavors, getTreeLabel, getVertex, getVertexColour, getVertexCount, getVertexData, getVertexDataColumn, getVertexDataColumnNames, getVertexDataColumns, getVertexDataMap, getVertexSelection, getVertexShape, getVertices, getVisibility, handlePopupEvent, hasAlpha, hasAlpha, hasColumn, hasData, hasParentShape, isDataFlavorSupported, isHeritableAttribute, isLabelShape, issueTreeNode, performTransfer, printNodes, removeVertexData, setAlpha, setChild3D, setCurrentColumn, setCurrentColumn, setGeometry, setGraphic2DPopupMenu, setLabelColour, setLabelFont, setLabelScale, setLineStyle, setMapIdxToParent, setParentShape, setTreeNode, setVertexDataMap, setVertexSelection, setVertexShape, shapeUpdated, showPopupMenu, showVertices, showVertices, toString, updateDataColumns, validateNodes, writeShapeToXML, writeXML
Methods inherited from class mgui.interfaces.shapes.InterfaceShape
_init, addDataLink, addShapeListener, addVertexData, addVertexData, addVertexData, addVertexData, addVertexData, cleanTreeNodes, compareTo, copyAttributes, finalizeAfterXML, fireShapeModified, fromVariable, getAttribute, getAttributes, getAttributeValue, getByReferenceUrls, getColourMap, getConstraint, getConstraints, getCurrentDataColumn, getDataLink, getDatumAtVertex, getDefaultColourMap, getFileLoader, getFileWriter, getFullName, getID, getInheritedAttribute, getInheritedAttributes, getInheritedAttributeValue, getLastColumnAdded, getLastColumnChanged, getLastColumnRemoved, getLegalName, getLoaderOptions, getModel, getName, getNameMap, getNameMap, getObjectIcon, getParentSet, getSourceURL, getUnit, getUrlReference, getVariables, getVariableType, getVariableValue, getVariableValues, getVertexData, getVertexDataColumnCount, getWriterOptions, getXML, getXML, getXML, getXMLSchema, handleXMLElementEnd, handleXMLElementStart, handleXMLString, hasAttribute, inheritAttributesFromParent, isAuxiliaryShape, isAuxiliaryShape, isDestroyed, isDrawable, isImageShape, isLegalName, isLight, isSelectable, isVisible, newVertexData, queryObject, queryShapeAtVertex, register, removeColourMap, removeDataLink, removeNameMap, removeShapeListener, renameVertexDataColumn, setAttribute, setAttributes, setColourMap, setConstraint, setDataMax, setDataMax, setDataMin, setDataMin, setDatumAtVertex, setDatumAtVertex, setDatumAtVertex, setDatumAtVertex, setDefaultColourMap, setDefaultColourMap, setFileLoader, setFileLoader, setFileWriter, setID, setLoaderOptions, setName, setNameMap, setOverride, setParentSet, setSelectable, setUnit, setUrlReference, setVariableValues, setVariableValues, setVertexData, setVertexData, setVertexData, setVisible, setWriterOptions, setXMLRoot, show2D, show2D, show3D, show3D, showData, showData, supportsVariableType, toVariable, unsetOverride, vertexDataColumnChanged, vertexDataColumnColourMapChanged, writeXML, writeXML
Methods inherited from class mgui.interfaces.AbstractInterfaceObject
clean, updateTreeNodes
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface mgui.interfaces.util.CleanableObject
clean
Methods inherited from interface mgui.interfaces.shapes.util.ShapeListener
isDestroyed
-
Field Details
-
vertex_map
-
drawing_transformer
-
view_server
-
graph_layout
-
observable_graph
protected edu.uci.ics.jung.graph.ObservableGraph<AbstractGraphNode,AbstractGraphEdge> observable_graph -
show_edges
-
show_arrows
-
show_vertices
-
label_position
protected edu.uci.ics.jung.visualization.renderers.Renderer.VertexLabel.Position label_position -
vertex_label_renderer
-
edge_label_renderer
-
vertex_label_color_renderer
protected edu.uci.ics.jung.visualization.renderers.DefaultVertexLabelRenderer vertex_label_color_renderer
-
-
Constructor Details
-
Graph2DInt
public Graph2DInt() -
Graph2DInt
-
Graph2DInt
public Graph2DInt(Graph2D graph, Graph2DLayout<AbstractGraphNode,AbstractGraphEdge> layout, java.util.HashMap<AbstractGraphNode,java.lang.Integer> index_map)
-
-
Method Details
-
setShape
- Overrides:
setShape
in classShape2DInt
-
setGraph
-
draw
- Overrides:
draw
in classPointSet2DInt
-
attributeUpdated
Description copied from class:Shape2DInt
Responds to a change in a specific attribute by notifying this ShapeInt's shape listeners with anAttributeModified
shape event. If overriding, this super method should be called AFTER the special handling has been performed.- Specified by:
attributeUpdated
in interfaceAttributeListener
- Overrides:
attributeUpdated
in classShape2DInt
-
updateShape
public void updateShape()- Overrides:
updateShape
in classShape2DInt
-
handleGraphEvent
public void handleGraphEvent(edu.uci.ics.jung.graph.event.GraphEvent<AbstractGraphNode,AbstractGraphEdge> evt)- Specified by:
handleGraphEvent
in interfaceedu.uci.ics.jung.graph.event.GraphEventListener<AbstractGraphNode,AbstractGraphEdge>
-
getEdgeWeightColourMap
-
getEdgeStroke
-
getVertexShape
- Overrides:
getVertexShape
in classPointSet2DInt
-
getVertexScale
-
getVertexColour
-
getEdgeColour
-