Module imp
Package de.grogra.imp

Class View

All Implemented Interfaces:
Manageable, Context, Panel, Disposable, EventListener, ModifiableMap.Producer, EventListener, TreeModelListener
Direct Known Subclasses:
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
  • 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

      public static String SCALES_CHANGED
    • SCALES_VISIBLE

      public static String SCALES_VISIBLE
    • I18N

      public static final I18NBundle I18N
    • LOD_TYPE

      public static final EnumerationType LOD_TYPE
    • STEREO_VIEW_TYPE

      public static final EnumerationType STEREO_VIEW_TYPE
    • VIEW_PREVIEW1_TYPE

      public static final EnumerationType VIEW_PREVIEW1_TYPE
    • VIEW_PREVIEW2_TYPE

      public static final EnumerationType VIEW_PREVIEW2_TYPE
    • ANAGLYPH_VIEW_TYPE

      public static final EnumerationType ANAGLYPH_VIEW_TYPE
    • COMPONENT

      public static final UIProperty COMPONENT
    • listeners

      protected final EventListener.Multicaster listeners
    • $TYPE

      public static final View.Type $TYPE
    • graphDescriptor$FIELD

      public static final SCOType.Field graphDescriptor$FIELD
    • visibleScales$FIELD

      public static final SCOType.Field visibleScales$FIELD
    • visibleLayers$FIELD

      public static final SCOType.Field visibleLayers$FIELD
    • epsilon$FIELD

      public static final SCOType.Field epsilon$FIELD
    • visualEpsilon$FIELD

      public static final SCOType.Field visualEpsilon$FIELD
    • magnitude$FIELD

      public static final SCOType.Field magnitude$FIELD
  • Constructor Details

    • View

      public View()
  • Method Details

    • get

      public static View get(Context c)
    • get

      public static View get(GraphState gs)
    • set

      public static void set(GraphState gs, View view)
    • getViewComponent

      public static ViewComponent getViewComponent(Context c)
    • create

      public static View create(View view, Context ctx, StringMap args)
    • getSelectableGraph

      public static Selectable getSelectableGraph(Context ctx)
    • getSelectableLayers

      public static Selectable getSelectableLayers(Context ctx)
    • getSelectableScales

      public static Selectable getSelectableScales(Context ctx)
    • getToolProperty

      protected abstract UIProperty getToolProperty()
    • getViewEventFactoryProperty

      protected abstract UIProperty getViewEventFactoryProperty()
    • getResolutionProperty

      public abstract UIProperty getResolutionProperty()
    • getFlavor

      public abstract IOFlavor getFlavor()
    • addToolListener

      public DisposableEventListener addToolListener(View view, UIProperty tool)
    • setGraph

      public void setGraph()
    • setGraph

      public void setGraph(GraphDescriptor g)
    • uninstall

      protected void uninstall()
    • getGraph

      public Graph getGraph()
    • getWorkbenchGraphState

      public final GraphState getWorkbenchGraphState()
    • substituteSelection

      public void substituteSelection(GraphState[] gs, Object[] object, boolean[] asNode, int index)
    • getPathFor

      public Path getPathFor(GraphState gs, Object obj, boolean node)
    • getEventHandler

      public ViewEventHandler getEventHandler()
    • addMappings

      public void addMappings(ModifiableMap out)
      Specified by:
      addMappings in interface ModifiableMap.Producer
    • initialize

      public Panel initialize(Panel panel, Map params)
      Specified by:
      initialize in interface Panel
      Overrides:
      initialize in class PanelDecorator
    • installImpl

      protected abstract void installImpl()
    • pick

      public abstract void pick(int x, int y, PickList list)
    • pickTool

      public abstract void pickTool(int x, int y, PickList list)
    • isToolGraph

      public abstract boolean isToolGraph(Graph graph)
    • addEventListener

      public void addEventListener(EventListener el)
    • removeEventListener

      public void removeEventListener(EventListener el)
    • dispose

      public final void dispose()
      Specified by:
      dispose in interface Disposable
      Overrides:
      dispose in class PanelDecorator
    • uninstallImpl

      protected abstract void uninstallImpl()
    • createEventHandler

      protected abstract ViewEventHandler createEventHandler()
    • setViewComponent

      public void setViewComponent(ViewComponent component)
    • 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
    • setActiveTool

      public final void setActiveTool(Tool tool)
    • getActiveTool

      public final Tool getActiveTool()
    • treeNodesChanged

      public void treeNodesChanged(TreeModelEvent e)
      Specified by:
      treeNodesChanged in interface TreeModelListener
    • treeNodesInserted

      public void treeNodesInserted(TreeModelEvent e)
      Specified by:
      treeNodesInserted in interface TreeModelListener
    • treeNodesRemoved

      public void treeNodesRemoved(TreeModelEvent e)
      Specified by:
      treeNodesRemoved in interface TreeModelListener
    • treeStructureChanged

      public void treeStructureChanged(TreeModelEvent e)
      Specified by:
      treeStructureChanged in interface TreeModelListener
    • eventOccured

      public void eventOccured(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.
      Specified by:
      eventOccured in interface EventListener
      Parameters:
      e - an event
    • repaint

      protected void repaint(int flags)
    • render

      public static void render(Item item, Object info, Context ctx)
    • renderToFile

      public static void renderToFile(Item item, Object info, Context ctx)
    • disposeRenderer

      public static void disposeRenderer(Item item, Object info, Context ctx)
    • 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

      public void fieldModified(PersistenceField field, int[] indices, Transaction t)
      Specified by:
      fieldModified in interface Manageable
    • 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
    • manageableReadResolve

      public Manageable manageableReadResolve()
      Specified by:
      manageableReadResolve in interface Manageable
    • manageableWriteReplace

      public Object manageableWriteReplace()
      Specified by:
      manageableWriteReplace in interface Manageable
    • isInVisibleLayer

      public boolean isInVisibleLayer(Object o, boolean asNode, GraphState gs)
    • getVisibleLayers

      public boolean[] getVisibleLayers()
    • setVisibleLayers

      public void setVisibleLayers(boolean[] l)
    • isInVisibleScale

      public boolean isInVisibleScale(Object o, boolean asNode, GraphState gs)
    • getSize

      public Dimension 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.