com.tensegrity.composite
Interface CompositeView

All Superinterfaces:
BaseCompositeContainer, CompositeNavigatorProvider, InteractionProvider, Observable
All Known Subinterfaces:
VisualGraphView

public interface CompositeView
extends BaseCompositeContainer, CompositeNavigatorProvider, InteractionProvider, Observable

This interface represents the top-level BaseCompositeContainer in a tree of like-kind containers. Clients will reference this interface type explicitly because it declares methods needed at the very top of the hierarchy. Moreover, a CompositeView merges several basic interfaces and offers special support for handling objects of type BaseComposite. This interface is a mighty specification: the classes which implement it are basically responsible for performing all drawing, event-handling, selection and notification tasks necessary for a top-level view container. Class Diagram CompositeView

It should come as no surprise, then, that this interface is merged into the interface specification for VisualGraphView. This allows clients to speak to a top-level VisualGraph as if it were a CompositeView by nature.

Two methods deal with the layered positioning of contained BaseComposite instances:

Additionally, this interface specifies that Primitive objects can be used to draw a title and other background graphics, objects which should not respond to mouse events. In other words, these primitives should only be used for the view's static adornment. The methods to manage these Primitive objects are:

A CompositeView has both a CoordinateSystem and its own BoundingBox which allows it to scale and position all child composites contained below it. The relevant methods are:

In addition to its own CoordinateSystem, a CompositeView uses a second instance, which it calls the "reference coordinate system." This CoordinateSystem is used to define how much of the view area should be visible within the viewport of the CompositeView. The following method is used to retrieve this CoordinateSystem.

A CompositeView also supports different modes which can be externally configured. These modes and the constants that specify them are:

The modes described above may be combined. The methods to set the mode mask are:

Because it is possible that the view area of CompositeView is much larger than the drawing area, scrollbars are usually needed to make the entire view area visible to the user. Since scrollbars cannot be attached to a CompositeView, the relevant scroll information can nevertheless be provided to an object that requires it. These are the methods to call:

A CompositeView can also be scaled. Here are the methods that deal with this aspect:

Drawing Primitive and BaseComposite objects are performed with the help of a Renderer and Device component. The method to draw is:

A CompositeView will draw the following objects in the order specified:

  1. Contained Primitive instances
  2. Contained BaseComposite instances
  3. Selected BaseComposite instances
  4. Contained BaseComposite indicators

A CompositeView supports user interaction by extending the InteractionProvider interface. In order to plug additional interaction behavior into an instance, you must register a CompositeInteractionHandler that is invoked by the CompositeView whenever some form of user interaction takes place. The table below gives information about how method calls are delegated.

Method of class CompositeView Invoked method of class CompositeInteractionHandler
startActionAt startActionAt
stopActionAt stopActionAt
actAt preActAt
actAt actAt
For more information, please refer to the JavaDoc of interface CompositeInteractionHandler.

As a container of BaseComposite objects, a CompositeView will mediate all occurring events propagated by objects of type Composite, CompositeLine, CompositeGroup and, of course, its own type (CompositeView).

To be informed about these events, one must add an EventMediatorListener or a VetoableEventMediatorListener to a CompositeView instance.

The following interfaces can provide you with more information about the event mediator mechanism: EventMediator, EventMediatorListener, VetoableEventMediator, VetoableEventMediatorListener.

The relevant event mediation methods are:

Events are delivered in the following order:
  1. VetoableCompositeLineListener, VetoableCompositeListener, VetoableCompositeGroupListener
  2. VetoableEventMediatorListener
  3. CompositeLineListener, CompositeListener, CompositeGroupListener
  4. EventMediatorListener

A CompositeView object fires events for every conceivable change that can happen to it. In order to be notified about the occurrence of these events, an object which implements the CompositeViewListener interface must be registered with an instance of this class.

Some of the events fired by a CompositeView may be vetoed, which means that the processing of an event can be stopped. To veto an event, one must register a VetoableCompositeViewListener with an instance of this class.

The event-throwing mechanism of a CompositeView can be turned on and off. By invoking the enableEvents method and supplying the specific event mask, you can control which events are thrown. A call to disableEvents, on the other hand, suitably turns off the specified events marked by the event mask parameter.

By default all events are turned on. To determine which events are enabled or disabled, you can invoke the areEventsEnabled method. The event masks are defined by an enumeration in this interface or in an interface that extends this one. Event mask names always start with the EVENT_MASK prefix. The methods a CompositeView exposes to support the event mechanism are:

This interface extends BaseCompositeContainer so that implementations are forced to manage BaseComposite instances. These instances should be used as delegates, which means they should be told to draw themselves, react to mouse events and perform other tasks via delegation.

Version:
$Id: CompositeView.java,v 1.123 2006/03/23 11:09:54 MichaelKegel Exp $
Author:
MichaelKegel

Field Summary
static java.lang.Object CURSOR_KEY_MOVE
          key definition for a certain cursor
static int CURSOR_MOVE
          constant that defines a certain cursor
static int DELEGATE_INFOVALUE
          constant that identifies the type of the info value associated with the CompositeView
static java.lang.Object DRAGREPRESENTAION_KEY_MOVE_MULTI
          key definition for the multi move drag representation which is displayed when multiple Composite objects get moved around by user interaction and the 'fixed interactables mode' is enabled
static java.lang.Object DRAGREPRESENTAION_KEY_MOVE_SINGLE
          key definition for the single move drag representation which is displayed when a single Composite gets moved around by user interaction and the 'fixed interactables mode' is enabled
static java.lang.Object DRAGREPRESENTATION_KEY_MOVE_LINE
          key definition for the drag representation which is dispayed when a CompositeLine gets moved around by a user interaction and the 'fixed interactables mode' is enabled
static int DRAWFLAG_ALL
          Bits that specify what should be drawn.
static int DRAWFLAG_COMPOSITES_DRAGGED
          Bits that specify what should be drawn.
static int DRAWFLAG_CONTENT_EDGES
          Bits that specify what should be drawn.
static int DRAWFLAG_CONTENT_NODES
          Bits that specify what should be drawn.
static int DRAWFLAG_CONTENT_PORTS
          Bits that specify what should be drawn.
static int DRAWFLAG_CONTENT_PRIMITIVES
          Bits that specify what should be drawn.
static int DRAWFLAG_CONTENT_SELECTED_EDGES
          Bits that specify what should be drawn.
static int DRAWFLAG_CONTENT_SELECTED_NODES
          Bits that specify what should be drawn.
static int DRAWFLAG_CONTENT_SELECTED_PRIMITIVES
          Bits that specify what should be drawn.
static int DRAWFLAG_INDICATORS
          Bits that specify what should be drawn.
static int DRAWFLAG_INTERACTION_CONTEXT
          Bits that specify what should be drawn.
static int DRAWFLAG_NOEXPORT
          Bits that specify what should be drawn.
static int DRAWFLAG_VIEW_BACKGROUND
          Bits that specify what should be drawn.
static int DRAWFLAG_VIEW_GRID
          Bits that specify what should be drawn.
static int DRAWFLAG_VIEW_PRIMITIVES
          Bits that specify what should be drawn.
static int DRAWFLAG_VIEW_RULER
          Bits that specify what should be drawn.
static int EVENT_MASK_ADD_COMPOSITE
          enumeration for setting event masks for the different type of events.
static int EVENT_MASK_ADD_COMPOSITES
          enumeration for setting event masks for the different type of events.
