java.lang.Object
de.grogra.pf.ui.PanelDecorator
de.grogra.imp.View
- All Implemented Interfaces:
Manageable,Context,Panel,Disposable,EventListener,ModifiableMap.Producer,EventListener,TreeModelListener
- Direct Known Subclasses:
SocketView,View2D,View3D
public abstract class View
extends PanelDecorator
implements EventListener, TreeModelListener, ModifiableMap.Producer, Manageable
A
View is a Panel which represents
a Graph in geometrical-graphical way
(e.g., using two- or three-dimensional graphics).
View is a subclass of PanelDecorator:
As such, it implements some common operations of views, while
the actual GUI component is provided by the decorated panel.- Author:
- Ole Kniemeyer
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface de.grogra.util.EventListener
EventListener.Bicast, EventListener.Multicaster -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final View.Typestatic intstatic final EnumerationTypestatic final UIPropertystatic final SCOType.Fieldstatic final SCOType.Fieldstatic final I18NBundleprotected final EventListener.Multicasterstatic intstatic intstatic final EnumerationTypestatic final SCOType.Fieldprotected OverlayA list of Objects to be displayed in the view as Overlay (i.e. on top of the scene).static intstatic intstatic Stringstatic Stringprotected intprotected intprotected intprotected intstatic intstatic final EnumerationTypestatic final EnumerationTypestatic final EnumerationTypestatic final SCOType.Fieldstatic final SCOType.Fieldstatic final SCOType.FieldFields inherited from class de.grogra.pf.ui.PanelDecorator
decorator, panelFields inherited from interface de.grogra.pf.ui.Panel
DEC_WAIT_CURSOR, DEFAULT_CURSOR, INC_WAIT_CURSOR, INHERIT_CURSOR, PANEL_ID, WAIT_CURSOR -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidaddMappings(ModifiableMap out) addToolListener(View view, UIProperty tool) static Viewprotected abstract ViewEventHandlerstatic voidfinal voiddispose()static voiddisposeRenderer(Item item, Object info, Context ctx) protected voidstatic voidvoidThis method is invoked on registered event listeners wheneventhas occured.voidfieldModified(PersistenceField field, int[] indices, Transaction t) static Viewget(GraphState gs) static Viewfinal Toolfloatfloatabstract IOFlavorgetGraph()floatfloatPath[]Get nodes from the ProjectGraph that are in the overlay projection.getPathFor(GraphState gs, Object obj, boolean node) abstract UIPropertystatic Selectablestatic Selectablestatic SelectablegetSize()intgetStamp()Returns a stamp for this object.protected abstract UIPropertyReturns the view component which is used as a GUI component to perform the actual visualization of the graph.static ViewComponentprotected abstract UIPropertyboolean[]boolean[]floatfloatfinal GraphStateinitialize(Panel panel, Map params) protected abstract voidbooleanisInVisibleLayer(Object o, boolean asNode, GraphState gs) booleanisInVisibleScale(Object o, boolean asNode, GraphState gs) static booleanabstract booleanisToolGraph(Graph graph) voidnextTool()Set the next ToolFactory from the getToolProperty to be active.abstract voidabstract voidvoidstatic voidstatic voidrenderToFile(Item item, Object info, Context ctx) protected voidrepaint(int flags) voidrepaintOverlay(boolean finished) static voidset(GraphState gs, View view) final voidsetActiveTool(Tool tool) final voidsetDimensions(float magnitude) final voidsetDimensions(float magnitude, float epsilon, float visualEpsilon) voidsetEpsilon(float epsilon) voidsetGraph()voidvoidsetMagnitude(float magnitude) voidsetViewComponent(ViewComponent component) voidsetVisibleLayers(boolean[] l) voidsetVisualEpsilon(float visualEpsilon) voidsubstituteSelection(GraphState[] gs, Object[] object, boolean[] asNode, int index) voidvoidvoidvoidprotected voidprotected abstract voidvoidZoom to match the overlay shape.Methods inherited from class de.grogra.pf.ui.PanelDecorator
checkClose, getComponent, getContent, getDecorator, getMenu, getPanel, getPanelId, getUIPropertyMap, getWindow, getWorkbench, initDecorator, initPanel, resolve, setContent, setCursor, setMenu, showMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface de.grogra.persistence.Manageable
getManageableType
-
Field Details
-
LOD_MIN
public static int LOD_MIN -
LOD_MAX
public static int LOD_MAX -
STEREO_MAX
public static int STEREO_MAX -
PREVIEW_MAX
public static int PREVIEW_MAX -
ANAGLYPH_MAX
public static int ANAGLYPH_MAX -
SCALE_COUNT
public static int SCALE_COUNT -
SCALES_CHANGED
-
SCALES_VISIBLE
-
I18N
-
LOD_TYPE
-
STEREO_VIEW_TYPE
-
VIEW_PREVIEW1_TYPE
-
VIEW_PREVIEW2_TYPE
-
ANAGLYPH_VIEW_TYPE
-
COMPONENT
-
sel1x
protected int sel1x -
sel1y
protected int sel1y -
sel2x
protected int sel2x -
sel2y
protected int sel2y -
listeners
-
overlay
A list of Objects to be displayed in the view as Overlay (i.e. on top of the scene). -
$TYPE
-
graphDescriptor$FIELD
-
visibleScales$FIELD
-
visibleLayers$FIELD
-
epsilon$FIELD
-
visualEpsilon$FIELD
-
magnitude$FIELD
-
-
Constructor Details
-
View
public View()
-
-
Method Details
-
get
-
get
-
set
-
getViewComponent
-
create
-
getSelectableGraph
-
getSelectableLayers
-
getSelectableScales
-
getToolProperty
-
getViewEventFactoryProperty
-
getResolutionProperty
-
getFlavor
-
addToolListener
-
setGraph
public void setGraph() -
setGraph
-
uninstall
protected void uninstall() -
getGraph
-
getWorkbenchGraphState
-
substituteSelection
-
getPathFor
-
getEventHandler
-
addMappings
- Specified by:
addMappingsin interfaceModifiableMap.Producer
-
initialize
- Specified by:
initializein interfacePanel- Overrides:
initializein classPanelDecorator
-
installImpl
protected abstract void installImpl() -
pick
-
pickTool
-
isToolGraph
-
addEventListener
-
removeEventListener
-
dispose
public final void dispose()- Specified by:
disposein interfaceDisposable- Overrides:
disposein classPanelDecorator
-
disposeViewComponent
protected void disposeViewComponent() -
uninstallImpl
protected abstract void uninstallImpl() -
createEventHandler
-
setViewComponent
-
getViewComponent
Returns the view component which is used as a GUI component to perform the actual visualization of the graph.- Returns:
- view component of the GUI
-
setActiveTool
-
getActiveTool
-
treeNodesChanged
- Specified by:
treeNodesChangedin interfaceTreeModelListener
-
treeNodesInserted
- Specified by:
treeNodesInsertedin interfaceTreeModelListener
-
treeNodesRemoved
- Specified by:
treeNodesRemovedin interfaceTreeModelListener
-
treeStructureChanged
- Specified by:
treeStructureChangedin interfaceTreeModelListener
-
eventOccured
Description copied from interface:EventListenerThis method is invoked on registered event listeners wheneventhas occured. This general listener interface does not restrict the possible kinds of events. Concrete sources of events should specify which events they may fire.- Specified by:
eventOccuredin interfaceEventListener- Parameters:
e- an event
-
repaint
protected void repaint(int flags) -
render
-
renderToFile
-
disposeRenderer
-
setDimensions
public final void setDimensions(float magnitude) -
setDimensions
public final void setDimensions(float magnitude, float epsilon, float visualEpsilon) -
setEpsilon
public void setEpsilon(float epsilon) -
setVisualEpsilon
public void setVisualEpsilon(float visualEpsilon) -
setMagnitude
public void setMagnitude(float magnitude) -
getEpsilonSquared
public float getEpsilonSquared() -
getVisualEpsilonSquared
public float getVisualEpsilonSquared() -
getMagnitudeSquared
public float getMagnitudeSquared() -
fieldModified
- Specified by:
fieldModifiedin interfaceManageable
-
getStamp
public int getStamp()Description copied from interface:ManageableReturns a stamp for this object. Each modification to this object increments the stamp. The initial stamp is non-negative.- Specified by:
getStampin interfaceManageable- Returns:
- a stamp
-
manageableReadResolve
- Specified by:
manageableReadResolvein interfaceManageable
-
manageableWriteReplace
- Specified by:
manageableWriteReplacein interfaceManageable
-
isInVisibleLayer
-
getVisibleLayers
public boolean[] getVisibleLayers() -
setVisibleLayers
public void setVisibleLayers(boolean[] l) -
isInVisibleScale
-
getSize
-
getVisibleScales
public boolean[] getVisibleScales() -
getEpsilon
public float getEpsilon() -
getVisualEpsilon
public float getVisualEpsilon() -
getMagnitude
public float getMagnitude() -
disableRepaint
public static void disableRepaint() -
enableRepaint
public static void enableRepaint() -
isRepaint
public static boolean isRepaint() -
nextTool
public void nextTool()Set the next ToolFactory from the getToolProperty to be active. Loop on the ToolFactories defined. -
getOverlay
-
repaintOverlay
public void repaintOverlay(boolean finished) -
getNodeInOverlayProjection
Get nodes from the ProjectGraph that are in the overlay projection. -
zoomInOverlay
public void zoomInOverlay()Zoom to match the overlay shape.
-