|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
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.
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:
MODE_MASK_NONEMODE_MASK_SELECTION_ALLOWEDMODE_MASK_EDITING_ALLOWEDMODE_MASK_CONTEXT_MENU_ALLOWEDMODE_MASK_ALL
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:
Primitive instancesBaseComposite instancesBaseComposite instancesBaseComposite 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 |
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:
void addEventMediatorListener(EventMediatorListener)void removeEventMediatorListener(EventMediatorListener)void addVetoableEventMediatorListener(VetoableEventMediatorListener)void removeVetoableEventMediatorListener(VetoableEventMediatorListener)VetoableCompositeLineListener,
VetoableCompositeListener,
VetoableCompositeGroupListener
VetoableEventMediatorListenerCompositeLineListener,
CompositeListener,
CompositeGroupListener
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:
int getEventmask()boolean areEventsEnabled(int)void enableEvents(int)void disableEvents(int)void addCompositeViewListener(CompositeViewListener)void removeCompositeViewListener(CompositeViewListener)void addVetoableCompositeViewListener(VetoableCompositeViewListener)void removeVetoableCompositeViewListener(VetoableCompositeViewListener)
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.
| 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 |
public static final java.lang.String PAINT
PAINT: Constant for the paint attribute in the mode paint
attribute set returned by getModePaints()
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()
public static final java.lang.String MODE
MODE: Constant for the mode attribute in the mode paint
attribute set returned by getModePaints()
public static final java.lang.String MODE_PAINT
MODE_PAINT: Constant for the mode paint attribute set in
the set returned by getModePaints()
public static final int MODE_MASK_NONE
public static final int MODE_MASK_ALL
public static final int MODE_MASK_SELECTION_ALLOWED
Composite respectively
Primitive objects are allowed.
public static final int MODE_MASK_EDITING_ALLOWED
BaseComposite objects is allowed.
public static final int MODE_MASK_CONTEXT_MENU_ALLOWED
public static final int MODE_MASK_SELECTIONBOX
public static final int EVENT_MASK_ADD_COMPOSITE
public static final int EVENT_MASK_ADD_COMPOSITES
public static final int EVENT_MASK_REMOVE_COMPOSITE
public static final int EVENT_MASK_REMOVE_COMPOSITES
public static final int EVENT_MASK_SELECTION_CHANGED
public static final int EVENT_MASK_COMPOSITEORDER_CHANGED
public static final int EVENT_MASK_VIEWPARAMETER_CHANGED
public static final int EVENT_MASK_MODE_CHANGED
public static final int EVENT_MASK_VIEW_SCROLLED
public static final int CURSOR_MOVE
public static final java.lang.Object CURSOR_KEY_MOVE
getCursorRegistry(),
CursorRegistrypublic static final java.lang.Object DRAGREPRESENTAION_KEY_MOVE_SINGLE
Composite gets moved around by user
interaction and the 'fixed interactables mode' is enabled
enableFixingCompositesOnInteraction(boolean),
getDragRepresentationRegistry(),
DragRepresentationRegistrypublic static final java.lang.Object DRAGREPRESENTAION_KEY_MOVE_MULTI
Composite objects get moved around by user
interaction and the 'fixed interactables mode' is enabled
enableFixingCompositesOnInteraction(boolean),
getDragRepresentationRegistry(),
DragRepresentationRegistrypublic static final java.lang.Object DRAGREPRESENTATION_KEY_MOVE_LINE
CompositeLine gets moved around by a user interaction and
the 'fixed interactables mode' is enabled
enableFixingCompositesOnInteraction(boolean),
getDragRepresentationRegistry(),
DragRepresentationRegistrypublic static final java.lang.Object HIGHLIGHT_KEY_MOVE
Composite gets surrounded
by when it gets moved around by a user interaction
enableFixingCompositesOnInteraction(boolean),
getHighlightRegistry(),
HighlightRegistrypublic static final int NON_INFOVALUE
CompositeView
public static final int GENERAL_INFOVALUE
CompositeView
public static final int DELEGATE_INFOVALUE
CompositeView
public static final int SCROLLBAR_MINIMUM
getHorizontalScrollbarValues() and
getVerticalScrollbarValues().
public static final int SCROLLBAR_MAXIMUM
getHorizontalScrollbarValues() and
getVerticalScrollbarValues().
public static final int SCROLLBAR_VALUE
getHorizontalScrollbarValues() and
getVerticalScrollbarValues().
public static final int SCROLLBAR_EXTEND
getHorizontalScrollbarValues() and
getVerticalScrollbarValues().
public static final int DRAWFLAG_VIEW_BACKGROUND
public static final int DRAWFLAG_VIEW_PRIMITIVES
public static final int DRAWFLAG_VIEW_RULER
public static final int DRAWFLAG_CONTENT_PRIMITIVES
public static final int DRAWFLAG_CONTENT_SELECTED_PRIMITIVES
public static final int DRAWFLAG_CONTENT_NODES
public static final int DRAWFLAG_CONTENT_EDGES
public static final int DRAWFLAG_CONTENT_SELECTED_NODES
public static final int DRAWFLAG_CONTENT_SELECTED_EDGES
public static final int DRAWFLAG_INTERACTION_CONTEXT
public static final int DRAWFLAG_COMPOSITES_DRAGGED
public static final int DRAWFLAG_INDICATORS
public static final int DRAWFLAG_CONTENT_PORTS
public static final int DRAWFLAG_VIEW_GRID
public static final int DRAWFLAG_NOEXPORT
public static final int DRAWFLAG_ALL
| Method Detail |
public RepaintManager getRepaintManager()
RepaintManager instance
that may be associated with this CompositeView. If currently
no RepaintManager is being used, then null is
returned.
RepaintManager, or
null.public void setRepaintManager(RepaintManager repaintManager)
RepaintManager instance
which is then used as the active repaint-manager.
Setting null as the RepaintManager disables
repaint-managing and the associated buffering altogether.
repaintManager - the RepaintManager to use, or
null to disable repaint managing.public void disableRepaintManager()
setRepaintManager(RepaintManager)
with null.
public void enableRepaintManager()
setRepaintManager(RepaintManager)
with new RepaintManager(compositeView).
public boolean isRepaintManagerEnabled()
true if repaint managing is enabled, otherwise
false is returned.
true if repaint managing is enabled, otherwise
false is returned.public int getActiveDrawflags()
CompositeView.
CompositeView.public PaintFormat getPaint()
PaintFormat that is used by the
CompositeView to fill the background.
PaintFormat used to fill the
backgroundpublic void setPaint(PaintFormat paint)
PaintFormat given by paint as the new
PaintFormat that is used to fill the background.
paint - the new PaintFormat for filling the backgroundpublic Boundary getBoundingBox()
CompositeView.
public void setBoundingBox(int left,
int right,
int top,
int bottom)
CompositeView to the values
given by left, top, right and
bottom,
left - the new value for the left side of the bounding boxright - the new value for the right side of the bounding boxtop - the new value for the top side of the bounding boxbottom - the new value for the bottom side of the bounding boxpublic BoundingBox computeCompositeBoundingBox()
public CoordinateSystem getCoordinateSystem()
CoordinateSystem the CompositeView
uses.
getCoordinateSystem in interface CompositeNavigatorProviderCompositeViewpublic CoordinateSystem getReferenceCoordinateSystem()
CoordinateSystem the CompositeView
currently uses as reference for the viewport and such.
getReferenceCoordinateSystem in interface CompositeNavigatorProviderCoordinateSystempublic CoordinateSystemMetric getCoordinateSystemMetric()
CoordinateSystemMetric instance that is used to
relate the CoordinateSystem of the
CompositeView to a metric system.
CoordinateSystemMetric
instance used by the CompositeViewpublic Boundary internalGetSelectionBox()
null is returned.
Notice: This method is for API internal use only.
public void internalClearSelectionBox()
Notice: This method is for API internal use only.
public int[] getHorizontalScrollbarValues()
SCROLLBAR_MINIMUM,
SCROLLBAR_MAXIMUM,
SCROLLBAR_VALUE,
SCROLLBAR_EXTENDpublic int[] getVerticalScrollbarValues()
SCROLLBAR_MINIMUM,
SCROLLBAR_MAXIMUM,
SCROLLBAR_VALUE,
SCROLLBAR_EXTENDpublic int getModemask()
CompositeView
work in. The returned value will be in the following list:
CompositeViewMODE_MASK_EDITING_ALLOWED,
MODE_MASK_CONTEXT_MENU_ALLOWED,
MODE_MASK_SELECTION_ALLOWEDpublic boolean isModeEnabled(int modemask)
boolean that indicates whether the mode specified
by modemask is enabled or not.
modemask - the mode to check for.
public void enableMode(int modemask)
modemask
modemask - specifier for the mode to enable
MODE_MASK_SELECTION_ALLOWEDpublic void disableMode(int modemask)
modemask
modemask - specifier for the mode to disablepublic boolean getClippingEnabled()
boolean that indicates whether the clipping for
the CompositeView is turned on or is turned off.
public void enableClipping(boolean enable)
CompositeView
dependent to the value given by enable. The clipping for the
CompositeView is done against the bounding box of the
CompositeView
enable - indicates whether to active clipping or to disactivate itpublic double getScaleX()
CompositeView.
getScaleX in interface CompositeNavigatorProviderpublic void setScaleX(double scaleX)
CompositeView to the value given by scaleX
scaleX - the new value for the scale value in x directionpublic double getScaleY()
CompositeView.
getScaleY in interface CompositeNavigatorProviderpublic void setScaleY(double scaleY)
CompositeView to the value given by scaleY
scaleY - the new value for the scale value in y directionpublic int getInfoValueIdentifier()
GENERAL_INFOVALUE,
DELEGATE_INFOVALUEpublic java.lang.Object getInfoValue()
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.
CompositeView.public void setInfoValue(java.lang.Object infovalue)
Object given by infovalue as the new
InfoValue at the CompositeView. Setting the
InfoValue with this method identifies it as
GENERAL_INFOVALUE.
infovalue - the Object to associate with the
CompositeViewGENERAL_INFOVALUE,
DELEGATE_INFOVALUE
public void setInfoValue(int identifier,
java.lang.Object infovalue)
Object given by infovalue as the new
InfoValue at the CompositeView. The InfoValue
is identified by the constant that is given by
identifier.
identifier - that specifies the usage of the InfoValueinfovalue - the Object to associate with the
CompositeViewGENERAL_INFOVALUE,
DELEGATE_INFOVALUEpublic CompositeInteractionConfiguration getInteractionConfiguration()
public int getInteractionHotspot()
public void setInteractionHotspot(int hotspot)
hotspot as the new type of
hotspot that should be used for user interactions.
InteractionConstants
hotspot - the new type of hotspot to usepublic void registerAdditionalInteractionHandler(CompositeInteractionHandler handler)
CompositeInteractionHandler given by
handler as an additional interaction handler.
CompositeInteractionHandler is called for the
different steps of the user interaction. Please see the class
documentation to get detailed information.
handler - the CompositeInteractionHandler instance to
registerCompositeInteractionHandlerpublic CompositeHierarchy getCompleteHierarchy(int type)
BaseComposites currently
added to the CompositeView. The returned
CompositeHierarchy can be filtered through the constant
given by type.
type - the constant that defines how to filter the returned
hierarchy
BaseCompositesCompositeHierarchyUtilities.HIERARCHY_EXCLUDES_NONE,
CompositeHierarchyUtilities.HIERARCHY_EXCLUDES_COMPOSITE_LINES,
CompositeHierarchypublic CompositeHierarchy getSelectionHierarchy(int type)
BaseComposites that are currently
selected within the CompositeView. The returned
CompositeHierarchy can be filtered through the constant
given by type.
type - the constant that defines how to filter the returned
hierarchy
BaseCompositesCompositeHierarchy,
CompositeHierarchyUtilities.HIERARCHY_EXCLUDES_NONE,
CompositeHierarchyUtilities.HIERARCHY_EXCLUDES_COMPOSITE_LINESpublic void addPrimitive(Primitive primitive)
Primitive to the elements of the
CompositeView>.
primitive - the Primitive to addpublic void removePrimitive(Primitive primitive)
Primitive from
the elements of the CompositeView.
primitive - the Primitive to removepublic void addIndicator(BaseComposite indicator)
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.
indicator - the indicator to addpublic void removeIndicator(BaseComposite indicator)
BaseComposite given by indicator
from the list of indicators of the CompositeView.
indicator - the indicator to removepublic void addIndicators(java.util.List indicators)
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.
indicators - the list of indicators to addpublic void removeIndicators(java.util.List indicators)
List of BaseComposite given by
indicators from the list of indicators of the
CompositeView.
indicators - the indicators to removepublic void removeAllIndicators()
BaseComposites from the list of indicators of
the CompositeView.
public void toFront(BaseComposite composite)
composite - the BaseComposite to set to the front.public void toBack(BaseComposite composite)
composite - the BaseComposite to set to the back.public void moveForward(BaseComposite composite)
public void moveBackward(BaseComposite composite)
public boolean addPressedKey(KeyStroke keystroke)
KeyStroke to the list of keystrokes to be
consumed by this CompositeView.
keystroke - the KeyStroke to add.
true, if the event will be consumedpublic boolean removePressedKey(KeyStroke keystroke)
KeyStroke to the list of keystrokes to be
consumed by this CompositeView.
keystroke - the KeyStroke to remove.
true, if the event will be consumedpublic void clearPressedKeyCache()
CompositeView.
public boolean isKeyPressed(KeyStroke keystroke)
true, if the given KeyStroke is already
added to the list of keystroke to be consumed by this
CompositeView.
keystroke - the KeyStroke to check for.
true, if the given KeyStroke is already
added to the list.
public void addKeyCommand(KeyStroke keystroke,
Command command)
KeyStroke with the given
Command. The keystroke can then be used to start the
specified Command.
keystroke - the KeyStroke to associate with the given
Command.command - the Command to perform.public void removeKeyCommand(KeyStroke keystroke)
KeyStroke from the list of key-commands.
keystroke - the KeyStroke to remove.public void addDragComposite(BaseComposite composite)
BaseComposite to the list of dragged
Composites
composite - the BaseComposite to add.public void removeDragComposite(BaseComposite composite)
BaseComposite from the list of dragged
Composites
composite - the BaseComposite to remove.public void dragStart()
public void dragStop()
public void dragAt(InteractionInfo interactionInfo)
InteractionInfo specifies the occured drag.
interactionInfo - specifies the drag.public void dropStart()
CompositeView that a drop operation is about
to be started.
public void dropStop()
CompositeView that a drop operation has been
completed.
public int getAutoScrollingStartDelay()
public void setAutoScrollingStartDelay(int delay)
delay. The value must be given in milliseconds.
delay - the new value for the auto scrolling start delaypublic int getAutoScrollingSpeed()
public void setAutoScrollingSpeed(int autoscrollspeed)
autoscrollspeed. The value must be given in milliseconds.
autoscrollspeed - the new value for the auto scrolling speedpublic CursorRegistry getCursorRegistry()
public DragRepresentationRegistry getDragRepresentationRegistry()
public void internalSetDragRepresentationKey(java.lang.Object key)
public boolean isFixingCompositesOnInteraction()
public void enableFixingCompositesOnInteraction(boolean enabled)
public HighlightRegistry getHighlightRegistry()
public void internalSetHighlightKey(java.lang.Object key)
public int getEventmask()
public boolean areEventsEnabled(int eventmask)
true, if events of the given eventmask are enabled.
eventmask - the event-mask to check.
true if at least one the specified events is
enabled.public void enableEvents(int eventmask)
eventmask - specifies what events to enablepublic void disableEvents(int eventmask)
eventmask - specifies what events to disablepublic void addCompositeViewListener(CompositeViewListener listener)
CompositeViewListener to the
CompositeViews internal structure, such that the listener is
informed about every event that occurs.
listener - the CompositeViewListener to addpublic void removeCompositeViewListener(CompositeViewListener listener)
CompositeViewListener from the
CompositeViews internal structure, such that the listener is
no longer informed about occurring events.
listener - the CompositeViewListener to removepublic void addVetoableCompositeViewListener(VetoableCompositeViewListener listener)
VetoableCompositeViewListener to the
CompositeViews internal structure, such that the listener is
informed about every event that occurs.
listener - the VetoableCompositeViewListener to addpublic void removeVetoableCompositeViewListener(VetoableCompositeViewListener listener)
VetoableCompositeViewListener from the
CompositeViews internal structure, such that the listener is
no longer informed about occurring events.
listener - the VetoableCompositeViewListener to removepublic void addEventMediatorListener(EventMediatorListener listener)
EventMediatorListener given by
listener to the list of EventMediatorListeners
that will be informed of all events related to composites that occur.
listener - the EventMediatorListener to addpublic void removeEventMediatorListener(EventMediatorListener listener)
EventMediatorListener given by
listener from the list of
EventMediatorListeners so that he will no longer be
informed about events related to composites.
listener - the EventMediatorListener to removepublic void addVetoableEventMediatorListener(VetoableEventMediatorListener listener)
VetoableEventMediatorListener given by
listener to the list of
VetoableEventMediatorListeners that will be informed of all
events related to composites that occur.
listener - the VetoableEventMediatorListener to addpublic void removeVetoableEventMediatorListener(VetoableEventMediatorListener listener)
VetoableEventMediatorListener given by
listener from the list of
VetoableEventMediatorListeners so that he will no longer be
informed about events related to composites.
listener - the VetoableEventMediatorListener to removepublic void registerInteractionRegionCalculator(InteractionRegionCalculator interactionRegionCalculator)
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.
interactionRegionCalculator - the
InteractionRegionCalculator to registerpublic void updateView()
CoordinateSystem so that it fits to the
internal Composites
Observers
public Transform2D getViewTransform(Transform2D xform_context)
Transform2D of this view. If a transformation
is given, it will be combined with the resulting one.
xform_context - the Transform2D to be combined, may be
null.
Transform2D of this view.public CompositeViewRuler getRuler()
CompositeViewRuler object associated with this
view.
CompositeViewRuler object.public CompositeViewGrid getGrid()
CompositeViewGrid object associated with this
view.
CompositeViewGrid object.
public void draw(Renderer renderer,
Device device,
Transform2D xform_context)
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.
renderer - the Renderer used for drawingdevice - the Device used for drawingxform_context - the context transformation
public void draw(Renderer renderer,
Device device,
Transform2D xform_context,
int drawflags)
Primitives and Composites added to
the CompositeView with the Renderer
given by renderer onto the Device given by
device.
renderer - the Renderer used for drawingdevice - the Device used for drawingxform_context - the context transformationdrawflags - specifies what exactly should be drawn.public void setAttendPrintingHints(boolean attendPrintingHints)
attendPrintingHints.
attendPrintingHints - the new value for the attend printing hints flagpublic boolean getAttendPrintingHints()
boolean that indicates whether priting hints are
noticed or not.
public boolean isPrinting()
boolean that indicates whether the
CompositeView is currently printing or in the print preview
mode.
public void print(Renderer renderer,
Device device,
Transform2D xform_context,
BoundingBox bbox,
int drawFlags)
CompositeView on a printing device. The output areas size is
defined in the given BoundingBox bbox.
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)public void revalidateModePaint()
public void setModePaint(PaintFormat paint,
int mode)
paint - The paint format to usemode - The mode to which the paint format applies,
see the MODE_MASK constants in CompositeView!
public void setModePaint(PaintFormat paint,
int mode,
int modeMask)
paint - The paint format to usemode - 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.public PaintFormat getModePaint(int mode)
mode - The mode to retrieve the paint format for
public AttributeList getModePaints()
CompositeView,
so this set should only be used for transportation between
CompositeViews or for persistence.
public void setModePaints(AttributeList modePaints)
modePaints - the list of paint formatspublic void internalFireCompositesAddedEvent(java.util.List compositesAdded)
compositesAdded - List of the
BaseComposite instances that have been addedpublic void internalFireCompositesRemovedEvent(java.util.List compositesRemoved)
compositesRemoved - List of the
BaseComposite instances that have been removedpublic void internalFireSelectionChangeEvent(java.util.List selectionOld)
selectionOld - List of the
BaseComposite instances that were selected previously
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||