static int EVENT_MASK_COMPOSITEORDER_CHANGED
          enumeration for setting event masks for the different type of events.
static int EVENT_MASK_MODE_CHANGED
          enumeration for setting event masks for the different type of events.
static int EVENT_MASK_REMOVE_COMPOSITE
          enumeration for setting event masks for the different type of events.
static int EVENT_MASK_REMOVE_COMPOSITES
          enumeration for setting event masks for the different type of events.
static int EVENT_MASK_SELECTION_CHANGED
          enumeration for setting event masks for the different type of events.
static int EVENT_MASK_VIEW_SCROLLED
          enumeration for setting event masks for the different type of events.
static int EVENT_MASK_VIEWPARAMETER_CHANGED
          enumeration for setting event masks for the different type of events.
static int GENERAL_INFOVALUE
          constant that identifies the type of the info value associated with the CompositeView
static java.lang.Object HIGHLIGHT_KEY_MOVE
          key definition for the highlight a Composite gets surrounded by when it gets moved around by a user interaction
static java.lang.String MODE
          MODE: Constant for the mode attribute in the mode paint attribute set returned by getModePaints()
static java.lang.String MODE_MASK
          MODE_MASK: Constant for the mode mask attribute in the mode paint attribute set returned by getModePaints()
static int MODE_MASK_ALL
          Indicating that all modes are set.
static int MODE_MASK_CONTEXT_MENU_ALLOWED
          Indicating that the context menu is enabled / disabled.
static int MODE_MASK_EDITING_ALLOWED
          Indicating that the editing of inlying BaseComposite objects is allowed.
static int MODE_MASK_NONE
          Indicating that no mode is set.
static int MODE_MASK_SELECTION_ALLOWED
          Indicating that selections of inlying Composite respectively Primitive objects are allowed.
static int MODE_MASK_SELECTIONBOX
          Indicating the mode mask for rectangular selections.
static java.lang.String MODE_PAINT
          MODE_PAINT: Constant for the mode paint attribute set in the set returned by getModePaints()
static int NON_INFOVALUE
          constant that identifies the type of the info value associated with the CompositeView
static java.lang.String PAINT
          PAINT: Constant for the paint attribute in the mode paint attribute set returned by getModePaints()
static int SCROLLBAR_EXTEND
          constant that tells about an index within a scrollbar values array returned by getHorizontalScrollbarValues() and getVerticalScrollbarValues().
static int SCROLLBAR_MAXIMUM
          constant that tells about an index within a scrollbar values array returned by getHorizontalScrollbarValues() and getVerticalScrollbarValues().
static int SCROLLBAR_MINIMUM
          constant that tells about an index within a scrollbar values array returned by getHorizontalScrollbarValues() and getVerticalScrollbarValues().
static int SCROLLBAR_VALUE
          constant that tells about an index within a scrollbar values array returned by getHorizontalScrollbarValues() and getVerticalScrollbarValues().
 
Fields inherited from interface com.tensegrity.composite.CompositeNavigatorProvider
VIEW_SCALE_X, VIEW_SCALE_Y, VIEW_TRANSLATION_X, VIEW_TRANSLATION_Y, VIEWPORT_SCALE_X, VIEWPORT_SCALE_Y, VIEWPORT_TRANSLATION_X, VIEWPORT_TRANSLATION_Y
 
