de.grogra.imp
Class View
java.lang.Object
de.grogra.pf.ui.PanelDecorator
de.grogra.imp.View
- All Implemented Interfaces:
- Manageable, Context, Panel, Disposable, ModifiableMap.Producer, java.util.EventListener, javax.swing.event.TreeModelListener
- Direct Known Subclasses:
- View3D
public abstract class View
- extends PanelDecorator
- implements EventListener, javax.swing.event.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
Constructor Summary |
View()
|
Method Summary |
void |
addEventListener(EventListener el)
|
void |
addMappings(ModifiableMap out)
|
static View |
create(View view,
Context ctx,
StringMap args)
|
protected abstract ViewEventHandler |
createEventHandler()
|
void |
dispose()
|
static void |
disposeRenderer(Item item,
java.lang.Object info,
Context ctx)
|
void |
eventOccured(java.util.EventObject e)
This method is invoked on registered event listeners when
event has occured. |
void |
fieldModified(PersistenceField field,
int[] indices,
Transaction t)
|
static View |
get(Context c)
|
static View |
get(GraphState gs)
|
Tool |
getActiveTool()
|
float |
getEpsilon()
|
float |
getEpsilonSquared()
|
ViewEventHandler |
getEventHandler()
|
abstract IOFlavor |
getFlavor()
|
Graph |
getGraph()
|
float |
getMagnitude()
|
float |
getMagnitudeSquared()
|
Path |
getPathFor(GraphState gs,
java.lang.Object obj,
boolean node)
|
static Selectable |
getSelectableGraph(Context ctx)
|
static Selectable |
getSelectableLayers(Context ctx)
|
static Selectable |
getSelectableScales(Context ctx)
|
java.awt.Dimension |
getSize()
|
int |
getStamp()
Returns a stamp for this object. |
protected abstract UIProperty |
getToolProperty()
|
ViewComponent |
getViewComponent()
Returns the view component which is used as a GUI component
to perform the actual visualization of the graph. |
static ViewComponent |
getViewComponent(Context c)
|
boolean[] |
getVisibleScales()
|
float |
getVisualEpsilon()
|
float |
getVisualEpsilonSquared()
|
GraphState |
getWorkbenchGraphState()
|
protected void |
initialize(Panel panel,
Map params)
|
protected abstract void |
installImpl()
|
boolean |
isInVisibleLayer(java.lang.Object o,
boolean asNode,
GraphState gs)
|
abstract boolean |
isToolGraph(Graph graph)
|
Manageable |
manageableReadResolve()
|
java.lang.Object |
manageableWriteReplace()
|
abstract void |
pick(int x,
int y,
PickList list)
|
void |
removeEventListener(EventListener el)
|
static void |
render(Item item,
java.lang.Object info,
Context ctx)
|
static void |
renderToFile(Item item,
java.lang.Object info,
Context ctx)
|
protected void |
repaint(int flags)
|
static void |
set(GraphState gs,
View view)
|
void |
setActiveTool(Tool tool)
|
void |
setDimensions(float magnitude)
|
void |
setDimensions(float magnitude,
float epsilon,
float visualEpsilon)
|
void |
setEpsilon(float epsilon)
|
void |
setGraph()
|
void |
setGraph(GraphDescriptor g)
|
void |
setMagnitude(float magnitude)
|
void |
setViewComponent(ViewComponent component)
|
void |
setVisualEpsilon(float visualEpsilon)
|
void |
substituteSelection(GraphState[] gs,
java.lang.Object[] object,
boolean[] asNode,
int index)
|
void |
treeNodesChanged(javax.swing.event.TreeModelEvent e)
|
void |
treeNodesInserted(javax.swing.event.TreeModelEvent e)
|
void |
treeNodesRemoved(javax.swing.event.TreeModelEvent e)
|
void |
treeStructureChanged(javax.swing.event.TreeModelEvent e)
|
protected void |
uninstall()
|
protected abstract void |
uninstallImpl()
|
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, show |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
$TYPE
public static final View.Type $TYPE
COMPONENT
public static final UIProperty COMPONENT
epsilon$FIELD
public static final SCOType.Field epsilon$FIELD
graphDescriptor$FIELD
public static final SCOType.Field graphDescriptor$FIELD
I18N
public static final I18NBundle I18N
listeners
protected final EventListener.Multicaster listeners
LOD_MAX
public static int LOD_MAX
LOD_MIN
public static int LOD_MIN
LOD_TYPE
public static final EnumerationType LOD_TYPE
magnitude$FIELD
public static final SCOType.Field magnitude$FIELD
SCALE_COUNT
public static int SCALE_COUNT
SCALES_CHANGED
public static java.lang.String SCALES_CHANGED
SCALES_VISIBLE
public static java.lang.String SCALES_VISIBLE
visibleLayers$FIELD
public static final SCOType.Field visibleLayers$FIELD
visibleScales$FIELD
public static final SCOType.Field visibleScales$FIELD
visualEpsilon$FIELD
public static final SCOType.Field visualEpsilon$FIELD
View
public View()
addEventListener
public void addEventListener(EventListener el)
addMappings
public void addMappings(ModifiableMap out)
- Specified by:
addMappings
in interface ModifiableMap.Producer
create
public static View create(View view,
Context ctx,
StringMap args)
createEventHandler
protected abstract ViewEventHandler createEventHandler()
dispose
public final void dispose()
- Specified by:
dispose
in interface Disposable
- Overrides:
dispose
in class PanelDecorator
disposeRenderer
public static void disposeRenderer(Item item,
java.lang.Object info,
Context ctx)
eventOccured
public void eventOccured(java.util.EventObject e)
- Description copied from interface:
EventListener
- This method is invoked on registered event listeners when
event
has occured. This general listener interface
does not restrict the possible kinds of events. Concrete sources
of events should specify which events they may fire.
- Parameters:
e
- an event
fieldModified
public void fieldModified(PersistenceField field,
int[] indices,
Transaction t)
- Specified by:
fieldModified
in interface Manageable
get
public static View get(Context c)
get
public static View get(GraphState gs)
getActiveTool
public final Tool getActiveTool()
getEpsilon
public float getEpsilon()
getEpsilonSquared
public float getEpsilonSquared()
getEventHandler
public ViewEventHandler getEventHandler()
getFlavor
public abstract IOFlavor getFlavor()
getGraph
public Graph getGraph()
getMagnitude
public float getMagnitude()
getMagnitudeSquared
public float getMagnitudeSquared()
getPathFor
public Path getPathFor(GraphState gs,
java.lang.Object obj,
boolean node)
getSelectableGraph
public static Selectable getSelectableGraph(Context ctx)
getSelectableLayers
public static Selectable getSelectableLayers(Context ctx)
getSelectableScales
public static Selectable getSelectableScales(Context ctx)
getSize
public java.awt.Dimension getSize()
getStamp
public int getStamp()
- Description copied from interface:
Manageable
- Returns a stamp for this object. Each modification to this object
increments the stamp. The initial stamp is non-negative.
- Specified by:
getStamp
in interface Manageable
- Returns:
- a stamp
getToolProperty
protected abstract UIProperty getToolProperty()
getViewComponent
public ViewComponent 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
getViewComponent
public static ViewComponent getViewComponent(Context c)
getVisibleScales
public boolean[] getVisibleScales()
getVisualEpsilon
public float getVisualEpsilon()
getVisualEpsilonSquared
public float getVisualEpsilonSquared()
getWorkbenchGraphState
public final GraphState getWorkbenchGraphState()
initialize
protected void initialize(Panel panel,
Map params)
installImpl
protected abstract void installImpl()
isInVisibleLayer
public boolean isInVisibleLayer(java.lang.Object o,
boolean asNode,
GraphState gs)
isToolGraph
public abstract boolean isToolGraph(Graph graph)
manageableReadResolve
public Manageable manageableReadResolve()
- Specified by:
manageableReadResolve
in interface Manageable
manageableWriteReplace
public java.lang.Object manageableWriteReplace()
- Specified by:
manageableWriteReplace
in interface Manageable
pick
public abstract void pick(int x,
int y,
PickList list)
removeEventListener
public void removeEventListener(EventListener el)
render
public static void render(Item item,
java.lang.Object info,
Context ctx)
renderToFile
public static void renderToFile(Item item,
java.lang.Object info,
Context ctx)
repaint
protected void repaint(int flags)
set
public static void set(GraphState gs,
View view)
setActiveTool
public final void setActiveTool(Tool tool)
setDimensions
public final void setDimensions(float magnitude)
setDimensions
public final void setDimensions(float magnitude,
float epsilon,
float visualEpsilon)
setEpsilon
public void setEpsilon(float epsilon)
setGraph
public void setGraph()
setGraph
public void setGraph(GraphDescriptor g)
setMagnitude
public void setMagnitude(float magnitude)
setViewComponent
public void setViewComponent(ViewComponent component)
setVisualEpsilon
public void setVisualEpsilon(float visualEpsilon)
substituteSelection
public void substituteSelection(GraphState[] gs,
java.lang.Object[] object,
boolean[] asNode,
int index)
treeNodesChanged
public void treeNodesChanged(javax.swing.event.TreeModelEvent e)
- Specified by:
treeNodesChanged
in interface javax.swing.event.TreeModelListener
treeNodesInserted
public void treeNodesInserted(javax.swing.event.TreeModelEvent e)
- Specified by:
treeNodesInserted
in interface javax.swing.event.TreeModelListener
treeNodesRemoved
public void treeNodesRemoved(javax.swing.event.TreeModelEvent e)
- Specified by:
treeNodesRemoved
in interface javax.swing.event.TreeModelListener
treeStructureChanged
public void treeStructureChanged(javax.swing.event.TreeModelEvent e)
- Specified by:
treeStructureChanged
in interface javax.swing.event.TreeModelListener
uninstall
protected void uninstall()
uninstallImpl
protected abstract void uninstallImpl()