Method Summary
 void addCompositeViewListener(CompositeViewListener listener)
          Adds the given CompositeViewListener to the CompositeViews internal structure, such that the listener is informed about every event that occurs.
 void addDragComposite(BaseComposite composite)
          Adds the given BaseComposite to the list of dragged Composites
 void addEventMediatorListener(EventMediatorListener listener)
          Adds the EventMediatorListener given by listener to the list of EventMediatorListeners that will be informed of all events related to composites that occur.
 void addIndicator(BaseComposite indicator)
          Adds the BaseComposite given by indicator to the list of indicators of the CompositeView.
 void addIndicators(java.util.List indicators)
          Adds the List of BaseComposite given by indicators to the list of indicators of the CompositeView.
 void addKeyCommand(KeyStroke keystroke, Command command)
          Associates the given KeyStroke with the given Command.
 boolean addPressedKey(KeyStroke keystroke)
          Adds the given KeyStroke to the list of keystrokes to be consumed by this CompositeView.
 void addPrimitive(Primitive primitive)
          Adds the given Primitive to the elements of the CompositeView>.
 void addVetoableCompositeViewListener(VetoableCompositeViewListener listener)
          Adds the given VetoableCompositeViewListener to the CompositeViews internal structure, such that the listener is informed about every event that occurs.
 void addVetoableEventMediatorListener(VetoableEventMediatorListener listener)
          Adds the VetoableEventMediatorListener given by listener to the list of VetoableEventMediatorListeners that will be informed of all events related to composites that occur.
 boolean areEventsEnabled(int eventmask)
          Returns true, if events of the given eventmask are enabled.
 void clearPressedKeyCache()
          Removes all pressed keys from the cache of this CompositeView.
 BoundingBox computeCompositeBoundingBox()
           
 void disableEvents(int eventmask)
          Disables all of the events specified in the given eventmask.
 void disableMode(int modemask)
          Disables the mode specified by the given modemask
 void disableRepaintManager()
          Shortcut invocation for disabling repaint managing.
 void dragAt(InteractionInfo interactionInfo)
          Called when a drag-operation occurs.
 void dragStart()
          Called whenever a drag-operation was started.
 void dragStop()
          Called whenever a drag-operation was stoped.
 void draw(Renderer renderer, Device device, Transform2D xform_context)
          Draws the Primitives and Composites added to the CompositeView with the Renderer given by renderer onto the Device given by device.
 void draw(Renderer renderer, Device device, Transform2D xform_context, int drawflags)
          Draws the Primitives and Composites added to the CompositeView with the Renderer given by renderer onto the Device given by device.
 void dropStart()
          Indicates the CompositeView that a drop operation is about to be started.
 void dropStop()
          Indicates the CompositeView that a drop operation has been completed.
 void enableClipping(boolean enable)
          Activates or disactivates the clipping for the CompositeView dependent to the value given by enable.
 void enableEvents(int eventmask)
          Enables all of the events specified in the given eventmask.
 void enableFixingCompositesOnInteraction(boolean enabled)
           
 void enableMode(int modemask)
          Enables the mode specified by the given modemask
 void enableRepaintManager()
          Shortcut invocation for enabling repaint managing.
 int getActiveDrawflags()
          Returns the most recently active drawflags of this CompositeView.
 boolean getAttendPrintingHints()
          Returns a boolean that indicates whether priting hints are noticed or not.
 int getAutoScrollingSpeed()
          Returns the current value for the auto scrolling speed in milliseconds.
 int getAutoScrollingStartDelay()
          Returns the current value for the delay before starting auto scrolling in milliseconds.
 Boundary getBoundingBox()
          Returns the current bounding box of the CompositeView.
 boolean getClippingEnabled()
          Returns a boolean that indicates whether the clipping for the CompositeView is turned on or is turned off.
 CompositeHierarchy getCompleteHierarchy(int type)
          Returns the complete hierarchy of BaseComposites currently added to the CompositeView.
 CoordinateSystem getCoordinateSystem()
          Returns the CoordinateSystem the CompositeView uses.
 CoordinateSystemMetric getCoordinateSystemMetric()
          Returns the CoordinateSystemMetric instance that is used to relate the CoordinateSystem of the CompositeView to a metric system.
 CursorRegistry getCursorRegistry()
           
 DragRepresentationRegistry getDragRepresentationRegistry()
           
 int getEventmask()
          Returns the current eventmask.
 CompositeViewGrid getGrid()
          Returns the CompositeViewGrid object associated with this view.
 HighlightRegistry getHighlightRegistry()
           
 int[] getHorizontalScrollbarValues()
          Calculates and returns the values needed to setup a horizontal scrollbar.
 java.lang.Object getInfoValue()
          Returns the InfoValue assinged to the CompositeView or null if no InfoValue has been assigned.
 int getInfoValueIdentifier()
          Returns the identifier that specifies the usage of the InfoValue.
 CompositeInteractionConfiguration getInteractionConfiguration()
           
 int getInteractionHotspot()
          Returns a constant that identifies the type of hotspot that is used for user interactions.
 int getModemask()
          Returns the current setting for the mode the CompositeView work in.
 PaintFormat getModePaint(int mode)
          Returns the paint format that will be used for the given mode.
 AttributeList getModePaints()
          Returns a list containing all paint formats that are defined for the different modes of this composite view instance.
 PaintFormat getPaint()
          Returns the current PaintFormat that is used by the CompositeView to fill the background.
 CoordinateSystem getReferenceCoordinateSystem()
          Returns the CoordinateSystem the CompositeView currently uses as reference for the viewport and such.
 RepaintManager getRepaintManager()
          Returns a reference to the active RepaintManager instance that may be associated with this CompositeView.
 CompositeViewRuler getRuler()
          Returns the CompositeViewRuler object associated with this view.
 double getScaleX()
          Returns the current value for the current scale in x direction of the CompositeView.
 double getScaleY()
          Returns the current value for the current scale in y direction of the CompositeView.
 CompositeHierarchy getSelectionHierarchy(int type)
          Returns the hierarchy of BaseComposites that are currently selected within the CompositeView.
 int[] getVerticalScrollbarValues()
          Calculates and returns the values needed to setup a vertical scrollbar.
 Transform2D getViewTransform(Transform2D xform_context)
          Returns the Transform2D of this view.
 void internalClearSelectionBox()
          Clear the current selection-box.
 void internalFireCompositesAddedEvent(java.util.List compositesAdded)
          This method is API internal and should never be called by client code.
 void internalFireCompositesRemovedEvent(java.util.List compositesRemoved)
          This method is API internal and should never be called by client code.
 void internalFireSelectionChangeEvent(java.util.List selectionOld)
          This method is API internal and should never be called by client code.
 Boundary internalGetSelectionBox()
          Returns the current selection-box.
 void internalSetDragRepresentationKey(java.lang.Object key)
           
 void internalSetHighlightKey(java.lang.Object key)
           
 boolean isFixingCompositesOnInteraction()
           
 boolean isKeyPressed(KeyStroke keystroke)
          Returns true, if the given KeyStroke is already added to the list of keystroke to be consumed by this CompositeView.
 boolean isModeEnabled(int modemask)
          Returns a boolean that indicates whether the mode specified by modemask is enabled or not.
 boolean isPrinting()
          Returns a boolean that indicates whether the CompositeView is currently printing or in the print preview mode.
 boolean isRepaintManagerEnabled()
          Returns true if repaint managing is enabled, otherwise false is returned.
 void moveBackward(BaseComposite composite)
           
 void moveForward(BaseComposite composite)
           
 void print(Renderer renderer, Device device, Transform2D xform_context, BoundingBox bbox, int drawFlags)
          This method can be used to print the content of this CompositeView on a printing device.
 void registerAdditionalInteractionHandler(CompositeInteractionHandler handler)
          Registers the CompositeInteractionHandler given by handler as an additional interaction handler.
 void registerInteractionRegionCalculator(InteractionRegionCalculator interactionRegionCalculator)
          Registers the InteractionRegionCalculator given by interactionRegionCalculator as the new calculator for the region that has to be validated after an interaction by the user has taken place.
 void removeAllIndicators()
          Removes all BaseComposites from the list of indicators of the CompositeView.
 void removeCompositeViewListener(CompositeViewListener listener)
          Removes the given CompositeViewListener from the CompositeViews internal structure, such that the listener is no longer informed about occurring events.
 void removeDragComposite(BaseComposite composite)
          Removes the given BaseComposite from the list of dragged Composites
 void removeEventMediatorListener(EventMediatorListener listener)
          Removes the EventMediatorListener given by listener from the list of EventMediatorListeners so that he will no longer be informed about events related to composites.
 void removeIndicator(BaseComposite indicator)
          Removes the BaseComposite given by indicator from the list of indicators of the CompositeView.
 void removeIndicators(java.util.List indicators)
          Removes the List of BaseComposite given by indicators from the list of indicators of the CompositeView.
 void removeKeyCommand(KeyStroke keystroke)
          Removes the given KeyStroke from the list of key-commands.
 boolean removePressedKey(KeyStroke keystroke)
          Removes the given KeyStroke to the list of keystrokes to be consumed by this CompositeView.
 void removePrimitive(Primitive primitive)
          Removes the given Primitive from the elements of the CompositeView.
 void removeVetoableCompositeViewListener(VetoableCompositeViewListener listener)
          Removes the given VetoableCompositeViewListener from the CompositeViews internal structure, such that the listener is no longer informed about occurring events.
 void removeVetoableEventMediatorListener(VetoableEventMediatorListener listener)
          Removes the VetoableEventMediatorListener given by listener from the list of VetoableEventMediatorListeners so that he will no longer be informed about events related to composites.
 void revalidateModePaint()
          Revalidates the background color after the mode has changed
 void setAttendPrintingHints(boolean attendPrintingHints)
          Sets the value for the attend printing hints to the value given by attendPrintingHints.
 void setAutoScrollingSpeed(int autoscrollspeed)
          Sets the value for the auto scrolling speed to the value given by autoscrollspeed.
 void setAutoScrollingStartDelay(int delay)
          Sets the value for the delay defore starting auto scrolling to the value given by delay.
 void setBoundingBox(int left, int right, int top, int bottom)
          Sets the bounding box of the CompositeView to the values given by left, top, right and bottom,
 void setInfoValue(int identifier, java.lang.Object infovalue)
          Sets the Object given by infovalue as the new InfoValue at the CompositeView.
 void setInfoValue(java.lang.Object infovalue)
          Sets the Object given by infovalue as the new InfoValue at the CompositeView.
 void setInteractionHotspot(int hotspot)
          Sets the constant given by hotspot as the new type of hotspot that should be used for user interactions.
 void setModePaint(PaintFormat paint, int mode)
          Sets the paint format that will be used for the background when the given mode is active.
 void setModePaint(PaintFormat paint, int mode, int modeMask)
          Sets the paint format that will be used for the background when the given mode is active.
 void setModePaints(AttributeList modePaints)
          Sets the list of paint formats that should be used for the different modes of this composite view.
 void setPaint(PaintFormat paint)
          Sets the PaintFormat given by paint as the new PaintFormat that is used to fill the background.
 void setRepaintManager(RepaintManager repaintManager)
          Sets the reference to an instance of RepaintManager instance which is then used as the active repaint-manager.
 void setScaleX(double scaleX)
          Sets the value for the scale in x direction of the CompositeView to the value given by scaleX
 void setScaleY(double scaleY)
          Sets the value for the scale in y direction of the CompositeView to the value given by scaleY
 void toBack(BaseComposite composite)
          Sends the given composite to the back of the drawing order.
 void toFront(BaseComposite composite)
          Sends the given composite to the front of the drawing order.
 void updateView()
          Updates the view.
 
Methods inherited from interface com.tensegrity.composite.BaseCompositeContainer
addComposite, addComposites, getCompositeCount, getCompositeIterator, removeAllComposites, removeComposite, removeComposites, setComposites
 
Methods inherited from interface com.tensegrity.composite.CompositeNavigatorProvider
getCompositeBoundingBox, getCompositeIterator, getViewportCoordinates, getViewportValues, getViewValues, isActing, setViewportAndViewValues, setViewportValues, setViewValues
 
Methods inherited from interface com.tensegrity.generic.util.Observable
addObserver, clearChanged, deleteObserver, deleteObservers, getObservers, notifyObservers, notifyObservers, setChanged
 
Methods inherited from interface com.tensegrity.graphics.interaction.InteractionProvider
actAt, descriptorChanged, dismissFromInteractionCycle, getCurrentInteractionItemFor, getCursorID, getInteractionProviders, getSelection, getSelectionBoundingBox, hasMultiSelection, hasSelection, hasSubSelection, hitsAt, mouseClickAt, mouseDownAt, mouseMoveAt, mouseUpAt, postAction, preAction, select, selectAll, selectAt, selectContaining, selectSubsequent, setSelection, startActionAt, stopActionAt, unselect, unselect, unselectAll, unselectSubsequent
 

Field Detail

PAINT

public static final java.lang.String PAINT
PAINT: Constant for the paint attribute in the mode paint attribute set returned by getModePaints()

See Also:
Constant Field Values

MODE_MASK

public static final java.lang.String MODE_MASK
MODE_MASK: Constant for the mode mask attribute in the mode paint attribute set returned by getModePaints()

See Also:
Constant Field Values

MODE

public static final java.lang.String MODE
MODE: Constant for the mode attribute in the mode paint attribute set returned by getModePaints()

See Also:
Constant Field Values

MODE_PAINT

public static final java.lang.String MODE_PAINT
MODE_PAINT: Constant for the mode paint attribute set in the set returned by getModePaints()

See Also:
Constant Field Values

MODE_MASK_NONE

public static final int MODE_MASK_NONE
Indicating that no mode is set.

See Also:
Constant Field Values

MODE_MASK_ALL

public static final int MODE_MASK_ALL
Indicating that all modes are set.

See Also:
Constant Field Values

MODE_MASK_SELECTION_ALLOWED

public static final int MODE_MASK_SELECTION_ALLOWED
Indicating that selections of inlying Composite respectively Primitive objects are allowed.

See Also:
Constant Field Values

MODE_MASK_EDITING_ALLOWED

public static final int MODE_MASK_EDITING_ALLOWED
Indicating that the editing of inlying BaseComposite objects is allowed.

See Also:
Constant Field Values

MODE_MASK_CONTEXT_MENU_ALLOWED

public static final int MODE_MASK_CONTEXT_MENU_ALLOWED
Indicating that the context menu is enabled / disabled.

See Also:
Constant Field Values

MODE_MASK_SELECTIONBOX

public static final int MODE_MASK_SELECTIONBOX
Indicating the mode mask for rectangular selections.

See Also:
Constant Field Values

EVENT_MASK_ADD_COMPOSITE

public static final int EVENT_MASK_ADD_COMPOSITE
enumeration for setting event masks for the different type of events.

See Also:
Constant Field Values

EVENT_MASK_ADD_COMPOSITES

public static final int EVENT_MASK_ADD_COMPOSITES
enumeration for setting event masks for the different type of events.

See Also:
Constant Field Values

EVENT_MASK_REMOVE_COMPOSITE

public static final int EVENT_MASK_REMOVE_COMPOSITE
enumeration for setting event masks for the different type of events.

See Also:
Constant Field Values

EVENT_MASK_REMOVE_COMPOSITES

public static final int EVENT_MASK_REMOVE_COMPOSITES
enumeration for setting event masks for the different type of events.

See Also:
Constant Field Values

EVENT_MASK_SELECTION_CHANGED

public static final int EVENT_MASK_SELECTION_CHANGED
enumeration for setting event masks for the different type of events.

See Also:
Constant Field Values

EVENT_MASK_COMPOSITEORDER_CHANGED

public static final int EVENT_MASK_COMPOSITEORDER_CHANGED
enumeration for setting event masks for the different type of events.

See Also:
Constant Field Values

EVENT_MASK_VIEWPARAMETER_CHANGED

public static final int EVENT_MASK_VIEWPARAMETER_CHANGED
enumeration for setting event masks for the different type of events.

See Also:
Constant Field Values

EVENT_MASK_MODE_CHANGED

public static final int EVENT_MASK_MODE_CHANGED
enumeration for setting event masks for the different type of events.

See Also:
Constant Field Values

EVENT_MASK_VIEW_SCROLLED

public static final int EVENT_MASK_VIEW_SCROLLED
enumeration for setting event masks for the different type of events.

See Also:
Constant Field Values

CURSOR_MOVE

public static final int CURSOR_MOVE
constant that defines a certain cursor

See Also:
Constant Field Values

CURSOR_KEY_MOVE

public static final java.lang.Object CURSOR_KEY_MOVE
key definition for a certain cursor

See Also:
getCursorRegistry(), CursorRegistry

DRAGREPRESENTAION_KEY_MOVE_SINGLE

public static final java.lang.Object DRAGREPRESENTAION_KEY_MOVE_SINGLE
key definition for the single move drag representation which is displayed when a single Composite gets moved around by user interaction and the 'fixed interactables mode' is enabled

See Also:
enableFixingCompositesOnInteraction(boolean), getDragRepresentationRegistry(), DragRepresentationRegistry

DRAGREPRESENTAION_KEY_MOVE_MULTI

public static final java.lang.Object DRAGREPRESENTAION_KEY_MOVE_MULTI
key definition for the multi move drag representation which is displayed when multiple Composite objects get moved around by user interaction and the 'fixed interactables mode' is enabled

See Also:
enableFixingCompositesOnInteraction(boolean), getDragRepresentationRegistry(), DragRepresentationRegistry

DRAGREPRESENTATION_KEY_MOVE_LINE

public static final java.lang.Object DRAGREPRESENTATION_KEY_MOVE_LINE
key definition for the drag representation which is dispayed when a CompositeLine gets moved around by a user interaction and the 'fixed interactables mode' is enabled

See Also:
enableFixingCompositesOnInteraction(boolean), getDragRepresentationRegistry(), DragRepresentationRegistry

HIGHLIGHT_KEY_MOVE

public static final java.lang.Object HIGHLIGHT_KEY_MOVE
key definition for the highlight a Composite gets surrounded by when it gets moved around by a user interaction

See Also:
enableFixingCompositesOnInteraction(boolean), getHighlightRegistry(), HighlightRegistry

NON_INFOVALUE

public static final int NON_INFOVALUE
constant that identifies the type of the info value associated with the CompositeView

See Also:
Constant Field Values

GENERAL_INFOVALUE

public static final int GENERAL_INFOVALUE
constant that identifies the type of the info value associated with the CompositeView

See Also:
Constant Field Values

DELEGATE_INFOVALUE

public static final int DELEGATE_INFOVALUE
constant that identifies the type of the info value associated with the CompositeView

See Also:
Constant Field Values

SCROLLBAR_MINIMUM

public static final int SCROLLBAR_MINIMUM
constant that tells about an index within a scrollbar values array returned by getHorizontalScrollbarValues() and getVerticalScrollbarValues().

See Also:
Constant Field Values

SCROLLBAR_MAXIMUM

public static final int SCROLLBAR_MAXIMUM
constant that tells about an index within a scrollbar values array returned by getHorizontalScrollbarValues() and getVerticalScrollbarValues().

See Also:
Constant Field Values

SCROLLBAR_VALUE

public static final int SCROLLBAR_VALUE
constant that tells about an index within a scrollbar values array returned by getHorizontalScrollbarValues() and getVerticalScrollbarValues().

See Also:
Constant Field Values

SCROLLBAR_EXTEND

public static final int SCROLLBAR_EXTEND
constant that tells about an index within a scrollbar values array returned by getHorizontalScrollbarValues() and getVerticalScrollbarValues().

See Also:
Constant Field Values

DRAWFLAG_VIEW_BACKGROUND

public static final int DRAWFLAG_VIEW_BACKGROUND
Bits that specify what should be drawn.

See Also:
Constant Field Values

DRAWFLAG_VIEW_PRIMITIVES

public static final int DRAWFLAG_VIEW_PRIMITIVES
Bits that specify what should be drawn.

See Also:
Constant Field Values

DRAWFLAG_VIEW_RULER

public static final int DRAWFLAG_VIEW_RULER
Bits that specify what should be drawn.

See Also:
Constant Field Values

DRAWFLAG_CONTENT_PRIMITIVES

public static final int DRAWFLAG_CONTENT_PRIMITIVES
Bits that specify what should be drawn.

See Also:
Constant Field Values

DRAWFLAG_CONTENT_SELECTED_PRIMITIVES

public static final int DRAWFLAG_CONTENT_SELECTED_PRIMITIVES
Bits that specify what should be drawn.

See Also:
Constant Field Values

DRAWFLAG_CONTENT_NODES

public static final int DRAWFLAG_CONTENT_NODES
Bits that specify what should be drawn.

See Also:
Constant Field Values

DRAWFLAG_CONTENT_EDGES

public static final int DRAWFLAG_CONTENT_EDGES
Bits that specify what should be drawn.

See Also:
Constant Field Values

DRAWFLAG_CONTENT_SELECTED_NODES

public static final int DRAWFLAG_CONTENT_SELECTED_NODES
Bits that specify what should be drawn.

See Also:
Constant Field Values

DRAWFLAG_CONTENT_SELECTED_EDGES

public static final int DRAWFLAG_CONTENT_SELECTED_EDGES
Bits that specify what should be drawn.

See Also:
Constant Field Values

DRAWFLAG_INTERACTION_CONTEXT

public static final int DRAWFLAG_INTERACTION_CONTEXT
Bits that specify what should be drawn.

See Also:
Constant Field Values

DRAWFLAG_COMPOSITES_DRAGGED

public static final int DRAWFLAG_COMPOSITES_DRAGGED
Bits that specify what should be drawn.

See Also:
Constant Field Values

DRAWFLAG_INDICATORS

public static final int DRAWFLAG_INDICATORS
Bits that specify what should be drawn.

See Also:
Constant Field Values

DRAWFLAG_CONTENT_PORTS

public static final int DRAWFLAG_CONTENT_PORTS
Bits that specify what should be drawn.

See Also:
Constant Field Values

DRAWFLAG_VIEW_GRID

public static final int DRAWFLAG_VIEW_GRID
Bits that specify what should be drawn.

See Also:
Constant Field Values

DRAWFLAG_NOEXPORT

public static final int DRAWFLAG_NOEXPORT
Bits that specify what should be drawn.

See Also:
Constant Field Values

DRAWFLAG_ALL

public static final int DRAWFLAG_ALL
Bits that specify what should be drawn.

See Also:
Constant Field Values
Method Detail

getRepaintManager

public RepaintManager getRepaintManager()
Returns a reference to the active RepaintManager instance that may be associated with this CompositeView. If currently no RepaintManager is being used, then null is returned.

Returns:
the currently active RepaintManager, or null.

setRepaintManager

public void setRepaintManager(RepaintManager repaintManager)
Sets the reference to an instance of RepaintManager instance which is then used as the active repaint-manager.

Setting null as the RepaintManager disables repaint-managing and the associated buffering altogether.

Parameters:
repaintManager - the RepaintManager to use, or null to disable repaint managing.

disableRepaintManager

public void disableRepaintManager()
Shortcut invocation for disabling repaint managing. Equivalent to invoking setRepaintManager(RepaintManager) with null.


enableRepaintManager

public void enableRepaintManager()
Shortcut invocation for enabling repaint managing. Equivalent to invoking setRepaintManager(RepaintManager) with new RepaintManager(compositeView).


isRepaintManagerEnabled

public boolean isRepaintManagerEnabled()
Returns true if repaint managing is enabled, otherwise false is returned.

Returns:
true if repaint managing is enabled, otherwise false is returned.

getActiveDrawflags

public int getActiveDrawflags()
Returns the most recently active drawflags of this CompositeView.

Returns:
the most recently active drawflags of this CompositeView.

getPaint

public PaintFormat getPaint()
Returns the current PaintFormat that is used by the CompositeView to fill the background.

Returns:
PaintFormat the current PaintFormat used to fill the background

setPaint

public void setPaint(PaintFormat paint)
Sets the PaintFormat given by paint as the new PaintFormat that is used to fill the background.

Parameters:
paint - the new PaintFormat for filling the background

getBoundingBox

public Boundary getBoundingBox()
Returns the current bounding box of the CompositeView.

Returns:
Boundary the current bounding box

Find more information in the class documentation


setBoundingBox

public void setBoundingBox(int left,
                           int right,
                           int top,
                           int bottom)
Sets the bounding box of the CompositeView to the values given by left, top, right and bottom,

Parameters:
left - the new value for the left side of the bounding box
right - the new value for the right side of the bounding box
top - the new value for the top side of the bounding box
bottom - the new value for the bottom side of the bounding box

Find more information in the class documentation


computeCompositeBoundingBox

public BoundingBox computeCompositeBoundingBox()

getCoordinateSystem

public CoordinateSystem getCoordinateSystem()
Returns the CoordinateSystem the CompositeView uses.

Specified by:
getCoordinateSystem in interface CompositeNavigatorProvider
Returns:
CoordinateSystem of the CompositeView

Find more information in the class documentation


getReferenceCoordinateSystem

public CoordinateSystem getReferenceCoordinateSystem()
Returns the CoordinateSystem the CompositeView currently uses as reference for the viewport and such.

Specified by:
getReferenceCoordinateSystem in interface CompositeNavigatorProvider
Returns:
CoordinateSystem the current used reference CoordinateSystem

Find more information in the class documentation


getCoordinateSystemMetric

public CoordinateSystemMetric getCoordinateSystemMetric()
Returns the CoordinateSystemMetric instance that is used to relate the CoordinateSystem of the CompositeView to a metric system.

Returns:
CoordinateSystemMetric the CoordinateSystemMetric instance used by the CompositeView

Find more information in the class documentation


internalGetSelectionBox

public Boundary internalGetSelectionBox()
Returns the current selection-box. If none is currently active null is returned.

Notice: This method is for API internal use only.

Returns:
the current selection-box or null.

internalClearSelectionBox

public void internalClearSelectionBox()
Clear the current selection-box.

Notice: This method is for API internal use only.


getHorizontalScrollbarValues

public int[] getHorizontalScrollbarValues()
Calculates and returns the values needed to setup a horizontal scrollbar. the values are as follows: The indices of the values are defined by the constants listed below.

Returns:
an array with the requested values
See Also:
SCROLLBAR_MINIMUM, SCROLLBAR_MAXIMUM, SCROLLBAR_VALUE, SCROLLBAR_EXTEND

Find more information in the class documentation


getVerticalScrollbarValues

public int[] getVerticalScrollbarValues()
Calculates and returns the values needed to setup a vertical scrollbar. The values are as follows: The indices of the values are defined by the constants listed below.

Returns:
an array with the requested values
See Also:
SCROLLBAR_MINIMUM, SCROLLBAR_MAXIMUM, SCROLLBAR_VALUE, SCROLLBAR_EXTEND

Find more information in the class documentation


getModemask

public int getModemask()
Returns the current setting for the mode the CompositeView work in. The returned value will be in the following list:

Returns:
int the current mode of the CompositeView
See Also:
MODE_MASK_EDITING_ALLOWED, MODE_MASK_CONTEXT_MENU_ALLOWED, MODE_MASK_SELECTION_ALLOWED

Find more information in the class documentation


isModeEnabled

public boolean isModeEnabled(int modemask)
Returns a boolean that indicates whether the mode specified by modemask is enabled or not.

Parameters:
modemask - the mode to check for.
Returns:
boolean flag that indicates whether the specified mode is enabled or not.

Find more information in the class documentation


enableMode

public void enableMode(int modemask)
Enables the mode specified by the given modemask

Parameters:
modemask - specifier for the mode to enable MODE_MASK_SELECTION_ALLOWED

Find more information in the class documentation


disableMode

public void disableMode(int modemask)
Disables the mode specified by the given modemask

Parameters:
modemask - specifier for the mode to disable

getClippingEnabled

public boolean getClippingEnabled()
Returns a boolean that indicates whether the clipping for the CompositeView is turned on or is turned off.

Returns:
boolean that indicates if clipping is active or not

enableClipping

public void enableClipping(boolean enable)
Activates or disactivates the clipping for the CompositeView dependent to the value given by enable. The clipping for the CompositeView is done against the bounding box of the CompositeView

Parameters:
enable - indicates whether to active clipping or to disactivate it

getScaleX

public double getScaleX()
Returns the current value for the current scale in x direction of the CompositeView.

Specified by:
getScaleX in interface CompositeNavigatorProvider
Returns:
double the current scale value in x direction

Find more information in the class documentation


setScaleX

public void setScaleX(double scaleX)
Sets the value for the scale in x direction of the CompositeView to the value given by scaleX

Parameters:
scaleX - the new value for the scale value in x direction

Find more information in the class documentation


getScaleY

public double getScaleY()
Returns the current value for the current scale in y direction of the CompositeView.

Specified by:
getScaleY in interface CompositeNavigatorProvider
Returns:
double the current scale value in y direction

Find more information in the class documentation


setScaleY

public void setScaleY(double scaleY)
Sets the value for the scale in y direction of the CompositeView to the value given by scaleY

Parameters:
scaleY - the new value for the scale value in y direction

Find more information in the class documentation


getInfoValueIdentifier

public int getInfoValueIdentifier()
Returns the identifier that specifies the usage of the InfoValue.

Returns:
int constant that specifies the usage of the InfoValue
See Also:
GENERAL_INFOVALUE, DELEGATE_INFOVALUE

getInfoValue

public java.lang.Object getInfoValue()
Returns the InfoValue assinged to the CompositeView or null if no InfoValue has been assigned. It is recommended to read the documentation of this interface to get a deeper understanding of how the InfoValue is used.

Returns:
the InfoValue associated with the CompositeView.

setInfoValue

public void setInfoValue(java.lang.Object infovalue)
Sets the Object given by infovalue as the new InfoValue at the CompositeView. Setting the InfoValue with this method identifies it as GENERAL_INFOVALUE.
It is recommended to read the documentation of this interface to get a deeper understanding of how the InfoValue is used.

Parameters:
infovalue - the Object to associate with the CompositeView
See Also:
GENERAL_INFOVALUE, DELEGATE_INFOVALUE

setInfoValue

public void setInfoValue(int identifier,
                         java.lang.Object infovalue)
Sets the Object given by infovalue as the new InfoValue at the CompositeView. The InfoValue is identified by the constant that is given by identifier.
It is recommended to read the documentation of this interface to get a deeper understanding of how the InfoValue is used.

Parameters:
identifier - that specifies the usage of the InfoValue
infovalue - the Object to associate with the CompositeView
See Also:
GENERAL_INFOVALUE, DELEGATE_INFOVALUE

getInteractionConfiguration

public CompositeInteractionConfiguration getInteractionConfiguration()

getInteractionHotspot

public int getInteractionHotspot()
Returns a constant that identifies the type of hotspot that is used for user interactions.

Returns:
int constant that identifies the type of hotspot used for interaction

setInteractionHotspot

public void setInteractionHotspot(int hotspot)
Sets the constant given by hotspot as the new type of hotspot that should be used for user interactions.
Valid values are defined in InteractionConstants

Parameters:
hotspot - the new type of hotspot to use

registerAdditionalInteractionHandler

public void registerAdditionalInteractionHandler(CompositeInteractionHandler handler)
Registers the CompositeInteractionHandler given by handler as an additional interaction handler.
The CompositeInteractionHandler is called for the different steps of the user interaction. Please see the class documentation to get detailed information.

Parameters:
handler - the CompositeInteractionHandler instance to register
See Also:
CompositeInteractionHandler

getCompleteHierarchy

public CompositeHierarchy getCompleteHierarchy(int type)
Returns the complete hierarchy of BaseComposites currently added to the CompositeView. The returned CompositeHierarchy can be filtered through the constant given by type.

Parameters:
type - the constant that defines how to filter the returned hierarchy
Returns:
the complete hierarchy of BaseComposites
See Also:
CompositeHierarchyUtilities.HIERARCHY_EXCLUDES_NONE, CompositeHierarchyUtilities.HIERARCHY_EXCLUDES_COMPOSITE_LINES, CompositeHierarchy

getSelectionHierarchy

public CompositeHierarchy getSelectionHierarchy(int type)
Returns the hierarchy of BaseComposites that are currently selected within the CompositeView. The returned CompositeHierarchy can be filtered through the constant given by type.

Parameters:
type - the constant that defines how to filter the returned hierarchy
Returns:
the complete hierarchy of BaseComposites
See Also:
CompositeHierarchy, CompositeHierarchyUtilities.HIERARCHY_EXCLUDES_NONE, CompositeHierarchyUtilities.HIERARCHY_EXCLUDES_COMPOSITE_LINES

addPrimitive

public void addPrimitive(Primitive primitive)
Adds the given Primitive to the elements of the CompositeView>.

Parameters:
primitive - the Primitive to add

Find more information in the class documentation


removePrimitive

public void removePrimitive(Primitive primitive)
Removes the given Primitive from the elements of the CompositeView.

Parameters:
primitive - the Primitive to remove

Find more information in the class documentation


addIndicator

public void addIndicator(BaseComposite indicator)
Adds the BaseComposite given by indicator to the list of indicators of the CompositeView. An indicator is a BaseComposite that marks a certain thing such as an insertion coordinate, a point of attachment and so on.

Parameters:
indicator - the indicator to add

removeIndicator

public void removeIndicator(BaseComposite indicator)
Removes the BaseComposite given by indicator from the list of indicators of the CompositeView.

Parameters:
indicator - the indicator to remove

addIndicators

public void addIndicators(java.util.List indicators)
Adds the List of BaseComposite given by indicators to the list of indicators of the CompositeView. An indicator is a BaseComposite that marks a certain thing such as an insertion coordinate, a point of attachment and so on.

Parameters:
indicators - the list of indicators to add

removeIndicators

public void removeIndicators(java.util.List indicators)
Removes the List of BaseComposite given by indicators from the list of indicators of the CompositeView.

Parameters:
indicators - the indicators to remove

removeAllIndicators

public void removeAllIndicators()
Removes all BaseComposites from the list of indicators of the CompositeView.


toFront

public void toFront(BaseComposite composite)
Sends the given composite to the front of the drawing order.

Parameters:
composite - the BaseComposite to set to the front.

Find more information in the class documentation


toBack

public void toBack(BaseComposite composite)
Sends the given composite to the back of the drawing order.

Parameters:
composite - the BaseComposite to set to the back.

Find more information in the class documentation


moveForward

public void moveForward(BaseComposite composite)

moveBackward

public void moveBackward(BaseComposite composite)

addPressedKey

public boolean addPressedKey(KeyStroke keystroke)
Adds the given KeyStroke to the list of keystrokes to be consumed by this CompositeView.

Parameters:
keystroke - the KeyStroke to add.
Returns:
true, if the event will be consumed

removePressedKey

public boolean removePressedKey(KeyStroke keystroke)
Removes the given KeyStroke to the list of keystrokes to be consumed by this CompositeView.

Parameters:
keystroke - the KeyStroke to remove.
Returns:
true, if the event will be consumed

clearPressedKeyCache

public void clearPressedKeyCache()
Removes all pressed keys from the cache of this CompositeView.


isKeyPressed

public boolean isKeyPressed(KeyStroke keystroke)
Returns true, if the given KeyStroke is already added to the list of keystroke to be consumed by this CompositeView.

Parameters:
keystroke - the KeyStroke to check for.
Returns:
true, if the given KeyStroke is already added to the list.

addKeyCommand

public void addKeyCommand(KeyStroke keystroke,
                          Command command)
Associates the given KeyStroke with the given Command. The keystroke can then be used to start the specified Command.

Parameters:
keystroke - the KeyStroke to associate with the given Command.
command - the Command to perform.

removeKeyCommand

public void removeKeyCommand(KeyStroke keystroke)
Removes the given KeyStroke from the list of key-commands.

Parameters:
keystroke - the KeyStroke to remove.

addDragComposite

public void addDragComposite(BaseComposite composite)
Adds the given BaseComposite to the list of dragged Composites

Parameters:
composite - the BaseComposite to add.

removeDragComposite

public void removeDragComposite(BaseComposite composite)
Removes the given BaseComposite from the list of dragged Composites

Parameters:
composite - the BaseComposite to remove.

dragStart

public void dragStart()
Called whenever a drag-operation was started.


dragStop

public void dragStop()
Called whenever a drag-operation was stoped.


dragAt

public void dragAt(InteractionInfo interactionInfo)
Called when a drag-operation occurs. The given InteractionInfo specifies the occured drag.

Parameters:
interactionInfo - specifies the drag.

dropStart

public void dropStart()
Indicates the CompositeView that a drop operation is about to be started.
Notice: It is mandatory to call this method.


dropStop

public void dropStop()
Indicates the CompositeView that a drop operation has been completed.
Notice: It is mandatory to call this method.


getAutoScrollingStartDelay

public int getAutoScrollingStartDelay()
Returns the current value for the delay before starting auto scrolling in milliseconds. The default value is 1ms.

Returns:
the current value for the auto scrolling start delay

setAutoScrollingStartDelay

public void setAutoScrollingStartDelay(int delay)
Sets the value for the delay defore starting auto scrolling to the value given by delay. The value must be given in milliseconds.

Parameters:
delay - the new value for the auto scrolling start delay

getAutoScrollingSpeed

public int getAutoScrollingSpeed()
Returns the current value for the auto scrolling speed in milliseconds. The default value is 200ms.

Returns:
the current value for auto scrolling speed

setAutoScrollingSpeed

public void setAutoScrollingSpeed(int autoscrollspeed)
Sets the value for the auto scrolling speed to the value given by autoscrollspeed. The value must be given in milliseconds.

Parameters:
autoscrollspeed - the new value for the auto scrolling speed

getCursorRegistry

public CursorRegistry getCursorRegistry()

getDragRepresentationRegistry

public DragRepresentationRegistry getDragRepresentationRegistry()

internalSetDragRepresentationKey

public void internalSetDragRepresentationKey(java.lang.Object key)

isFixingCompositesOnInteraction

public boolean isFixingCompositesOnInteraction()

enableFixingCompositesOnInteraction

public void enableFixingCompositesOnInteraction(boolean enabled)

getHighlightRegistry

public HighlightRegistry getHighlightRegistry()

internalSetHighlightKey

public void internalSetHighlightKey(java.lang.Object key)

getEventmask

public int getEventmask()
Returns the current eventmask.

Returns:
the current eventmask.

Find more information in the class documentation


areEventsEnabled

public boolean areEventsEnabled(int eventmask)
Returns true, if events of the given eventmask are enabled.

Parameters:
eventmask - the event-mask to check.
Returns:
true if at least one the specified events is enabled.

Find more information in the class documentation


enableEvents

public void enableEvents(int eventmask)
Enables all of the events specified in the given eventmask.

Parameters:
eventmask - specifies what events to enable

Find more information in the class documentation


disableEvents

public void disableEvents(int eventmask)
Disables all of the events specified in the given eventmask.

Parameters:
eventmask - specifies what events to disable

Find more information in the class documentation


addCompositeViewListener

public void addCompositeViewListener(CompositeViewListener listener)
Adds the given CompositeViewListener to the CompositeViews internal structure, such that the listener is informed about every event that occurs.

Parameters:
listener - the CompositeViewListener to add

Find more information in the class documentation


removeCompositeViewListener

public void removeCompositeViewListener(CompositeViewListener listener)
Removes the given CompositeViewListener from the CompositeViews internal structure, such that the listener is no longer informed about occurring events.

Parameters:
listener - the CompositeViewListener to remove

Find more information in the class documentation


addVetoableCompositeViewListener

public void addVetoableCompositeViewListener(VetoableCompositeViewListener listener)
Adds the given VetoableCompositeViewListener to the CompositeViews internal structure, such that the listener is informed about every event that occurs.

Parameters:
listener - the VetoableCompositeViewListener to add

Find more information in the class documentation


removeVetoableCompositeViewListener

public void removeVetoableCompositeViewListener(VetoableCompositeViewListener listener)
Removes the given VetoableCompositeViewListener from the CompositeViews internal structure, such that the listener is no longer informed about occurring events.

Parameters:
listener - the VetoableCompositeViewListener to remove

Find more information in the class documentation


addEventMediatorListener

public void addEventMediatorListener(EventMediatorListener listener)
Adds the EventMediatorListener given by listener to the list of EventMediatorListeners that will be informed of all events related to composites that occur.

Parameters:
listener - the EventMediatorListener to add

removeEventMediatorListener

public void removeEventMediatorListener(EventMediatorListener listener)
Removes the EventMediatorListener given by listener from the list of EventMediatorListeners so that he will no longer be informed about events related to composites.

Parameters:
listener - the EventMediatorListener to remove

addVetoableEventMediatorListener

public void addVetoableEventMediatorListener(VetoableEventMediatorListener listener)
Adds the VetoableEventMediatorListener given by listener to the list of VetoableEventMediatorListeners that will be informed of all events related to composites that occur.

Parameters:
listener - the VetoableEventMediatorListener to add

removeVetoableEventMediatorListener

public void removeVetoableEventMediatorListener(VetoableEventMediatorListener listener)
Removes the VetoableEventMediatorListener given by listener from the list of VetoableEventMediatorListeners so that he will no longer be informed about events related to composites.

Parameters:
listener - the VetoableEventMediatorListener to remove

registerInteractionRegionCalculator

public void registerInteractionRegionCalculator(InteractionRegionCalculator interactionRegionCalculator)
Registers the InteractionRegionCalculator given by interactionRegionCalculator as the new calculator for the region that has to be validated after an interaction by the user has taken place.

Parameters:
interactionRegionCalculator - the InteractionRegionCalculator to register

updateView

public void updateView()
Updates the view. The update involves the following :
  1. update of the CoordinateSystem so that it fits to the internal Composites
  2. notify all registered Observers


getViewTransform

public Transform2D getViewTransform(Transform2D xform_context)
Returns the Transform2D of this view. If a transformation is given, it will be combined with the resulting one.

Parameters:
xform_context - the Transform2D to be combined, may be null.
Returns:
Transform2D the Transform2D of this view.

getRuler

public CompositeViewRuler getRuler()
Returns the CompositeViewRuler object associated with this view.

Returns:
the CompositeViewRuler object.

getGrid

public CompositeViewGrid getGrid()
Returns the CompositeViewGrid object associated with this view.

Returns:
the CompositeViewGrid object.

draw

public void draw(Renderer renderer,
                 Device device,
                 Transform2D xform_context)
Draws the Primitives and Composites added to the CompositeView with the Renderer given by renderer onto the Device given by device. This method draws everything that is contained in this CompositeView. If drawing of a combination of particular items inside this instance is required use the method draw(Renderer, Device, Transform2D, int) and specify a bitmask composed of the desired drawing flags.

Parameters:
renderer - the Renderer used for drawing
device - the Device used for drawing
xform_context - the context transformation

Find more information in the class documentation


draw

public void draw(Renderer renderer,
                 Device device,
                 Transform2D xform_context,
                 int drawflags)
Draws the Primitives and Composites added to the CompositeView with the Renderer given by renderer onto the Device given by device.

Parameters:
renderer - the Renderer used for drawing
device - the Device used for drawing
xform_context - the context transformation
drawflags - specifies what exactly should be drawn.

Find more information in the class documentation


setAttendPrintingHints

public void setAttendPrintingHints(boolean attendPrintingHints)
Sets the value for the attend printing hints to the value given by attendPrintingHints.

Parameters:
attendPrintingHints - the new value for the attend printing hints flag

getAttendPrintingHints

public boolean getAttendPrintingHints()
Returns a boolean that indicates whether priting hints are noticed or not.

Returns:
flag that indicates whether printing hints are noticed or not

isPrinting

public boolean isPrinting()
Returns a boolean that indicates whether the CompositeView is currently printing or in the print preview mode.

Returns:
boolean flag that indicates whether printing or print preview is currently active

print

public void print(Renderer renderer,
                  Device device,
                  Transform2D xform_context,
                  BoundingBox bbox,
                  int drawFlags)
This method can be used to print the content of this CompositeView on a printing device. The output areas size is defined in the given BoundingBox bbox.

Parameters:
renderer - the Renderer used to draw the content.
device - the Device to draw to.
xform_context - the transformation of the context from which we are called.
bbox - a BoundingBox restricting the area to draw to.
drawFlags - The draw flags to use see draw(Renderer, Device, Transform2D, int)

revalidateModePaint

public void revalidateModePaint()
Revalidates the background color after the mode has changed


setModePaint

public void setModePaint(PaintFormat paint,
                         int mode)
Sets the paint format that will be used for the background when the given mode is active. When calling this version of the setModePaint() method, the mode is used for modeMask also, so that all other flags are ignored.

Parameters:
paint - The paint format to use
mode - The mode to which the paint format applies, see the MODE_MASK constants in CompositeView!

setModePaint

public void setModePaint(PaintFormat paint,
                         int mode,
                         int modeMask)
Sets the paint format that will be used for the background when the given mode is active. The modeMask can be given to include or ignore specific flags of the combination represented by the CompositeView mode. e.g. a) mode = MODE_MASK_EDITING_ALLOWED modeMask = MODE_MASK_EDITING_ALLOWED -> will apply to all modes that contain the MODE_MASK_EDITING_ALLOWED flag, because all other flags are ignored. b) mode = MODE_MASK_EDITING_ALLOWED modeMask = MODE_MASK_EDITING_ALLOWED | MODE_MASK_SELECTION_ALLOWED -> will apply to modes that contain the MODE_MASK_EDITING_ALLOWED flag, but don't contain the MODE_MASK_SELECTION_ALLOWED flag. All additional flags are ignored.

Parameters:
paint - The paint format to use
mode - The mode to which the paint format applies, see the MODE_MASK constants in CompositeView!
modeMask - The mask to apply to the current mode of the CompositeView before comparing to the given mode for this paint format.

getModePaint

public PaintFormat getModePaint(int mode)
Returns the paint format that will be used for the given mode.

Parameters:
mode - The mode to retrieve the paint format for
Returns:
The paint format for the given mode

getModePaints

public AttributeList getModePaints()
Returns a list containing all paint formats that are defined for the different modes of this composite view instance. The format of the list depends on the implementation of the CompositeView, so this set should only be used for transportation between CompositeViews or for persistence.

Returns:
a list containing all paint formats that are defined for the different modes of this composite view instance.

setModePaints

public void setModePaints(AttributeList modePaints)
Sets the list of paint formats that should be used for the different modes of this composite view.

Parameters:
modePaints - the list of paint formats

internalFireCompositesAddedEvent

public void internalFireCompositesAddedEvent(java.util.List compositesAdded)
This method is API internal and should never be called by client code. This method is subject to change.

Parameters:
compositesAdded - List of the BaseComposite instances that have been added

internalFireCompositesRemovedEvent

public void internalFireCompositesRemovedEvent(java.util.List compositesRemoved)
This method is API internal and should never be called by client code. This method is subject to change.

Parameters:
compositesRemoved - List of the BaseComposite instances that have been removed

internalFireSelectionChangeEvent

public void internalFireSelectionChangeEvent(java.util.List selectionOld)
This method is API internal and should never be called by client code. This method is subject to change.

Parameters:
selectionOld - List of the BaseComposite instances that were selected previously


Copyright © 2005 Tensegrity Software GmbH. All Rights Reserved. Date of creation: 09.06.2006.