public class IlvManager extends IlvBidiGraphic implements IlvGraphicBag, GraphicBagHierarchyEventReceiver, ManagerViewsHierarchyEventReceiver, ClipboardOwner, IlvBlinkingObjectOwner, IlvObjectWithSelection, IlvULocaleAware, IlvComponentOrientationAware
IlvManager
is the container class used to store and manipulate
IlvGraphic
objects displayed in one or more IlvManagerView
instance.
All graphic objects stored in a manager share the same coordinate system. The smallest rectangle encompassing all graphic objects in a manager is called the bounding box of the manager.
For each graphic object stored in a manager, you can specify if it is:
setVisible(IlvGraphic, boolean, boolean)
setSelectable(int, boolean)
setMovable(IlvGraphic, boolean)
setEditable(IlvGraphic, boolean)
Each graphic object is managed by one single manager at a time, but can
be moved from one manager to another. A graphic object cannot be contained
by two different managers simultaneously. Graphic objects are added to
a manager by calling addObject(IlvGraphic, boolean)
or
addObject(IlvGraphic, int, boolean)
and removed
using removeObject(IlvGraphic, boolean)
.
Managers organize graphic objects by placing them in a layer, that is, an
IlvManagerLayer
instance; by default, a manager is
created with one layer. New layers are created automatically when
you add a graphic object to a manager and specify a layer it is to be placed
in by calling addObject(IlvGraphic, int, boolean)
. For
example, a call to addObject(obj, n, false)
will insert
obj
in layer n. If layer n does not exist, the number of layers
in the manager is increased automatically. Objects stored in a
higher layer are displayed in front of objects in lower layers. As with
graphic objects, each layer is controlled by a single manager at a time.
To change the layer, use the method
setLayer(IlvGraphic, int, boolean)
.
You display graphic objects stored in a manager using a view, that is, an
IlvManagerView
instance. As with layers and graphic objects, a
view is attached to a single manager at a time. However, each manager
can have multiple views. For more information, see IlvManagerView
.
Managers are themselves graphic objects that can be embedded inside another manager. This nesting feature of Rogue Wave JViews allows you to create applications that display a graphic inside another graphic. A manager nested inside another manager is called a submanager.
The following example shows how to display graphic objects contained in layers in a manager using a view.
IlvManager manager = new IlvManager(); // Create new graphic objects and add them to bottom layer in the // manager. IlvGraphic obj = new IlvEllipse(new IlvRect(30, 10, 50, 50), true, false); manager.addObject(obj, false); // Add a new graphic object on a higher layer obj = new IlvRectangle(new IlvRect(70, 40, 50, 50), false, true); manager.addObject(obj, 2, true); // Attach the manager to a view IlvManagerView view = new IlvManagerView(manager); view.setBackground(Color.RED); // Display the view in a scrollable component JFrame frame = new JFrame("IlvManagerExample"); IlvJScrollManagerView scrollView = new IlvJScrollManagerView(view); scrollView.setHorizontalScrollBarPolicy(IlvJScrollManagerView.HORIZONTAL_SCROLLBAR_AS_NEEDED); scrollView.setVerticalScrollBarPolicy(IlvJScrollManagerView.VERTICAL_SCROLLBAR_AS_NEEDED); frame.getContentPane().add(scrollView); frame.setSize(160, 160); frame.setVisible(true);
The following image shows the manager created in the code example.
IlvManager
enables you to add interactive content to your
application in the form of shortcut menus. For a full explanation
of how to do this, see IlvGraphic
.
IlvManagerViewInteractor
that are attached to a view and process
global events for the specific view;IlvObjectInteractor
that are attached to a graphic object and
process local events;IlvAccelerator
instances that
are added to a manager and process the events for the manager.
Typically, accelerators are used to handle keyboard events that initiate an
action.
When the content of the manager changes, the manager fires a
ManagerContentChangedEvent
event. Manager content change is defined as when an object is added to or
removed from the manager, or when the visibility, the bounding box or the
layer of a graphic object changes. To listen for and handle manager content
modifications, implement the ManagerContentChangedListener
interface and register the listener using
addManagerContentChangedListener(ManagerContentChangedListener)
.
For nested managers, you can also register a global listener for events
occurring in any submanager using
addManagerTreeContentChangedListener(ManagerContentChangedListener)
.
Similar mechanisms exist for listening to other types of events. For details,
see the methods
addManagerExpansionListener(ManagerExpansionListener)
,
addManagerLayerListener(ManagerLayerListener)
,
addManagerSelectionListener(ManagerSelectionListener)
,
addManagerTreeSelectionListener(ManagerSelectionListener)
,
and addManagerViewsListener(ManagerViewsChangedListener)
.
IlvManager
contains a set of methods to read and write graphic
object descriptions to an IVL file. Manager properties, such as the layer or
name of an object, can also be read and written.
Note: The recommended way to serialize any manager is through IVL
serialization and not Java serialization.
Java serialization cannot work for managers that contain graphic objects
such as IlvIcon
. These classes manage
internal JDK objects that are not Java serializable.
Modifier and Type | Field and Description |
---|---|
static int |
HH_BLUR
The "Blur" mode for hover highlighting in
setHoverHighlightingMode(int) . |
static int |
HH_BRIGHTEN
The "Brighten" mode for hover highlighting in
setHoverHighlightingMode(int) . |
static int |
HH_CUSTOM
Indicates a custom mode for hover highlighting when returned by
getHoverHighlightingMode() . |
static int |
HH_GRAYSCALE
The "Gray scale" mode for hover highlighting in
setHoverHighlightingMode(int) . |
static int |
HH_INVERT_COLORS
The "Invert Colors" mode for hover highlighting in *
setHoverHighlightingMode(int) . |
static int |
HH_NONE
Constant to indicate deactivation of the hover highlighting in
setHoverHighlightingMode(int) . |
static int |
HH_SHARPEN
The "Sharpen" mode for hover highlighting in
setHoverHighlightingMode(int) . |
Constructor and Description |
---|
IlvManager()
Creates a new
IlvManager . |
IlvManager(IlvInputStream stream)
Reads the manager from an
IlvInputStream . |
IlvManager(IlvManager origin)
Creates a new
IlvManager by copying an existing one. |
IlvManager(int numberOfLayers)
Creates a new
IlvManager . |
IlvManager(int numberOfLayers,
int maxInList)
Creates a new
IlvManager . |
Modifier and Type | Method and Description |
---|---|
void |
abortReDraws()
Aborts an
initRedraws/invalidateRegion session. |
void |
addAccelerator(IlvAccelerator a)
Adds an accelerator in the manager.
|
void |
addGraphicBagHierarchyListener(GraphicBagHierarchyListener listener)
Adds the specified listener to receive events from the ancestor
managers and from this manager when the hierarchy of managers
has changed.
|
void |
addLayer(IlvManagerLayer layer,
int index)
Adds a layer at the specified index in the manager.
|
void |
addLayer(int index)
Adds a layer at the specified index.
|
void |
addManagerContentChangedListener(ManagerContentChangedListener listener)
Adds the specified listener to receive events from the manager
when its contents have changed, for example when an object is added
or removed.
|
void |
addManagerExpansionListener(ManagerExpansionListener listener)
Adds the specified listener to receive events from the manager
when the manager is collapsed or expanded.
|
void |
addManagerLayerListener(ManagerLayerListener listener)
Adds the specified layer listener to receive layer modification events
when a layer is added or removed, or when the index of a layer changes.
|
void |
addManagerSelectionListener(ManagerSelectionListener listener)
Adds the specified listener to receive events from the manager when
the selection changes.
|
void |
addManagerTreeContentChangedListener(ManagerContentChangedListener listener)
Adds the specified listener to receive events from this manager
and its submanagers
when the contents have changed, for example when an object is added
or removed.
|
void |
addManagerTreeSelectionListener(ManagerSelectionListener listener)
Adds the specified listener to receive events from the manager
and the submanagers when the selection changes.
|
void |
addManagerViewsHierarchyListener(ManagerViewsChangedListener listener)
Adds the specified listener to receive events from
this manager or ancestor managers when a view displaying the content
of the manager is added or removed.
|
void |
addManagerViewsListener(ManagerViewsChangedListener listener)
Adds the specified listener to receive events from
this manager when a view displaying the contents of the
manager is added or removed.
|
void |
addObject(IlvGraphic obj,
boolean redraw)
Adds the specified graphic object in the manager.
|
void |
addObject(IlvGraphic obj,
int layer,
boolean redraw)
Adds the specified graphic object in the manager.
|
protected boolean |
afterInvalidateRegion(IlvGraphic object,
IlvRect objectBBox,
IlvManagerView view,
IlvTransformer t,
Object info)
Returns
true if the region of the object must be invalidated. |
void |
afterTransform(IlvGraphic obj,
boolean redraw,
boolean ifneeded,
boolean parent,
boolean fireEvent)
This method is automatically called by
applyToObject
after the contents of this manager changed. |
protected void |
afterTransformObj(IlvGraphic obj,
boolean redraw,
boolean ifneeded,
boolean parent,
boolean fireEvent)
|
boolean |
allowMoving(IlvGraphic obj)
Returns
true if the object can be moved with
the selection interactor (IlvSelectInteractor ). |
void |
applyToObject(IlvGraphic obj,
IlvApplyObject f,
Object arg,
boolean redraw)
Applies a method to a graphic object.
|
void |
applyToObjects(IlvGraphicEnumeration enumeration,
IlvApplyObject f,
Object arg,
boolean redraw)
Applies a method to many graphic objects.
|
void |
applyToObjects(IlvGraphicEnumeration enumeration,
IlvApplyObjects f,
Object arg,
boolean redraw)
Applies a method that affects many graphic objects.
|
void |
applyToObjects(IlvGraphicVector vector,
IlvApplyObject f,
Object arg,
boolean redraw)
Applies a method to many graphic objects.
|
void |
applyToObjects(IlvGraphicVector vector,
IlvApplyObjects f,
Object arg,
boolean redraw)
Applies a method that affects many graphic objects.
|
void |
applyTransform(IlvTransformer t)
Applies a transformation to the manager.
|
void |
baseTextDirectionChanged(int oldBaseTextDirection,
int newBaseTextDirection)
Called when the object is base text direction sensitive and the
resolved base text direction has changed.
|
protected Object |
beforeInvalidateRegion(IlvGraphic object,
IlvManagerView view,
IlvTransformer t)
Calculates the info necessary to decide whether the region of the
object must be invalidated.
|
void |
beforeTransform(IlvGraphic obj,
boolean redraw,
boolean ifneeded,
boolean parent)
This method is automatically called by
applyToObject
before the contents of this manager changes. |
protected void |
beforeTransformObj(IlvGraphic obj,
boolean redraw,
boolean ifneeded,
boolean parent)
|
void |
blinkingReDraw()
Redraws all the invalid regions of those manager views that have
blinking enabled.
|
IlvRect |
boundingBox(IlvTransformer t)
Returns the bounding rectangle of the manager when
drawn with the specified transformer.
|
void |
check(boolean verbose)
Performs a deep integrity test of the manager.
|
void |
componentOrientationChanged(ComponentOrientation oldOri,
ComponentOrientation newOri)
Called when the object is component orientation sensitive and the
component orientation has changed.
|
IlvRect |
computeBBox(IlvTransformer t)
Computes the rectangle that contains all the graphic objects of the
manager.
|
IlvRect |
computeBBox(IlvTransformer t,
boolean withSelection)
Computes the rectangle that contains all the graphic objects of the
manager.
|
boolean |
contains(IlvPoint p,
IlvPoint tp,
IlvTransformer t)
Tests if a point lies within this manager.
|
boolean |
containsFrame(IlvPoint p,
IlvPoint tp,
IlvTransformer t)
Tests if the specified point lie within the manager frame.
|
protected void |
contentsChanged(int type)
Called when the contents of the manager have changed.
|
IlvGraphic |
copy()
Creates a new manager by copying this manager.
|
void |
copySelection()
Copies the selected graphic objects to the clipboard.
|
protected IlvInputStream |
createInputStream(InputStream stream)
Creates an
IlvInputStream to read a manager. |
protected IlvManagerLayer |
createManagerLayer(int index)
Creates a new manager layer.
|
protected IlvOutputStream |
createOutputStream(OutputStream stream)
Creates an
IlvOutputStream to write a manager. |
void |
deleteAll(boolean redraw)
Removes all the graphic objects from the
manager.
|
void |
deleteAll(int layer,
boolean redraw)
Removes all the graphic objects from a
manager layer.
|
void |
deleteSelections(boolean redraw)
Removes the selected objects.
|
void |
deleteSelections(boolean traverse,
boolean redraw)
Removes the selected objects.
|
void |
deSelectAll(boolean redraw)
Deselects all the graphic objects in the manager.
|
void |
deSelectAll(boolean traverse,
boolean redraw)
Deselects all the graphic objects in the manager.
|
void |
deSelectAll(int layer,
boolean redraw)
Deselects all the graphic objects in a layer.
|
boolean |
dispatchToObjects(AWTEvent event,
IlvManagerView view)
Dispatches the event to an object.
|
void |
draw(Graphics dst,
IlvManagerView view)
Draws the contents of the manager.
|
void |
draw(Graphics dst,
IlvTransformer t)
Draws the manager.
|
void |
duplicateSelections(double dx,
double dy,
IlvTransformer t,
boolean traverse)
Duplicates the selected objects.
|
void |
duplicateSelections(int dx,
int dy)
Duplicates the selected objects.
|
void |
enableGraphicBagHierarchyEventForwarding()
Enables forwarding of
GraphicBagHierarchyEvent events, since
the objects contained in this manager need to receive the events. |
void |
enableManagerViewsHierarchyEventForwarding()
Enables forwarding of
ManagerViewsChangedEvent events through the nesting hierarchy,
since the subobjects contained in this manager need to receive the events. |
void |
fireGraphicBagHierarchyEvent(GraphicBagHierarchyEvent event)
Fires a graphic bag hierarchy event to this manager and all
contained objects.
|
void |
fireManagerViewsHierarchyEvent(ManagerViewsChangedEvent event)
Fires a
ManagerViewsChangedEvent event to all listeners
installed via addManagerViewsHierarchyListener(ilog.views.event.ManagerViewsChangedListener) on this manager or
contained objects. |
IlvAccelerator[] |
getAccelerators()
Returns an array of all the accelerators.
|
IlvGraphicVector |
getAllObjects(IlvPoint p,
IlvManagerView view,
boolean traverse,
boolean includeSubManagersIfInnerNodesFound)
Returns all visible graphic objects located at the specified point in a
manager view.
|
IlvGraphicVector |
getAllObjects(IlvPoint p,
int layer,
IlvManagerView view)
Returns all visible graphic objects located at the specified point in a
manager view for a specified layer.
|
IlvGraphicVector |
getAllSelectableObjects(IlvPoint p,
IlvManagerView view,
IlvTransformer t,
boolean traverse,
boolean includeParentsIfInnerFound)
Returns all selectable graphic objects at the specified point in a
manager view.
|
int |
getCardinal()
Returns the number of objects stored in the manager.
|
int |
getCardinal(boolean traverse)
Returns the number of objects stored in the manager and in
the managers that have been added recursively in this manager.
|
int |
getCardinal(int layer)
Returns the number of objects in the specified layer.
|
IlvGraphic |
getCollapsedGraphic()
Returns the representation of the manager when the manager is collapsed.
|
IlvObjectWithSelection |
getCollapseExpandObject(IlvPoint p,
IlvManagerView view,
IlvTransformer t,
boolean traverse)
Returns the first object that can change its collapsed or expanded state
when the input point is clicked.
|
ComponentOrientation |
getComponentOrientation()
Returns the component orientation of this manager.
|
IlvTransformer |
getDrawingTransformer(IlvManagerView view)
Returns the transformer used to draw this manager.
|
URL |
getFileName()
Returns the file read in the manager.
|
IlvManagerFrame |
getFrame()
Returns the frame of the manager.
|
IlvHoverHighlightingImageOperation |
getHoverHighlightingImageOperation()
Returns the hover highlighting image operation or
null if
none is set on this manager. |
int |
getHoverHighlightingMode()
Returns the highlight modes.
|
int |
getInsertionLayer()
Returns the default layer where objects are inserted.
|
IlvPoint |
getIntersectionWithOutline(IlvPoint innerPoint,
IlvPoint outerPoint,
IlvTransformer t)
Returns the intersection of the line segment from inner point to outer
point with the shape of the graphic object.
|
int |
getLayer(IlvGraphic obj)
Returns the index of the layer
where the specified graphic object is stored.
|
int |
getLayer(String name)
Returns the index of the layer with the specified name.
|
String |
getLayerName(int layer)
Returns the name of the specified layer.
|
int |
getLayersCount()
Returns the number of layers in the manager.
|
IlvManagerLayer |
getManagerLayer(IlvGraphic obj)
Returns the layer
where the specified graphic object is stored.
|
IlvManagerLayer |
getManagerLayer(int layer)
Returns the layer at a specified index.
|
IlvManagerLayer |
getManagerLayer(String name)
Returns the layer with the specified name.
|
IlvGraphicEnumeration |
getManagers()
Returns an enumeration of all the managers that have
been added in this manager.
|
IlvGraphicEnumeration |
getManagers(int layer)
Returns an enumeration of all the managers that have
been added in this manager in the specified layer.
|
int |
getManagersCount()
Returns the number of managers that have
been added in this manager.
|
int |
getManagersCount(int layer)
Returns the number of managers that have
been added in this manager in the specified layer.
|
IlvGraphic |
getObject(IlvPoint p,
IlvManagerView view)
Returns the graphic object located at the specified point in a
manager view; otherwise, it returns
null . |
IlvGraphic |
getObject(IlvPoint p,
IlvManagerView view,
boolean traverse)
Returns the graphic object located at the specified point in a
manager view; otherwise, it returns
null . |
IlvGraphic |
getObject(IlvPoint p,
int layer,
IlvManagerView view)
Returns the graphic object located at the specified point in a
manager view for a specified layer; otherwise, it returns
null . |
IlvGraphic |
getObject(String name)
Returns the object with the specified name, or
null if there
is no object with this name. |
IlvObjectInteractor |
getObjectInteractor(IlvGraphic obj)
Deprecated.
Beginning with Rogue Wave JViews 5.0 you should use
IlvGraphic.getObjectInteractor() instead. |
String |
getObjectName(IlvGraphic obj)
Returns the name of the specified graphic object.
|
protected static IlvObjectProperty |
getObjectProperty(IlvGraphic obj)
Returns the object property for the input object.
|
IlvGraphicEnumeration |
getObjects()
Returns an enumeration of all the objects in the manager.
|
IlvGraphicEnumeration |
getObjects(boolean traverse)
Returns an enumeration of all the objects in the manager and
in the managers that have been added recursively in this manager.
|
IlvGraphicEnumeration |
getObjects(int layer)
Returns an enumeration of all the objects in a layer.
|
long |
getOptimizedLayerThreshold()
Returns the threshold for optimized layer operations.
|
IlvManager |
getParent()
Returns the manager that contains this manager, or
null if this manager is not contained
in a manager. |
Object |
getProperty(String key)
Returns the value of a property.
|
IlvGraphic |
getSelectableObject(IlvPoint p,
IlvManagerView view,
IlvTransformer t,
boolean traverse)
Returns the first selectable graphic object at the specified point in a
manager view.
|
IlvGraphicEnumeration |
getSelectedMovingObjects(boolean[] flags)
Returns the selected objects that should be moved by the select interactor.
|
IlvGraphicEnumeration |
getSelectedObjects()
Returns an enumeration of all the selected objects.
|
IlvGraphicEnumeration |
getSelectedObjects(boolean traverse)
Returns an enumeration of all the selected
objects in this manager.
|
IlvGraphicEnumeration |
getSelectedObjects(boolean traverse,
boolean onlyInManagers)
Returns an enumeration of all the selected
objects in this manager.
|
int |
getSelectedObjectsCount()
Returns the number of selected objects.
|
int |
getSelectedObjectsCount(boolean traverse)
Returns the number of selected objects.
|
int |
getSelectedObjectsCount(boolean traverse,
boolean onlyInManagers)
Returns the number of selected objects.
|
IlvSelection |
getSelection(IlvGraphic obj)
Returns the selection object (instance of
IlvSelection )
associated with the specified graphic object, or null
if the object is not selected. |
IlvSelection |
getSelection(IlvPoint p,
IlvManagerView view)
Returns the selection object (instance of
IlvSelection )
located at the specified point in a manager view. |
IlvSelection |
getSelection(IlvPoint p,
IlvManagerView view,
boolean traverse)
Returns the selection object (instance of
IlvSelection )
located at the specified point in a manager view. |
IlvSelectionFactory |
getSelectionFactory()
Returns the selection factory installed in the manager,
or
null
if no factory is installed. |
IlvGraphicEnumeration |
getSelections()
Returns an enumeration of all the selection
objects (instances of
IlvSelection ). |
double |
getSizeLimitToDrawSubmanagerContents()
Returns the size limit to draw the contents of the manager when used
as submanager.
|
ComponentOrientation |
getStoredComponentOrientation()
Returns the stored component orientation of this manager.
|
ULocale |
getStoredULocale()
Returns the stored locale of this manager.
|
IlvManagerStreamFactory |
getStreamFactory()
Returns the stream factory installed in the manager.
|
IlvTransformer |
getTopLevelTransformer()
Returns the transformer that allows converting from the coordinate
system of this manager to the coordinate system of the top-level manager.
|
IlvTransformer |
getTransformer()
Returns the local transformer of this manager.
|
Object |
getTreeLock()
Returns the object used to synchronize the
content of the manager for multi-threaded
environment.
|
ULocale |
getULocale()
Returns the effective locale of this manager.
|
Object |
getUserData()
Deprecated.
Beginning with Rogue Wave JViews 5.5 you should use
IlvGraphic.getProperty(java.lang.String) instead. |
Enumeration |
getViews()
Returns an enumeration of the manager views.
|
protected boolean |
handleAccelerators(AWTEvent evt,
IlvManagerView view)
Handles the accelerators in the manager view.
|
boolean |
hasProperty(String key,
Object value)
Tests the value of a property.
|
protected void |
init(int numberOfLayers,
int maxInList)
Initializes the manager.
|
void |
initReDraws()
Starts an
initRedraws/invalidateRegion/reDrawViews
session. |
void |
invalidateRegion(IlvGraphic object)
Stores the rectangle occupied by
object
in all manager views for a further call of reDrawViews() . |
void |
invalidateRegion(IlvManagerView view,
IlvRect rect)
Stores the rectangle in a manager view for a further call
of
reDrawViews() . |
void |
invalidateRegion(IlvRect rect)
Stores the rectangle in all manager views for a further call
of
reDrawViews . |
boolean |
isAutoLabelForCollapsedGraphic()
Returns
true if the label of the collapsed graphic is
determined automatically from the subgraph name. |
boolean |
isBaseTextDirectionSensitive()
Returns
true if the bounding box of this object depends on
the base text direction of this object. |
boolean |
isCollapsed()
Returns the collapsed/expanded status of the manager.
|
boolean |
isCollapsible()
Returns whether the object can be collapsed or expanded.
|
boolean |
isComponentOrientationSensitive()
Returns
true if the bounding box of this object depends
on the component orientation of this object. |
boolean |
isContentsAdjusting()
Returns
true if the manager is currently doing
a major modification of its contents. |
boolean |
isDebugBoundingBoxes()
Returns whether debugging the bounding boxes is enabled.
|
boolean |
isEditable(IlvGraphic obj)
Returns
true if the object is editable with the
selection interactor (IlvSelectInteractor ). |
boolean |
isInsertionAdjusting()
Returns
true if the manager is currently doing
a major insertion of objects. |
boolean |
isInvalidating()
Returns
true if the manager is in an
initReDraws/reDrawViews session. |
boolean |
isKeepingAspectRatio()
Returns
true if the local transformer of this manager
keeps the aspect ratio; otherwise it returns false . |
boolean |
isLocaleSensitive()
Returns
true if the bounding box of this object depends
on the locale of this object. |
boolean |
isManaged(IlvGraphic obj)
Returns
true if the specified object is in the manager. |
boolean |
isMovable(IlvGraphic obj)
Returns
true if the object was set to movable. |
boolean |
isSelectable(IlvGraphic obj)
Returns
true if the object can be selected with
the select interactor (IlvSelectInteractor ). |
boolean |
isSelectable(int layer)
Returns
true if the objects of a layer can be selected
with the selection interactor (IlvSelectInteractor ). |
boolean |
isSelected(IlvGraphic obj)
Returns
true if the specified graphic object is selected,
that is, there is a selection object associated with it. |
boolean |
isSelectionAdjusting()
Returns whether we are currently selecting or deselecting a series of
objects.
|
boolean |
isSelectionInvariantSubManagerBounds()
Returns whether selection-invariant submanager bounds are enabled.
|
boolean |
isVisible(IlvGraphic obj)
Returns
true if the specified object is visible. |
boolean |
isVisible(IlvGraphic obj,
IlvManagerView view)
Returns
true if the object is visible in the manager view. |
boolean |
isVisible(IlvManagerView view,
int layer)
Returns
true if the layer is visible in the specified view. |
boolean |
isVisible(int layer)
Returns the visibility of the specified layer.
|
void |
localeChanged(ULocale oldLocale,
ULocale newLocale)
Called when the object is locale sensitive and the locale has changed.
|
void |
lostOwnership(Clipboard clipboard,
Transferable contents)
Called when the ownership of the clipboard
is lost by the manager.
|
protected IlvObjectProperty |
makeObjectProperty(IlvGraphic obj)
Creates the object property for the input object.
|
void |
map(IlvApplyObject f,
Object arg)
Applies a function on all objects of the manager.
|
void |
map(IlvApplyObject f,
Object arg,
boolean traverse)
Applies a function on all objects of the manager.
|
void |
mapInside(IlvApplyObject f,
Object arg,
IlvRect rect,
IlvTransformer t)
Applies a function on all objects of the manager that are inside
the specified rectangle.
|
void |
mapInside(IlvApplyObject f,
Object arg,
IlvRect rect,
IlvTransformer t,
boolean traverse)
Applies a function on all objects of the manager that are inside
the specified rectangle.
|
void |
mapIntersects(IlvApplyObject f,
Object arg,
IlvRect rect,
IlvTransformer t)
Applies a function on all objects of the manager that intersect
the specified rectangle.
|
void |
mapIntersects(IlvApplyObject f,
Object arg,
IlvRect rect,
IlvTransformer t,
boolean traverse)
Applies a function on all objects of the manager that intersect
the specified rectangle.
|
void |
moveObject(IlvGraphic obj,
double x,
double y,
boolean redraw)
Changes the position of the specified graphic object.
|
void |
moveResize(IlvRect size)
Resizes the
IlvManager . |
protected boolean |
needsDrawSubmanagerContents(double innerWidth,
double innerHeight,
IlvTransformer t)
Returns whether the contents of this manager needs to be drawn
if the manager is used a submanager.
|
boolean |
needsGraphicBagHierarchyEvent()
Returns whether this manager needs to receive
GraphicBagHierarchyEvent events, either from itself or from its
ancestors. |
boolean |
needsManagerViewsHierarchyEvent()
Returns whether the manager needs to receive
ManagerViewsChangedEvent events, either from itself or from its
ancestors. |
boolean |
objectIsSelectable(IlvGraphic obj)
Returns
true if the object can be selected with
the select interactor (IlvSelectInteractor ). |
protected void |
objectRemoved(IlvGraphic obj)
This method is called when an object is removed from the manager.
|
IlvGraphicEnumeration |
pasteSelection(IlvPoint p,
boolean select)
Pastes the graphic objects saved in the clipboard
into the manager.
|
void |
print(Graphics dst,
IlvRect area,
IlvManagerView view,
IlvTransformer t,
boolean allLayers)
Prints the contents of the manager.
|
boolean |
processEvent(AWTEvent evt,
IlvManagerView view)
Handles the events in the specified view of the manager.
|
protected boolean |
processEvent(IlvGraphic obj,
AWTEvent event,
IlvManagerView view)
Sends the event to an object.
|
boolean |
processHoverHighlightingEvent(AWTEvent event,
IlvManagerView view)
Handles the hover highlighting events in the specified view of the manager.
|
boolean |
processHoverHighlightingEvent(AWTEvent event,
IlvManagerView view,
IlvGraphic obj)
Handles the hover highlighting events in the specified view of the manager.
|
boolean |
read(InputStream stream)
Reads a Rogue Wave JViews formatted file in the manager.
|
boolean |
read(String filename)
Reads a Rogue Wave JViews formatted file in the manager.
|
boolean |
read(URL url)
Reads a Rogue Wave JViews formatted file from an URL.
|
void |
readPrefix(IlvInputStream stream,
boolean isSubManager)
Reads properties of the manager.
|
void |
readSuffix(IlvInputStream stream,
boolean isSubManager)
Reads properties of the manager.
|
void |
reDraw()
Redraws all the views of the manager.
|
void |
reDrawObj(IlvGraphic obj)
Redraws a graphic object of the manager.
|
void |
reDrawRegion(IlvRegion region)
Redraws a region of the manager.
|
void |
reDrawViews()
Redraws all the invalid regions of the manager views.
|
void |
removeAccelerator(IlvAccelerator a)
Removes an accelerator from the manager.
|
void |
removeGraphicBagHierarchyListener(GraphicBagHierarchyListener listener)
Removes the specified listener so that it no longer
receives events from ancestor manager and from this manager when the
hierarchy of managers has changed.
|
void |
removeLayer(int layer,
boolean redraw)
Removes the layer at the specified index.
|
void |
removeManagerContentChangedListener(ManagerContentChangedListener listener)
Removes the specified listener so that it no longer
receives events from this manager when the contents of the manager
change.
|
void |
removeManagerExpansionListener(ManagerExpansionListener listener)
Removes the specified listener so that it no longer
receives events from this manager when the manager is collapsed
or expanded.
|
void |
removeManagerLayerListener(ManagerLayerListener listener)
Removes the specified listener so that it no longer receives layer-changed
events from this manager.
|
void |
removeManagerSelectionListener(ManagerSelectionListener listener)
Removes the specified selection listener so that it no longer
receives events from the manager when the selection changes.
|
void |
removeManagerTreeContentChangedListener(ManagerContentChangedListener listener)
Removes the specified listener so that it no longer
receives events from this manager and its submanagers when the contents
change.
|
void |
removeManagerTreeSelectionListener(ManagerSelectionListener listener)
Removes the specified selection listener so that it no longer
receives events from the manager or its submanager
when the selection changes.
|
void |
removeManagerViewsHierarchyListener(ManagerViewsChangedListener listener)
Removes the specified listener so that it no longer
receives events from ancestors and from this manager
when a manager view was added or removed.
|
void |
removeManagerViewsListener(ManagerViewsChangedListener listener)
Removes the specified listener so that it no longer
receives events from this manager when a view is added
or removed.
|
void |
removeObject(IlvGraphic obj,
boolean redraw)
Removes the specified object from the manager.
|
boolean |
removeProperty(String key)
Removes a property.
|
void |
replaceObject(IlvGraphic oldObject,
IlvGraphic newObject,
boolean redraw)
Replaces an object of the
IlvManager by another one. |
boolean |
replaceProperty(String key,
Object value)
Replaces the value of an existing property.
|
void |
reshapeObject(IlvGraphic obj,
IlvRect newrect,
boolean redraw)
Changes the size of the specified object.
|
void |
selectAll(boolean redraw)
Selects all the visible graphic objects in the manager.
|
void |
selectAll(boolean traverse,
boolean redraw)
Selects all the visible graphic objects in the manager.
|
void |
selectAll(IlvManagerView view,
boolean redraw)
Selects all the graphic objects that are visible in a
view.
|
protected void |
selectionChanged(IlvGraphic obj)
Called when a selection changes in the
manager.
|
void |
setAccelerators(IlvAccelerator[] acc)
Changes all the accelerators.
|
void |
setAutoLabelForCollapsedGraphic(boolean set)
Sets whether the label of the collapsed graphic is
determined automatically from the subgraph name.
|
void |
setBaseTextDirection(int baseTextDirection,
boolean redraw)
Changes the base direction of the text.
|
void |
setCollapsed(boolean collapsing)
Collapses or expands the manager.
|
void |
setCollapsedGraphic(IlvGraphic graphic)
Changes the representation of the manager when the manager is collapsed.
|
void |
setComponentOrientation(ComponentOrientation co)
Sets the component orientation of this manager.
|
void |
setComponentOrientation(ComponentOrientation co,
boolean redraw)
Sets the component orientation of this manager.
|
void |
setContentsAdjusting(boolean set)
Tells the manager that it is the beginning or the end of a major
modification of its contents.
|
void |
setContentsAdjusting(boolean set,
boolean allParents)
Tells the manager and optionally all its parent managers that it is the
beginning or the end of a major modification of its contents.
|
void |
setDebugBoundingBoxes(boolean debug)
Enables or disables debugging the bounding boxes.
|
static void |
setDebugBoundingBoxesGlobal(boolean debug)
Enables or disables globally debugging the bounding boxes.
|
void |
setEditable(IlvGraphic obj,
boolean v)
Allows or disallows editing of the object with the
selection interactor (
IlvSelectInteractor ). |
void |
setFileName(URL fileName)
Loads an IVL file in the manager.
|
void |
setFrame(IlvManagerFrame frame)
Sets the frame of the manager.
|
void |
setGraphicBag(IlvGraphicBag bag)
Changes the bag that contains the object.
|
void |
setHoverHighlightingImageOperation(IlvHoverHighlightingImageOperation hoverHighlightingImageOperation)
Sets the hover highlighting image operation.
|
void |
setHoverHighlightingMode(int mode)
Sets one of the predefined highlighting modes.
|
void |
setInsertionAdjusting(boolean flag)
Tells the manager that it is the beginning or the end of a major
insertion of objects.
|
void |
setInsertionLayer(int layer)
Changes the default layer where objects are inserted.
|
void |
setKeepingAspectRatio(boolean set)
Allows or inhibits the ability of the local transformer of this manager
to have different zoom factors along the x and y axes.
|
void |
setLayer(IlvGraphic obj,
int newLayer,
boolean redraw)
Changes the layer of a graphic object.
|
void |
setLayerName(int layer,
String name)
Changes the name of the specified layer.
|
void |
setMovable(IlvGraphic obj,
boolean v)
Allows or prohibits the object move with
the selection interactor (
IlvSelectInteractor ). |
void |
setNameImpl(String name)
Sets the name of the manager.
|
void |
setNumberOfLayer(int layerCardinal)
Increases, if necessary, the number of layers of the manager.
|
void |
setObjectInteractor(IlvGraphic obj,
IlvObjectInteractor interactor)
Deprecated.
Beginning with Rogue Wave JViews 5.0 you should
use
IlvGraphic.setObjectInteractor(ilog.views.IlvObjectInteractor) instead. |
boolean |
setObjectName(IlvGraphic obj,
String name)
Changes the name of an object managed by this manager.
|
void |
setOptimizedLayerThreshold(long threshold)
Sets the threshold when to use optimized layer operations.
|
void |
setProperty(String key,
Object value)
Sets the value of a property.
|
void |
setSelectable(IlvGraphic obj,
boolean v)
Allows or disallow the specified object to be selected
with the selection interactor (
IlvSelectInteractor ). |
void |
setSelectable(int layer,
boolean v)
Allows or prohibits the selection of objects in a layer
by the selection interactor (
IlvSelectInteractor ). |
void |
setSelected(IlvGraphic obj,
boolean select,
boolean redraw)
Selects or deselects the specified graphic object.
|
void |
setSelected(IlvGraphic obj,
IlvPoint p,
IlvManagerView view)
Selects the specified graphic object.
|
void |
setSelectionAdjusting(boolean set)
Starts a series of selection events.
|
void |
setSelectionEventSource(Object source)
Changes the source for selection events.
|
void |
setSelectionFactory(IlvSelectionFactory factory)
Installs a selection factory in the manager.
|
void |
setSelectionInvariantSubManagerBounds(boolean enable)
Enables or disables selection-invariant submanager bounds.
|
void |
setSizeLimitToDrawSubmanagerContents(double limit)
Sets the size limit to draw the contents of the manager when used
as submanager.
|
void |
setStreamFactory(IlvManagerStreamFactory factory)
Installs a stream factory in the manager.
|
void |
setTransformer(IlvTransformer t)
Changes the local transformer of this manager.
|
void |
setULocale(ULocale locale)
Sets the locale of this manager.
|
void |
setULocale(ULocale locale,
boolean redraw)
Sets the locale of this manager.
|
void |
setUserData(Object data)
Deprecated.
Beginning with Rogue Wave JViews 5.5 you should use
IlvGraphic.setProperty(java.lang.String, java.lang.Object) instead. |
void |
setVisible(IlvGraphic obj,
boolean visible,
boolean redraw)
Changes the visibility of the specified object.
|
void |
setVisible(IlvManagerView view,
int layer,
boolean set,
boolean redraw)
Changes the visibility of a layer for one view.
|
void |
setVisible(int layer,
boolean value,
boolean redraw)
Changes the visibility of a layer for all views.
|
boolean |
shortCut(AWTEvent evt,
IlvManagerView view)
Handles the accelerators in the manager view.
|
void |
swapLayers(int layer1,
int layer2,
boolean redraw)
Swaps two layers.
|
void |
translateObjects(IlvGraphicEnumeration enumeration,
double dx,
double dy,
IlvTransformer t)
Translates the input objects that must belong to this manager.
|
void |
translateSelections(double dx,
double dy,
IlvManagerView view)
Translates the selected objects.
|
protected void |
viewAdded(IlvManagerView view)
Called when a manager view is added to the
manager.
|
protected void |
viewRemoved(IlvManagerView view)
Called when a manager view is removed from the
manager.
|
void |
write(IlvOutputStream stream)
Stores the contents of the manager to an
IlvOutputStream . |
void |
write(OutputStream stream)
Writes the manager to an output stream in ASCII mode.
|
void |
write(OutputStream stream,
boolean binary)
Writes the manager to an output stream.
|
void |
write(String filename)
Writes the manager to a file in ASCII IVL format.
|
void |
write(String filename,
boolean binary)
Writes the manager to a file.
|
void |
writeIt(IlvOutputStream stream)
Stores the contents of the manager to an
IlvOutputStream . |
void |
writePrefix(IlvOutputStream stream,
boolean isSubManager)
Writes properties of the manager.
|
void |
writeSuffix(IlvOutputStream stream,
boolean isSubManager)
Writes properties of the manager.
|
boolean |
zoomable()
Returns
false , since this
graphic object is not zoomable. |
calcResolvedBaseTextDirection, getBaseTextDirection, getResolvedBaseTextDirection, invalidateBidiCache, setBaseTextDirection, setBaseTextDirectionDuringConstruction
addActionListener, addNamedPropertyListener, allViewsRemoved, blinkingStateOn, boundingBox, callDraw, getAndAssociateObjectInteractor, getBlinkingAction, getBlinkingObjectOwner, getBlinkingOffPeriod, getBlinkingOnPeriod, getCenter, getDefaultInteractor, getGraphicBag, GetGraphicObject, getLocale, getName, getNamedProperty, getObjectInteractor, getPopupMenu, getPopupMenu, getPopupMenuName, getToolTipBaseTextDirection, getToolTipText, getToolTipText, getTopLevelGraphicBag, getTransferData, getTransferDataFlavors, getZOrderIndex, inside, intersects, invalidateBBoxCache, isDataFlavorSupported, isEditable, isInApplyToObject, isMovable, isPersistent, isSelectable, isVisible, makeSelection, move, move, needsViewNotification, notifyObjectInteractorToManager, processActionEvent, registerBlinkingResource, removeActionListener, removeNamedProperty, removeNamedPropertyListener, resize, rotate, scale, setBackground, setBlinkingAction, setBlinkingOffPeriod, setBlinkingOnPeriod, setEditable, setFillOn, setForeground, setInApplyToObject, setMovable, setName, setNamedProperty, setObjectInteractor, setPopupMenu, setPopupMenuName, setSelectable, setStrokeOn, setToolTipBaseTextDirection, setToolTipText, setVisible, setZOrderIndex, toString, translate, updateNeedsViewNotification, usesBidiMarkers, viewAddedOrRemoved
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getGraphicBag
public static final int HH_NONE
setHoverHighlightingMode(int)
.
By default, hover highlighting is deactivated.IlvHoverHighlightingImageOperation.BLUR_OP
,
Constant Field Valuespublic static final int HH_BLUR
setHoverHighlightingMode(int)
.IlvHoverHighlightingImageOperation.BLUR_OP
,
Constant Field Valuespublic static final int HH_BRIGHTEN
setHoverHighlightingMode(int)
.IlvHoverHighlightingImageOperation.BRIGHTEN_OP
,
Constant Field Valuespublic static final int HH_GRAYSCALE
setHoverHighlightingMode(int)
.IlvHoverHighlightingImageOperation.GRAYSCALE_OP
,
Constant Field Valuespublic static final int HH_SHARPEN
setHoverHighlightingMode(int)
.IlvHoverHighlightingImageOperation.SHARPEN_OP
,
Constant Field Valuespublic static final int HH_INVERT_COLORS
setHoverHighlightingMode(int)
.IlvHoverHighlightingImageOperation.INVERT_COLORS_OP
,
Constant Field Valuespublic static final int HH_CUSTOM
getHoverHighlightingMode()
.
This mode is set automatically when
setHoverHighlightingImageOperation(IlvHoverHighlightingImageOperation)
is called in order to specify a custom highlighting image operation.public IlvManager()
IlvManager
.
This constructor creates a manager with one layer.init(int, int)
public IlvManager(int numberOfLayers)
IlvManager
.numberOfLayers
- The number of layers.init(int, int)
public IlvManager(int numberOfLayers, int maxInList)
IlvManager
.numberOfLayers
- The number of layers.maxInList
- The maximum number of graphic objects that can
be added to the manager before the manager starts using a quadtree
for efficient storage. The default value is 30
objects.init(int, int)
public IlvManager(IlvManager origin)
IlvManager
by copying an existing one.copy()
public IlvManager(IlvInputStream stream) throws IOException, IlvReadFileException
IlvInputStream
.
You should not call this method directly. To read
an IVL formatted file, use the setFileName
or
read
methods of this class. This method is used
only to read a manager used as a graphic object inside another
manager.IOException
IlvReadFileException
protected void init(int numberOfLayers, int maxInList)
createManagerLayer(int)
to
create the manager layers.numberOfLayers
- The number of layers.maxInList
- The maximum number of graphic objects that can
be added to the manager before the manager starts using a quadtree
for efficient storage. The default value is 30
objects.createManagerLayer(int)
public static void setDebugBoundingBoxesGlobal(boolean debug)
applyToObject(ilog.views.IlvGraphic, ilog.views.IlvApplyObject, java.lang.Object, boolean)
.
If debugging of bounding boxes is enabled, it reports all violations
of this principle.
Note that when this debug mode is switched on, many operations
become very slow.public void setDebugBoundingBoxes(boolean debug)
applyToObject(ilog.views.IlvGraphic, ilog.views.IlvApplyObject, java.lang.Object, boolean)
.
If debugging of bounding boxes is enabled, it reports all violations
of this principle.
Note that when this debug mode is switched on, many operations
become very slow.public boolean isDebugBoundingBoxes()
public void setNameImpl(String name)
IlvManager
does not allow two objects to have
the same name.setNameImpl
in class IlvGraphic
name
- The manager name.setObjectName(ilog.views.IlvGraphic, java.lang.String)
@Deprecated public final void setUserData(Object data)
IlvGraphic.setProperty(java.lang.String, java.lang.Object)
instead.data
- The user data.getUserData()
@Deprecated public final Object getUserData()
IlvGraphic.getProperty(java.lang.String)
instead.setUserData(java.lang.Object)
protected IlvObjectProperty makeObjectProperty(IlvGraphic obj)
protected static final IlvObjectProperty getObjectProperty(IlvGraphic obj)
public void addObject(IlvGraphic obj, int layer, boolean redraw)
ManagerContentChangedEvent
event.obj
- The object to be added.layer
- The layer where the object should be inserted. Note that if
the manager does not have a layer that corresponds to this index,
the manager automatically increases the number of layers by calling
setNumberOfLayer
.redraw
- If true
, the object is redrawn.addObject(ilog.views.IlvGraphic, boolean)
,
removeObject(ilog.views.IlvGraphic, boolean)
,
setNumberOfLayer(int)
public void addObject(IlvGraphic obj, boolean redraw)
setInsertionLayer
.
Note that an object can be added to one manager only.
ManagerContentChangedEvent
event.addObject
in interface IlvGraphicBag
obj
- The object to be added.redraw
- If true
, the object is drawn.addObject(ilog.views.IlvGraphic,int,boolean)
,
removeObject(ilog.views.IlvGraphic, boolean)
,
setInsertionLayer(int)
public void removeObject(IlvGraphic obj, boolean redraw)
addObject
;
otherwise, an exception is thrown.
ManagerContentChangedEvent
event.
Note that it is not allowed to remove or add graphic objects while
browsing the enumeration returned by the methods getObjects()
or getObjects(int)
.
removeObject
in interface IlvGraphicBag
obj
- The object to be removed.redraw
- If true
, the object is redrawn.addObject(ilog.views.IlvGraphic,int,boolean)
,
addObject(ilog.views.IlvGraphic,boolean)
,
setLayer(IlvGraphic, int, boolean)
public final int getInsertionLayer()
addObject
method with no layer parameter. In this case the graphic object is
added in the default insertion layer. The default value is 0
.public final void setInsertionLayer(int layer)
layer
- The insertion layer.getInsertionLayer()
,
addObject(ilog.views.IlvGraphic,boolean)
public void replaceObject(IlvGraphic oldObject, IlvGraphic newObject, boolean redraw)
IlvManager
by another one.
The new object is inserted in the same layer as the old one. It is
reshaped to the size of the old object and takes its name.
ManagerContentChangedEvent
events to notify the removal of the
old object and the addition of the new object.oldObject
- The old object. This object must be in this manager.newObject
- The new object. This object must not be in any manager.redraw
- If true
, the objects are redrawn.public boolean isManaged(IlvGraphic obj)
true
if the specified object is in the manager.
The object is in the manager if it was added using the method
addObject
.obj
- The object to test.addObject(ilog.views.IlvGraphic, boolean)
,
addObject(ilog.views.IlvGraphic, int, boolean)
,
IlvGraphic.getGraphicBag()
public final int getCardinal()
public final int getCardinal(boolean traverse)
traverse
- If true
, then all managers added in this
manager are traversed recursively.getCardinal()
,
getCardinal(int)
,
addObject(ilog.views.IlvGraphic, boolean)
,
addObject(ilog.views.IlvGraphic, int, boolean)
,
getManagers()
public final int getCardinal(int layer)
layer
- The index of the layer.getCardinal()
,
getCardinal(boolean)
,
addObject(ilog.views.IlvGraphic, boolean)
,
addObject(ilog.views.IlvGraphic, int, boolean)
public final IlvGraphicEnumeration getObjects()
ConcurrentModificationException
.
Wrap the returned enumeration into IlvBufferedGraphicEnumeration
if it is necessary to add or remove objects while using the enumeration.
For multithread safety, it is useful to lock the manager's
tree lock
for the duration of the use of
this enumeration.getObjects
in interface IlvGraphicBag
IlvGraphic
objects, or
null
.getObjects(int)
,
addObject(ilog.views.IlvGraphic, boolean)
,
addObject(ilog.views.IlvGraphic, int, boolean)
public final IlvGraphicEnumeration getObjects(boolean traverse)
IlvBufferedGraphicEnumeration
if it is necessary to add or remove objects while using the enumeration.traverse
- If true
, then all managers added in this
manager are traversed recursively.getObjects(int)
,
addObject(ilog.views.IlvGraphic, boolean)
,
addObject(ilog.views.IlvGraphic, int, boolean)
public final IlvGraphicEnumeration getObjects(int layer)
IlvBufferedGraphicEnumeration
if it is necessary to add or remove objects while using the enumeration.layer
- The index of the layer.getObjects()
,
addObject(ilog.views.IlvGraphic, boolean)
,
addObject(ilog.views.IlvGraphic, int, boolean)
public IlvGraphic getObject(String name)
null
if there
is no object with this name.getObject
in interface IlvGraphicBag
name
- The name.getObjectName(ilog.views.IlvGraphic)
,
setObjectName(ilog.views.IlvGraphic, java.lang.String)
public boolean setObjectName(IlvGraphic obj, String name)
false
if an object
already has this name. In this case the name is not changed.setObjectName
in interface IlvGraphicBag
obj
- The graphic object. This object must be already
added to this manager; otherwise, an
IllegalArgumentException
is thrown.name
- The desired name.false
if the name could not be changed.getObjectName(ilog.views.IlvGraphic)
,
getObject(java.lang.String)
public String getObjectName(IlvGraphic obj)
setObjectName
, then this
method returns null
.obj
- The graphic object.setObjectName(ilog.views.IlvGraphic, java.lang.String)
,
getObject(String)
public void applyToObject(IlvGraphic obj, IlvApplyObject f, Object arg, boolean redraw)
applyToObject
method.
ManagerContentChangedEvent
event is fired.applyToObject
in interface IlvGraphicBag
obj
- The graphic object.f
- The method to apply.arg
- The arguments passed to the method f
.redraw
- If true
the object is redrawn.public void applyToObjects(IlvGraphicVector vector, IlvApplyObject f, Object arg, boolean redraw)
applyToObject(element, f, arg, redraw)
to each element of the vector; however, it is usually faster.
Notice that none of the objects in the vector must be removed from its manager or be transferred to a different manager by the applied method.
This method also does all necessary work such as updating the
quadtree in case the bounding rectangle of an object in the vector is
changed by the applied method.
For each object of the vector, if the bounding rectangle or the visibility
is changed in the applied method, a ManagerContentChangedEvent
event is fired.
vector
- The vector of graphic objects the method is applied to.f
- The apply object that implements the method applied to
each object.arg
- The argument to be passed to
IlvApplyObject.apply(IlvGraphic, Object)
.redraw
- If true
, the objects are redrawn.public void applyToObjects(IlvGraphicEnumeration enumeration, IlvApplyObject f, Object arg, boolean redraw)
applyToObject(element, f, arg, redraw)
to each element of the enumeration; however, it is usually faster.
Notice that none of the objects in the vector must be removed from its manager or be transferred to a different manager by the applied method.
This method also does all necessary work such as updating the
quadtree in case the bounding rectangle of an object in the vector is
changed by the applied method.
For each object of the vector, if the bounding rectangle or the visibility
is changed in the applied method, a ManagerContentChangedEvent
event is fired.
enumeration
- The graphic objects the method is applied to.f
- The apply object that implements the method applied to
each object.arg
- The argument passed to apply
.redraw
- If true
, the objects are redrawn.public void applyToObjects(IlvGraphicVector vector, IlvApplyObjects f, Object arg, boolean redraw)
You must call this method when you want to apply a complex method that modifies the bounding boxes of many objects at once. None of the objects in the vector must be removed from its manager or be transferred to a different manager by the applied method.
Note that the apply object is not applied to each object in the vector
separately, but it is applied only once. When applied, it passes
the vector as the first argument and arg
as the second
argument to
the apply
method of IlvApplyObjects
; that is,
it calls f.apply(vector, arg)
.
Hence, it is not equivalent to iterating over the elements of
the vector and calling applyToObject
to each element of the
vector, because this would apply the method many times.
This method also does all necessary work such as updating the
quadtree in case the bounding rectangle of an object in the vector is
changed by the applied method.
For each object of the vector, if the bounding rectangle or the visibility
is changed in the applied method, a ManagerContentChangedEvent
event is fired.
vector
- The vector of graphic objects affected by the method.f
- The apply object that implements the method.arg
- The argument passed to apply
.redraw
- If true
, the objects are redrawn.public void applyToObjects(IlvGraphicEnumeration enumeration, IlvApplyObjects f, Object arg, boolean redraw)
You must call this method when you want to apply a complex method that modifies the bounding boxes of many objects at once. None of the objects in the enumeration must be removed from its manager or be transferred to a different manager by the applied method.
Note that the apply object is not applied to each object
separately, but it is applied only once. When applied, it passes
a vector of all enumerated objects as the first argument and
arg
as the second argument to the apply
method of
IlvApplyObjects
, that is, it calls
f.apply(vectorOfEnumeratedObjects, arg)
.
Hence, it is not equivalent to iterating over the elements of
the vector and calling applyToObject
to each element of the
enumeration, because this would apply the method many times.
This method also does all necessary work such as updating the
quadtree in case the bounding rectangle of an object in the enumeration is
changed by the applied method.
For each object of the enumeration, if the bounding rectangle or the
visibility is changed in the applied method, an
ManagerContentChangedEvent
event is fired.
enumeration
- The enumeration of graphic objects affected by the
method.f
- The apply object that implements the method.arg
- The argument passed to apply
.redraw
- If true
, the objects are redrawn.public void moveObject(IlvGraphic obj, double x, double y, boolean redraw)
ManagerContentChangedEvent
event if
the bounding box of the object changes.moveObject
in interface IlvGraphicBag
obj
- The graphic object.x
- The new x positiony
- The new y position.redraw
- If true
, the object is redrawn.reshapeObject(ilog.views.IlvGraphic, ilog.views.IlvRect, boolean)
,
applyToObject(ilog.views.IlvGraphic, ilog.views.IlvApplyObject, java.lang.Object, boolean)
public void reshapeObject(IlvGraphic obj, IlvRect newrect, boolean redraw)
ManagerContentChangedEvent
event.reshapeObject
in interface IlvGraphicBag
obj
- The graphic object.newrect
- The new bounding rectangle of the object.redraw
- If true
, the object is redrawn.moveObject(ilog.views.IlvGraphic, double, double, boolean)
,
applyToObject(ilog.views.IlvGraphic, ilog.views.IlvApplyObject, java.lang.Object, boolean)
public void addLayer(IlvManagerLayer layer, int index)
The manager fires a ManagerLayerInsertedEvent
event.
layer
- The layer to be inserted.index
- The index for insertion. If a bad index is given,
the layer will be inserted at the end (topmost layer).addLayer(int)
,
removeLayer(int, boolean)
,
getLayersCount()
public void addLayer(int index)
createManagerLayer
.
If a layer with the same index already exists in the manager,
the new layer is inserted at the specified position and the
indexes of other layers are shifted accordingly. This may
result in a change in the index of some layers.
ManagerLayerInsertedEvent
event.index
- The index of the new layer.addLayer(ilog.views.IlvManagerLayer, int)
,
removeLayer(int, boolean)
,
getLayersCount()
,
createManagerLayer(int)
public void removeLayer(int layer, boolean redraw)
ManagerLayerRemovedEvent
event.layer
- The index of the layer to remove.redraw
- If true
, the views where this layer was visible
are redrawn.addLayer(ilog.views.IlvManagerLayer, int)
,
addLayer(int)
,
getLayersCount()
protected IlvManagerLayer createManagerLayer(int index)
IlvManagerLayer
.index
- The index of the layer.addLayer(int)
,
setNumberOfLayer(int)
,
init(int, int)
public void setOptimizedLayerThreshold(long threshold)
You can set the threshold to Long.MAX_VALUE
to
disable the optimized mechanism, so that errors of the remove operation
are detected immediately. This is in general better if you want to
debug operations related to manager layers.
The default value is 3.
removeObject(ilog.views.IlvGraphic, boolean)
,
getOptimizedLayerThreshold()
public long getOptimizedLayerThreshold()
setOptimizedLayerThreshold(long)
public void setNumberOfLayer(int layerCardinal)
createManagerLayer(int)
.
ManagerLayerInsertedEvent
event for
each newly added layer.layerCardinal
- The new number of layers.getLayersCount()
,
createManagerLayer(int)
public int getLayersCount()
public final int getLayer(IlvGraphic obj)
IllegalArgumentException
if the
object is not managed by this manager.obj
- The graphic object.setLayer(ilog.views.IlvGraphic, int , boolean)
,
getManagerLayer(ilog.views.IlvGraphic)
public void swapLayers(int layer1, int layer2, boolean redraw)
ManagerLayerMovedEvent
event for
both layers.layer1
- The first layer.layer2
- The second layer.redraw
- If true
, the manager is redrawn.public void addManagerLayerListener(ManagerLayerListener listener)
listener
- The listener.removeManagerLayerListener(ilog.views.event.ManagerLayerListener)
public void removeManagerLayerListener(ManagerLayerListener listener)
public void setLayerName(int layer, String name)
ManagerLayerNameEvent
event.layer
- The index of the layer.name
- The name of the layer.getLayerName(int)
public String getLayerName(int layer)
null
if the layer has no name.layer
- The index of the layer.setLayerName(int, java.lang.String)
public int getLayer(String name)
-1
.name
- The name of the layer.setLayerName(int, java.lang.String)
,
getLayerName(int)
,
getManagerLayer(java.lang.String)
public IlvManagerLayer getManagerLayer(String name)
null
.name
- The name of the layer.setLayerName(int, java.lang.String)
,
getLayerName(int)
,
getLayer(java.lang.String)
public final IlvManagerLayer getManagerLayer(int layer)
layer
- The index of the layer.getLayersCount()
public final IlvManagerLayer getManagerLayer(IlvGraphic obj)
obj
- The graphic object.addObject(ilog.views.IlvGraphic, int, boolean)
,
getLayer(ilog.views.IlvGraphic)
public void setLayer(IlvGraphic obj, int newLayer, boolean redraw)
ManagerContentChangedEvent
event.
Note that it is not allowed to change the layer of graphic objects
while browsing the enumeration returned by getObjects()
or getObjects(int)
.
obj
- The graphic object.newLayer
- The index of the new layer. This layer must exist;
otherwise, an IllegalArgumentException
is thrown.redraw
- If true
, the object is redrawn.getLayer(ilog.views.IlvGraphic)
,
getManagerLayer(ilog.views.IlvGraphic)
public void setVisible(int layer, boolean value, boolean redraw)
ManagerLayerVisibilityEvent
event.layer
- The index of the layer.value
- If value
is true, the layer is set as
visible. If value
is false, the layer is set as invisible.redraw
- If true
, then all views that need to be redrawn
will be.isVisible(int)
public boolean isVisible(int layer)
true
,
the layer may not be visible in one view of the manager.
To check if the layer is visible in a view, you can use
IlvManager.isVisible(IlvManagerView view, int layer)
.layer
- The index of the layer.setVisible(int, boolean, boolean)
,
isVisible(ilog.views.IlvManagerView, int)
public void setVisible(IlvManagerView view, int layer, boolean set, boolean redraw)
view
- The manager view.layer
- The index of the layer.set
- If set
is true, the layer is set as visible.
If set
is false
then the
layer is set as invisibleredraw
- If true
, then the view will be redrawn.isVisible(ilog.views.IlvManagerView, int)
public boolean isVisible(IlvManagerView view, int layer)
true
if the layer is visible in the specified view.
This method checks the visibility of the layer itself and the visibility
of the layer in the specified view.view
- A view of this manager.layer
- The index of the layer.setVisible(ilog.views.IlvManagerView, int, boolean, boolean)
public void setVisible(IlvGraphic obj, boolean visible, boolean redraw)
visible
set to true
.
The reason is that the object may belong to an invisible layer.
ManagerContentChangedEvent
event.obj
- The graphic object.visible
- If true
, the object is made visible,
and invisible otherwise.redraw
- If true
, the object is redrawn.isVisible(ilog.views.IlvGraphic)
public boolean isVisible(IlvGraphic obj)
true
if the specified object is visible.
This method checks the visibility of the object and the visibility
of the layer to which it belongs.obj
- The graphic object.setVisible(ilog.views.IlvGraphic, boolean, boolean)
public boolean isVisible(IlvGraphic obj, IlvManagerView view)
true
if the object is visible in the manager view.
This method checks the visibility of the object itself and the
visibility of the layer to which the object belongs for the specified view.obj
- The graphic object.view
- The view of the manager.isVisible(ilog.views.IlvManagerView, int)
,
isVisible(ilog.views.IlvGraphic)
public void setInsertionAdjusting(boolean flag)
The method must be used in the following way:
manager.setInsertionAdjusting(true); try { ... add a lot of objects. } finally { manager.setInsertionAdjusting(false); }
Typically, an insertion adjusting session is used when reading the
contents of a manager from a file.
Additionally to the effect of setContentsAdjusting(boolean)
, it
delays any sending of events and recalculation of bounding boxes of
submanagers until manager.setInsertionAdjusting(false)
is
called.
Here is a detailed description of what it does:
When setInsertionAdjusting
is called with true
,
it calls setContentsAdjusting(boolean,boolean)
with
both arguments set to true
. This has the effect that
ManagerContentChangedEvent
events will contain a flag indicating
that the contents of the manager are currently being adjusted. To test this
flag use the isAdjusting
method.
Additionally, it calls beforeTransform(ilog.views.IlvGraphic, boolean, boolean, boolean)
for each submanager
currently contained or subsequently added to this manager or its
submanagers. This delays the calculation of the bounding box of any
submanager until all objects are added.
When called with false
, to notify the end of the insertion
of objects, it calls recursively afterTransform(ilog.views.IlvGraphic, boolean, boolean, boolean, boolean)
for each
submanager now contained in the manager. At that time point, all
bounding boxes of all submanagers are calculated and all events related
to changed bounding boxes of submanagers are fired.
Finally, it calls setContentsAdjusting(boolean,boolean)
with
the first argument set to false
and the second argument
set to true
, indicating the end of the contents adjusting
session.
Calls to setInsertionAdjusting
can be nested, as in the
following code:
manager.setInsertionAdjusting(true); manager.setInsertionAdjusting(true); ... add a lot of objects manager.setInsertionAdjusting(false); manager.setInsertionAdjusting(false);The method
isInsertionAdjusting
still
returns true
between the two calls to
setInsertionAdjusting(false)
. Only the last call
ends the adjustment section.isInsertionAdjusting()
public boolean isInsertionAdjusting()
true
if the manager is currently doing
a major insertion of objects.setInsertionAdjusting(boolean)
public void addManagerContentChangedListener(ManagerContentChangedListener listener)
listener
- The listener.removeManagerContentChangedListener(ilog.views.event.ManagerContentChangedListener)
,
addManagerTreeContentChangedListener(ilog.views.event.ManagerContentChangedListener)
,
removeManagerTreeContentChangedListener(ilog.views.event.ManagerContentChangedListener)
,
ManagerContentMonitor
public void removeManagerContentChangedListener(ManagerContentChangedListener listener)
listener
- The listener.addManagerContentChangedListener(ilog.views.event.ManagerContentChangedListener)
,
addManagerTreeContentChangedListener(ilog.views.event.ManagerContentChangedListener)
,
removeManagerTreeContentChangedListener(ilog.views.event.ManagerContentChangedListener)
public void addManagerTreeContentChangedListener(ManagerContentChangedListener listener)
listener
- The listener.removeManagerTreeContentChangedListener(ilog.views.event.ManagerContentChangedListener)
,
addManagerContentChangedListener(ilog.views.event.ManagerContentChangedListener)
,
removeManagerContentChangedListener(ilog.views.event.ManagerContentChangedListener)
,
getManagers()
,
ManagerContentMonitor
public void removeManagerTreeContentChangedListener(ManagerContentChangedListener listener)
listener
- The listener.addManagerTreeContentChangedListener(ilog.views.event.ManagerContentChangedListener)
,
addManagerContentChangedListener(ilog.views.event.ManagerContentChangedListener)
,
removeManagerContentChangedListener(ilog.views.event.ManagerContentChangedListener)
,
getManagers()
public void setContentsAdjusting(boolean set)
The method must be used in the following way:
manager.setContentsAdjusting(true); try { add or remove a lot of objects. } finally { manager.setContentsAdjusting(false); }
When setContentsAdjusting
is called with true
,
the
ManagerContentChangedEvent
events sent by methods such as
addObject
,
removeObject
, or applyToObject
will contain a flag indicating that the
contents of the manager are currently being adjusted. To test this
flag use the isAdjusting
method.
When called with false
, to notify the end of a major
modification of the contents, this method fires a
ManagerContentChangedEvent
of type
ADJUSTMENT_END
. Note
that this event is fired only if a change occurred in the manager
(an object was added, for example).
Calls to setContentsAdjusting
can be nested, as in the
following code:
manager.setContentsAdjusting(true); manager.setContentsAdjusting(true); // add or remove a lot of objects manager.setContentsAdjusting(false); manager.setContentsAdjusting(false);The method
isContentsAdjusting
still
returns true
between the two calls to
setContentsAdjusting(false)
. Only the last call
ends the adjustment section and sends the event to notify the end
of adjustment.public final boolean isContentsAdjusting()
true
if the manager is currently doing
a major modification of its contents.public void setContentsAdjusting(boolean set, boolean allParents)
set
- Indicates whether it is the start or end of the modifications.allParents
- true
if the setting is propagated to all
parents.setContentsAdjusting(boolean)
,
getParent()
protected void contentsChanged(int type)
Note: the method is only called if the manager has any registered contents changed listeners. Instead of overriding this method, it is usually better to add a contents changed listener.
type
- The type of the modification. The values for this
parameter are defined in the class
ManagerContentChangedEvent
.removeManagerContentChangedListener(ilog.views.event.ManagerContentChangedListener)
,
addManagerContentChangedListener(ilog.views.event.ManagerContentChangedListener)
,
ManagerContentChangedEvent
public final Enumeration getViews()
synchronized (manager.getTreeLock()) { Enumeration views = manager.getViews(); while (views.hasMoreElements() { ... } }
IlvManagerView
public void addManagerViewsListener(ManagerViewsChangedListener listener)
addManagerViewsHierarchyListener(ilog.views.event.ManagerViewsChangedListener)
the listener
will not receive events if a view was added or removed at a parent or
ancestor manager.listener
- The listener.removeManagerViewsListener(ilog.views.event.ManagerViewsChangedListener)
,
addManagerViewsHierarchyListener(ilog.views.event.ManagerViewsChangedListener)
public void removeManagerViewsListener(ManagerViewsChangedListener listener)
listener
- The listener to remove.addManagerViewsListener(ilog.views.event.ManagerViewsChangedListener)
public void addManagerViewsHierarchyListener(ManagerViewsChangedListener listener)
addManagerViewsListener(ilog.views.event.ManagerViewsChangedListener)
receive only events of views that are added/removed directly at this
manager.
The hierarchy event mechanism is comparable to
java.awt.event.HierarchyEvent
on swing components.
The event is generated when a view is added to or removed from a manager,
or when a manager is added to or removed from its parent manager which has
attached views. Then the event is passed down the nesting hierarchy.
The event is dispatched to every IlvManager
, IlvGraphicSet
and IlvGraphicHandleBag
that is contained in the manager whose
view has changed.
addManagerViewsHierarchyListener
in interface ManagerViewsHierarchyEventReceiver
listener
- The listener.removeManagerViewsHierarchyListener(ilog.views.event.ManagerViewsChangedListener)
,
addManagerViewsListener(ilog.views.event.ManagerViewsChangedListener)
public void removeManagerViewsHierarchyListener(ManagerViewsChangedListener listener)
removeManagerViewsHierarchyListener
in interface ManagerViewsHierarchyEventReceiver
listener
- The listener.addManagerViewsHierarchyListener(ilog.views.event.ManagerViewsChangedListener)
public void enableManagerViewsHierarchyEventForwarding()
ManagerViewsChangedEvent
events through the nesting hierarchy,
since the subobjects contained in this manager need to receive the events.enableManagerViewsHierarchyEventForwarding
in interface ManagerViewsHierarchyEventReceiver
public boolean needsManagerViewsHierarchyEvent()
ManagerViewsChangedEvent
events, either from itself or from its
ancestors. It returns true
, if a listener was installed through
addManagerViewsHierarchyListener(ilog.views.event.ManagerViewsChangedListener)
on this manager or on any
object contained in this object.needsManagerViewsHierarchyEvent
in interface ManagerViewsHierarchyEventReceiver
public void fireManagerViewsHierarchyEvent(ManagerViewsChangedEvent event)
ManagerViewsChangedEvent
event to all listeners
installed via addManagerViewsHierarchyListener(ilog.views.event.ManagerViewsChangedListener)
on this manager or
contained objects.fireManagerViewsHierarchyEvent
in interface ManagerViewsHierarchyEventReceiver
protected void viewAdded(IlvManagerView view)
ManagerViewsChangedEvent
.view
- The manager view that has been added to the manager.addManagerViewsListener(ilog.views.event.ManagerViewsChangedListener)
,
removeManagerViewsListener(ilog.views.event.ManagerViewsChangedListener)
protected void viewRemoved(IlvManagerView view)
ManagerViewsChangedEvent
.view
- The manager view that has been removed from the manager.addManagerViewsListener(ilog.views.event.ManagerViewsChangedListener)
,
removeManagerViewsListener(ilog.views.event.ManagerViewsChangedListener)
public void reDrawObj(IlvGraphic obj)
initReDraws()
has been called previously, then
the object is not redrawn immediately; instead, the
region to redraw is added in the list of invalid regions
of the views and will be redrawn by the next call
of reDrawViews()
.reDrawObj
in interface IlvGraphicBag
obj
- The graphic object to redraw.initReDraws()
,
invalidateRegion(IlvGraphic)
,
reDrawViews()
public void reDrawRegion(IlvRegion region)
initReDraws()
has been called previously, then
the region is not redrawn immediately; instead, the
region is added in the list of invalid regions
of the views and will be redrawn by the next call
of reDrawViews()
reDrawRegion
in interface IlvGraphicBag
region
- The region to redraw in the manager coordinate system.initReDraws()
,
invalidateRegion(IlvGraphic)
,
reDrawViews()
public void invalidateRegion(IlvGraphic object)
object
in all manager views for a further call of reDrawViews()
.object
- The graphic object.initReDraws()
,
reDrawViews()
protected Object beforeInvalidateRegion(IlvGraphic object, IlvManagerView view, IlvTransformer t)
protected boolean afterInvalidateRegion(IlvGraphic object, IlvRect objectBBox, IlvManagerView view, IlvTransformer t, Object info)
true
if the region of the object must be invalidated.
This is called after a change happened.
This method is part of JViews internals. You should
not use it.public void invalidateRegion(IlvRect rect)
reDrawViews
.rect
- The rectangle in the manager coordinate system.initReDraws()
,
reDrawViews()
public void invalidateRegion(IlvManagerView view, IlvRect rect)
reDrawViews()
.view
- The manager view.rect
- The rectangle.initReDraws()
,
reDrawViews()
public void initReDraws()
initRedraws/invalidateRegion/reDrawViews
session.initReDraws
in interface IlvBlinkingObjectOwner
reDrawViews()
,
invalidateRegion(IlvGraphic)
public boolean isInvalidating()
true
if the manager is in an
initReDraws/reDrawViews
session.initReDraws()
,
reDrawViews()
,
invalidateRegion(IlvGraphic)
public void abortReDraws()
initRedraws/invalidateRegion
session.initReDraws()
,
reDrawViews()
,
invalidateRegion(IlvGraphic)
public void reDrawViews()
invalidateRegion(IlvGraphic)
will be
redrawn.initReDraws()
,
invalidateRegion(IlvGraphic)
public void blinkingReDraw()
reDrawViews()
except that the latter redraws
all views.
Regions called invalid by invalidateRegion(IlvGraphic)
will be
redrawn.blinkingReDraw
in interface IlvBlinkingObjectOwner
initReDraws()
,
invalidateRegion(IlvGraphic)
public void reDraw()
repaint
on each view.reDraw
in interface IlvBlinkingObject
reDraw
in class IlvGraphic
IlvGraphic.draw(Graphics, IlvTransformer)
,
IlvGraphic
public IlvRect computeBBox(IlvTransformer t)
computeBBox(IlvTransformer, boolean)
function.t
- The transformer used to compute the bounding box.IlvManagerView.computeBBox()
,
computeBBox(IlvTransformer, boolean)
public IlvRect computeBBox(IlvTransformer t, boolean withSelection)
t
- The transformer.withSelection
- If true
, the selection objects will be taken
into account.computeBBox(IlvTransformer)
public void draw(Graphics dst, IlvManagerView view)
dst
- The Graphics
to perform the drawings.view
- The manager view to draw.public void print(Graphics dst, IlvRect area, IlvManagerView view, IlvTransformer t, boolean allLayers)
dst
- The graphics to perform the drawings.area
- The rectangle to print in the coordinate system of the
manager.view
- The view of the manager. This view is used to select
the layer that will be drawn (visible layers). The transformer of the
view is not used since a transformer is passed as a parameter.t
- The transformer for placing the printed area on
the page.allLayers
- If true
all the layers, even those
not visible, will be drawn.public boolean processEvent(AWTEvent evt, IlvManagerView view)
@Deprecated public final IlvObjectInteractor getObjectInteractor(IlvGraphic obj)
IlvGraphic.getObjectInteractor()
instead.obj
- The graphic object.setObjectInteractor(ilog.views.IlvGraphic, ilog.views.IlvObjectInteractor)
@Deprecated public final void setObjectInteractor(IlvGraphic obj, IlvObjectInteractor interactor)
IlvGraphic.setObjectInteractor(ilog.views.IlvObjectInteractor)
instead.null
for interactor
will remove
the interactor from the object.obj
- The graphic object.interactor
- The object interactor.getObjectInteractor(ilog.views.IlvGraphic)
public void setHoverHighlightingImageOperation(IlvHoverHighlightingImageOperation hoverHighlightingImageOperation)
To set one of the predefined hover highlighting modes, you can use the
method setHoverHighlightingMode(int)
instead.
The default value is null
.
Note: the hover highlight operation is not persistent and is useful only on top level managers, that is managers that are nested inside another manager.
hoverHighlightingImageOperation
- The hover highlighting operation or
null
.public IlvHoverHighlightingImageOperation getHoverHighlightingImageOperation()
null
if
none is set on this manager.null
if none is
set on this manager.public void setHoverHighlightingMode(int mode)
setHoverHighlightingImageOperation(IlvHoverHighlightingImageOperation)
instead.
Note: the hover highlight mode is not persistent and will only be useful on top level managers.
mode
- One of the predefined following values:
HH_NONE
(the default value)
HH_INVERT_COLORS
HH_BLUR
HH_BRIGHTEN
HH_GRAYSCALE
HH_SHARPEN
public int getHoverHighlightingMode()
HH_NONE
HH_INVERT_COLORS
HH_BLUR
HH_BRIGHTEN
HH_GRAYSCALE
HH_SHARPEN
HH_CUSTOM
In that case, getHoverHighlightingImageOperation()
returns the operation used.
public boolean shortCut(AWTEvent evt, IlvManagerView view)
evt
- The AWT event.view
- The view of the manager.protected boolean processEvent(IlvGraphic obj, AWTEvent event, IlvManagerView view)
public boolean processHoverHighlightingEvent(AWTEvent event, IlvManagerView view)
public boolean processHoverHighlightingEvent(AWTEvent event, IlvManagerView view, IlvGraphic obj)
public boolean dispatchToObjects(AWTEvent event, IlvManagerView view)
protected boolean handleAccelerators(AWTEvent evt, IlvManagerView view)
evt
- The AWT eventview
- The view of the managerpublic void addAccelerator(IlvAccelerator a)
a
- The accelerator to be added.removeAccelerator(ilog.views.IlvAccelerator)
public void removeAccelerator(IlvAccelerator a)
a
- The accelerator to be removed.addAccelerator(ilog.views.IlvAccelerator)
public IlvAccelerator[] getAccelerators()
public void setAccelerators(IlvAccelerator[] acc)
getAccelerators()
public void deleteAll(boolean redraw)
redraw
- If true
, the manager is redrawn.deleteAll(int, boolean)
public void deleteAll(int layer, boolean redraw)
layer
- The index of the layer.redraw
- If true
, the manager is redrawn.deleteAll(boolean)
public boolean allowMoving(IlvGraphic obj)
true
if the object can be moved with
the selection interactor (IlvSelectInteractor
).
You should not call this. It exists for internal reasons.
It returns true
if the object was set to movable, or
if the object can move because of an internal mechanism.IlvSelectInteractor
,
isMovable(ilog.views.IlvGraphic)
public boolean isMovable(IlvGraphic obj)
true
if the object was set to movable.setMovable(ilog.views.IlvGraphic, boolean)
public void setMovable(IlvGraphic obj, boolean v)
IlvSelectInteractor
).IlvSelectInteractor
,
isMovable(ilog.views.IlvGraphic)
public boolean isEditable(IlvGraphic obj)
true
if the object is editable with the
selection interactor (IlvSelectInteractor
).IlvGraphic.isEditable()
,
IlvSelectInteractor
public void setEditable(IlvGraphic obj, boolean v)
IlvSelectInteractor
).IlvSelectInteractor
public boolean isSelectable(IlvGraphic obj)
true
if the object can be selected with
the select interactor (IlvSelectInteractor
).
Note that this method checks that the object is
selectable as well as the layer of the object.public boolean objectIsSelectable(IlvGraphic obj)
true
if the object can be selected with
the select interactor (IlvSelectInteractor
).
Note that this method checks that the object is marked
as selectable and does not check that the layer of the object
is selectable.public void setSelectable(IlvGraphic obj, boolean v)
IlvSelectInteractor
).IlvSelectInteractor
public boolean isSelectable(int layer)
true
if the objects of a layer can be selected
with the selection interactor (IlvSelectInteractor
).IlvSelectInteractor
public void setSelectable(int layer, boolean v)
IlvSelectInteractor
).
ManagerLayerSelectableEvent
event.layer
- The index of the layer.v
- The new selectable state.IlvSelectInteractor
public IlvGraphic getObject(IlvPoint p, int layer, IlvManagerView view)
null
.
This method does not search for inner objects of submanagers that
are located in that layer. For recursive processing in nested managers,
use getObject(IlvPoint, IlvManagerView, boolean)
.
The method tests via
IlvGraphic.contains(IlvPoint, IlvPoint, IlvTransformer)
whether
an object is located at the input point. Also, it tests the
visibility of the input layer via isVisible(IlvManagerView, int)
.
If the layer is not visible for the provided view, the method returns
null
.
If several graphic objects are located at the specified point,
the method returns the one with the highest z-order. To get all
the objects located at a given point, use
getAllObjects(IlvPoint, IlvManagerView, boolean, boolean)
.
p
- The point in the view coordinate system.layer
- The index of the layer.view
- The view of the manager.getObject(ilog.views.IlvPoint, ilog.views.IlvManagerView)
,
getObject(ilog.views.IlvPoint, ilog.views.IlvManagerView, boolean)
,
getSelection(ilog.views.IlvPoint, ilog.views.IlvManagerView)
,
getSelection(ilog.views.IlvPoint, ilog.views.IlvManagerView, boolean)
public IlvGraphic getObject(IlvPoint p, IlvManagerView view)
null
.
This method does not search for inner objects of submanagers.
For recursive processing in nested managers,
use getObject(IlvPoint, IlvManagerView, boolean)
.
p
- The point in the view coordinate system.view
- The view of the manager.getObject(ilog.views.IlvPoint, int, ilog.views.IlvManagerView)
,
getObject(ilog.views.IlvPoint, ilog.views.IlvManagerView, boolean)
,
getSelection(ilog.views.IlvPoint, ilog.views.IlvManagerView)
,
getSelection(ilog.views.IlvPoint, ilog.views.IlvManagerView, boolean)
public IlvGraphic getObject(IlvPoint p, IlvManagerView view, boolean traverse)
null
. This method
will traverse the manager objects that have been added in this
manager if the traverse
parameter is set to true
.
The method tests via
IlvGraphic.contains(IlvPoint, IlvPoint, IlvTransformer)
whether
an object is located at the input point.
Objects located in invisible layers are excluded. The visibility
is checked using the methods isVisible(IlvManagerView, int)
.
If several graphic objects are located at the specified point,
the method returns the one with the highest z-order. To get all
the objects located at a given point, use
getAllObjects(IlvPoint, IlvManagerView, boolean, boolean)
.
p
- The point in the view coordinate system.view
- The view of the manager.traverse
- If true
, this method will recursively traverse
the manager objects added in this manager to find the
graphic object located at the specified point.getObject(ilog.views.IlvPoint, int, ilog.views.IlvManagerView)
,
getObject(ilog.views.IlvPoint, ilog.views.IlvManagerView)
,
getSelection(ilog.views.IlvPoint, ilog.views.IlvManagerView)
,
getSelection(ilog.views.IlvPoint, ilog.views.IlvManagerView, boolean)
,
getManagers()
public IlvGraphicVector getAllObjects(IlvPoint p, int layer, IlvManagerView view)
IlvGraphic.contains(IlvPoint, IlvPoint, IlvTransformer)
whether
an object is located at the input point.
This method does not search for inner objects of submanagers that
are located in that layer. For recursive processing in nested managers,
use getAllObjects(IlvPoint, IlvManagerView, boolean, boolean)
.
The order of the objects in the resulting vector is consistent to the
search order of
getObject(ilog.views.IlvPoint, int, ilog.views.IlvManagerView)
,
that is, objects that are found first occur first in the resulting vector.
Invisible layers are excluded. The visibility
is checked using the method isVisible(IlvManagerView, int)
.
p
- The point in the view coordinate system.layer
- The index of the layer.view
- The view of the manager.getAllObjects(ilog.views.IlvPoint, ilog.views.IlvManagerView, boolean, boolean)
,
getObject(ilog.views.IlvPoint, int, ilog.views.IlvManagerView)
,
getManagers()
public IlvGraphicVector getAllObjects(IlvPoint p, IlvManagerView view, boolean traverse, boolean includeSubManagersIfInnerNodesFound)
IlvGraphic.contains(IlvPoint, IlvPoint, IlvTransformer)
whether
an object is located at the input point.
This method will traverse the manager objects that have
been added in this manager if the traverse
parameter is set
to true
. In this case, the option
includeSubManagersIfInnerNodesFound
specifies whether
submanager are always included in the result or whether they are
omitted as soon as an subobject of the submanager is found that is
included in the result.
The order of the objects in the resulting vector is consistent to the
search order of
getObject(ilog.views.IlvPoint, ilog.views.IlvManagerView, boolean)
,
that is, objects that are found first occur first in the resulting vector.p
- The point in the view coordinate system.view
- The view of the manager.traverse
- If true
, this method will recursively traverse
the manager objects added in this manager to find the
graphic objects located at the specified point.includeSubManagersIfInnerNodesFound
- If false
, the
result will contain a submanager located at the input point only if it
does not contain any subobjects of the submanager. If true
,
the result will contain a submanager at the input point even if it also
contains subobjects of the submanager.getAllObjects(ilog.views.IlvPoint, int, ilog.views.IlvManagerView)
,
getObject(ilog.views.IlvPoint, ilog.views.IlvManagerView, boolean)
,
getManagers()
public IlvObjectWithSelection getCollapseExpandObject(IlvPoint p, IlvManagerView view, IlvTransformer t, boolean traverse)
traverse
parameter is set to true
,
this method traverses all uncollapsed objects that can have
subselections (objects that implement IlvObjectWithSelection
).
This includes uncollapsed submanagers of type IlvManager
, or
uncollapsed link bundles of type IlvLinkBundle
.
getCollapseExpandObject
in interface IlvObjectWithSelection
p
- The point in the view coordinate system.view
- The view. Can be null
.t
- The transformer to draw this manager.traverse
- If true
, this method recursively traverses
all objects that can have subselections added in this manager
to find the collapsible and expandable graphic object located
at the specified point.null
when a collapsible or expandable object
cannot be found at this point.public IlvGraphic getSelectableObject(IlvPoint p, IlvManagerView view, IlvTransformer t, boolean traverse)
traverse
parameter is set to
true
, this method traverses all uncollapsed objects that can
have subselections (objects that implement IlvObjectWithSelection
).
This includes submanagers of type IlvManager
that
are not collapsed, and link bundles of type IlvLinkBundle
that are not collapsed.
The method calls IlvGraphic.contains(IlvPoint, IlvPoint, IlvTransformer)
to test whether an object is located at the input point.
Objects that are are not selectable are excluded. Selectability
is checked using the isSelectable(IlvGraphic)
method.
Invisible objects are excluded. Visibility for the layers
is checked using the isVisible(IlvManagerView, int)
(when the view argument is not null
) and
isVisible(int)
methods. Object visibility is tested using the
IlvGraphic.isVisible()
method.
If several graphic objects are located at the specified point,
the method returns the one with the highest z-order. To get all
the objects located at a given point, use
getAllSelectableObjects(IlvPoint, IlvManagerView, IlvTransformer, boolean, boolean)
.
getSelectableObject
in interface IlvObjectWithSelection
p
- The point in the view coordinate system.view
- The view. Can be null
.t
- The transformer to draw this manager.traverse
- If true
, this method recursively traverses
all objects that can have subselections added in this manager to find
the first selectable graphic object located at the specified point.null
when there is no selectable object at the input point.getObject(ilog.views.IlvPoint, ilog.views.IlvManagerView)
,
getAllSelectableObjects(IlvPoint, IlvManagerView, IlvTransformer, boolean, boolean)
public IlvGraphicVector getAllSelectableObjects(IlvPoint p, IlvManagerView view, IlvTransformer t, boolean traverse, boolean includeParentsIfInnerFound)
IlvGraphic.contains(IlvPoint, IlvPoint, IlvTransformer)
to test
whether an object is located at the input point.
Objects that are not selectable are excluded. Selectability
is checked by calling isSelectable(IlvGraphic)
Invisible objects are excluded. Visibility for the layers is checked
using the isVisible(IlvManagerView, int)
(when the view argument is not null
) and
isVisible(int)
methods. Object visibility is tested using the
IlvGraphic.isVisible()
method.
When the traverse
parameter is set to true
,
this method traverses all uncollapsed objects that can have
subselections (objects that implement IlvObjectWithSelection
).
This includes uncollapsed submanagers of type IlvManager
and uncollapsed link bundles of type IlvLinkBundle
.
If the traverse
parameter is set to true
,
the includeParentsIfInnerFound
parameter specifies
whether objects that can contain inner selected objects
(for instance, submanagers and link bundles) are always included in the
result, or whether they are omitted as soon as a subobject of the object
is found that is included in the result.
The order of the objects in the resulting vector is consistent with the
search order of
getSelectableObject(IlvPoint, IlvManagerView, IlvTransformer, boolean)
,
that is, objects are listed in the order they are found.
getAllSelectableObjects
in interface IlvObjectWithSelection
p
- The point in the view coordinate system.view
- The view. Can be null
.t
- The transformer to draw this manager.traverse
- If true
, this method recursively traverses
all objects that can have subselections added in this manager to find the
graphic object located at the specified point.includeParentsIfInnerFound
- Whether objects of type
IlvObjectWithSelection
(such as submanagers or link bundles)
found at the input point are included in the result. If true
,
they are always included; if false
, they are included only
when they do not contain any subobject of the object. .null
when there is no selectable object at the input point.getAllObjects(ilog.views.IlvPoint, ilog.views.IlvManagerView, boolean, boolean)
,
getSelectableObject(IlvPoint, IlvManagerView, IlvTransformer, boolean)
public IlvSelection getSelection(IlvPoint p, IlvManagerView view)
IlvSelection
)
located at the specified point in a manager view.p
- The point.view
- The view of the manager.getSelection(ilog.views.IlvPoint, ilog.views.IlvManagerView, boolean)
,
getObject(ilog.views.IlvPoint, int, ilog.views.IlvManagerView)
,
getObject(ilog.views.IlvPoint, ilog.views.IlvManagerView)
,
getObject(ilog.views.IlvPoint, ilog.views.IlvManagerView, boolean)
,
setSelected(IlvGraphic, boolean, boolean)
public IlvSelection getSelection(IlvPoint p, IlvManagerView view, boolean traverse)
IlvSelection
)
located at the specified point in a manager view. If the
traverse
parameter is set to true
, this method
will traverse the manager objects added in this manager.p
- The point.view
- The view of the manager.traverse
- If true
, the method will recursively traverse
the manager object added in this manager to find the selection object
located at the specified point.getObject(ilog.views.IlvPoint, int, ilog.views.IlvManagerView)
,
getObject(ilog.views.IlvPoint, ilog.views.IlvManagerView)
,
getObject(ilog.views.IlvPoint, ilog.views.IlvManagerView, boolean)
,
setSelected(IlvGraphic, boolean, boolean)
,
getManagers()
public final IlvSelection getSelection(IlvGraphic obj)
IlvSelection
)
associated with the specified graphic object, or null
if the object is not selected.obj
- The graphic object.setSelected(IlvGraphic, boolean, boolean)
,
getSelections()
public boolean isSelected(IlvGraphic obj)
true
if the specified graphic object is selected,
that is, there is a selection object associated with it.isSelected
in interface IlvObjectWithSelection
obj
- The graphic object.setSelected(IlvGraphic, boolean, boolean)
,
getSelection(IlvGraphic)
public void setSelected(IlvGraphic obj, boolean select, boolean redraw)
IlvSelection
.
If a selection factory is installed on the manager
(see setSelectionFactory
), this
factory is responsible for creating the selection object. Otherwise,
the method makeSelection
of the class IlvGraphic
is called.
ManagerSelectionChangedEvent
event
by calling the method selectionChanged
.setSelected
in interface IlvObjectWithSelection
obj
- The graphic object to select or deselect.select
- If true
the object will be selected,
and deselected otherwise.redraw
- If true
, the object is redrawn (or its region
is invalidated,
if we are in an initRedraws/reDrawViews
session).isSelected(ilog.views.IlvGraphic)
,
getSelection(IlvGraphic)
,
selectAll(boolean)
,
selectAll(boolean,boolean)
,
deSelectAll(boolean)
,
deSelectAll(int, boolean)
,
selectAll(IlvManagerView,boolean)
,
getSelectedObjects()
,
getSelectedObjectsCount()
,
getSelections()
,
addManagerSelectionListener(ilog.views.event.ManagerSelectionListener)
,
removeManagerSelectionListener(ilog.views.event.ManagerSelectionListener)
public void setSelected(IlvGraphic obj, IlvPoint p, IlvManagerView view)
The default implementation calls
setSelected(obj, true, true)
.
Subclasses can override this method to select subparts of the input
object located on the input point.
setSelected
in interface IlvObjectWithSelection
obj
- The object to be selected.p
- The point in the manager view where the mouse click occurred.view
- The view currently handled by the select interactor.setSelected(IlvGraphic, boolean, boolean)
public void addManagerSelectionListener(ManagerSelectionListener listener)
listener
- The listener.removeManagerSelectionListener(ilog.views.event.ManagerSelectionListener)
,
setSelected(IlvGraphic, boolean, boolean)
,
selectionChanged(IlvGraphic)
public void removeManagerSelectionListener(ManagerSelectionListener listener)
listener
- The listener.addManagerSelectionListener(ilog.views.event.ManagerSelectionListener)
,
setSelected(IlvGraphic, boolean, boolean)
,
selectionChanged(IlvGraphic)
public void addManagerTreeSelectionListener(ManagerSelectionListener listener)
listener
- The listener.removeManagerTreeSelectionListener(ilog.views.event.ManagerSelectionListener)
,
setSelected(IlvGraphic, boolean, boolean)
,
selectionChanged(IlvGraphic)
public void removeManagerTreeSelectionListener(ManagerSelectionListener listener)
listener
- The listener.addManagerTreeSelectionListener(ilog.views.event.ManagerSelectionListener)
,
setSelected(IlvGraphic, boolean, boolean)
,
selectionChanged(IlvGraphic)
protected void selectionChanged(IlvGraphic obj)
obj
- The selected or deselected graphic object.setSelected(ilog.views.IlvGraphic, boolean, boolean)
,
addManagerSelectionListener(ilog.views.event.ManagerSelectionListener)
,
removeManagerSelectionListener(ilog.views.event.ManagerSelectionListener)
public void setSelectionEventSource(Object source)
setSelectionEventSource
in interface IlvObjectWithSelection
public void setSelectionAdjusting(boolean set)
true
when you want upcoming
selection or deselection of objects to be
considered as a single selection event.
In this case events of the class ManagerSelectionChangedEvent
sent by the method setSelected
will return true
to a call of isAdjusting
, meaning that they are part of
a series of events.
When you have finished selecting or deselecting the series
of objects, you must call the method with the parameter set
to false
.setSelectionAdjusting
in interface IlvObjectWithSelection
ManagerSelectionChangedEvent.isAdjusting()
,
ManagerSelectionChangedEvent.isAdjustmentEnd()
public boolean isSelectionAdjusting()
isSelectionAdjusting
in interface IlvObjectWithSelection
setSelectionAdjusting(boolean)
public void selectAll(IlvManagerView view, boolean redraw)
view
- The view of the manager.redraw
- If true
, the selected objects are redrawn.isSelected(ilog.views.IlvGraphic)
,
setSelected(IlvGraphic, boolean, boolean)
,
getSelection(IlvGraphic)
,
selectAll(boolean)
,
selectAll(boolean, boolean)
,
deSelectAll(boolean)
,
deSelectAll(int, boolean)
,
getSelections()
,
getSelectedObjects()
public void selectAll(boolean redraw)
redraw
- If true
, selected objects are redrawn.isSelected(ilog.views.IlvGraphic)
,
setSelected(IlvGraphic, boolean, boolean)
,
getSelection(IlvGraphic)
,
deSelectAll(boolean)
,
deSelectAll(int, boolean)
,
selectAll(IlvManagerView,boolean)
,
selectAll(boolean,boolean)
,
getSelections()
,
getSelectedObjects()
public void selectAll(boolean traverse, boolean redraw)
selectAll
in interface IlvObjectWithSelection
traverse
- If true
, the method
will also select recursively the objects in the manager added in this
manager.redraw
- If true
, selected objects are redrawn.isSelected(ilog.views.IlvGraphic)
,
setSelected(IlvGraphic, boolean, boolean)
,
getSelection(IlvGraphic)
,
deSelectAll(boolean)
,
deSelectAll(int, boolean)
,
selectAll(IlvManagerView,boolean)
,
selectAll(boolean)
,
getSelections()
,
getSelectedObjects()
,
getManagers()
public void deSelectAll(boolean redraw)
redraw
- If true
, deselected objects are redrawn.isSelected(ilog.views.IlvGraphic)
,
setSelected(IlvGraphic, boolean, boolean)
,
getSelection(IlvGraphic)
,
deSelectAll(int, boolean)
,
deSelectAll(boolean, boolean)
,
selectAll(IlvManagerView,boolean)
,
selectAll(boolean)
,
selectAll(boolean,boolean)
,
getSelections()
,
getSelectedObjects()
public void deSelectAll(boolean traverse, boolean redraw)
traverse
parameter is set to
true
.deSelectAll
in interface IlvObjectWithSelection
traverse
- If true
, the method
will also deselect recursively the objects in the manager added in this
manager.redraw
- If true
, deselected objects are redrawn.isSelected(ilog.views.IlvGraphic)
,
setSelected(IlvGraphic, boolean, boolean)
,
getSelection(IlvGraphic)
,
deSelectAll(boolean)
,
deSelectAll(int, boolean)
,
selectAll(IlvManagerView,boolean)
,
selectAll(boolean)
,
selectAll(boolean,boolean)
,
getSelections()
,
getSelectedObjects()
,
getManagers()
public void deSelectAll(int layer, boolean redraw)
layer
- The index of the layer.redraw
- If true
, deselected objects are redrawn.isSelected(ilog.views.IlvGraphic)
,
setSelected(IlvGraphic, boolean, boolean)
,
getSelection(IlvGraphic)
,
deSelectAll(boolean)
,
selectAll(IlvManagerView,boolean)
,
selectAll(boolean)
,
selectAll(boolean,boolean)
,
getSelections()
,
getSelectedObjects()
public final IlvGraphicEnumeration getSelections()
IlvSelection
).
Be cautioned that you should not select, deselect, remove, or add
any graphic object while using the returned enumeration.
Wrap the returned enumeration into IlvBufferedGraphicEnumeration
if it is necessary to select, deselect, remove or add objects while
using the enumeration.public final IlvGraphicEnumeration getSelectedObjects()
getSelectedObjects(boolean)
passing false
for the argument.
Be cautioned that you should not select, deselect, remove, or add
any graphic object while using the returned enumeration.
Wrap the returned enumeration into IlvBufferedGraphicEnumeration
if it is necessary to select, deselect, remove or add objects while
using the enumeration.getSelectedObjects
in interface IlvObjectWithSelection
isSelected(ilog.views.IlvGraphic)
,
setSelected(IlvGraphic, boolean, boolean)
,
getSelection(IlvGraphic)
,
deSelectAll(int,boolean)
,
deSelectAll(boolean,boolean)
,
selectAll(IlvManagerView,boolean)
,
selectAll(boolean)
,
selectAll(boolean, boolean)
,
getSelections()
,
getSelectedObjects(boolean)
,
getSelectedObjectsCount()
public final IlvGraphicEnumeration getSelectedObjects(boolean traverse)
traverse
is set to
true
.
This method is equivalent to
getSelectedObjects(boolean, boolean)
passing true
for the second argument.
Be cautioned that you should not select, deselect, remove, or add
any graphic object while using the returned enumeration.
Wrap the returned enumeration into IlvBufferedGraphicEnumeration
if it is necessary to select, deselect, remove or add objects while
using the enumeration.traverse
- If true
, the method will also return the
selected objects of manager objects added in this managers
recursivelyisSelected(ilog.views.IlvGraphic)
,
setSelected(IlvGraphic, boolean, boolean)
,
getSelection(IlvGraphic)
,
deSelectAll(int,boolean)
,
selectAll(IlvManagerView,boolean)
,
selectAll(boolean)
,
selectAll(boolean,boolean)
,
getSelections()
,
getSelectedObjects()
,
getSelectedObjectsCount()
,
getManagers()
public final IlvGraphicEnumeration getSelectedObjects(boolean traverse, boolean onlyInManagers)
traverse
is set to true
,
the method will return recursively the selected objects of
objects of type IlvObjectWithSelection
.
If the parameter onlyInManagers
is set
to true
, it will only contain the selected objects of
manager objects added in this manager.
If the parameter onlyInManagers
is set
to false
, it will also contain the selected objects of
other objects such as link bundles.
Be cautioned that you should not select, deselect, remove, or add
any graphic object while using the returned enumeration.
Wrap the returned enumeration into IlvBufferedGraphicEnumeration
if it is necessary to select, deselect, remove or add objects while
using the enumeration.traverse
- If true
, the method will also return
recursively the selected objects of subobjects.onlyInManagers
- If true
, the method will look only
in managers for selected objects.isSelected(ilog.views.IlvGraphic)
,
setSelected(IlvGraphic, boolean, boolean)
,
getSelection(IlvGraphic)
,
deSelectAll(int,boolean)
,
selectAll(IlvManagerView,boolean)
,
selectAll(boolean)
,
selectAll(boolean,boolean)
,
getSelections()
,
getSelectedObjects()
,
getSelectedObjectsCount()
,
getManagers()
public final int getSelectedObjectsCount()
getSelectedObjectsCount(boolean)
passing false
for the argument.getSelectedObjectsCount
in interface IlvObjectWithSelection
getSelectedObjectsCount(boolean)
,
isSelected(ilog.views.IlvGraphic)
,
setSelected(IlvGraphic, boolean, boolean)
,
getSelection(IlvGraphic)
,
deSelectAll(boolean)
,
deSelectAll(int, boolean)
,
selectAll(IlvManagerView, boolean)
,
selectAll(boolean)
,
selectAll(boolean,boolean)
,
getSelections()
,
getSelectedObjects()
public final int getSelectedObjectsCount(boolean traverse)
traverse
is set
to true
.
This method is equivalent to
getSelectedObjectsCount(boolean, boolean)
passing true
for the second argument.traverse
- If true
, the method
will count the selected objects of managers added
in this manager recursively.isSelected(ilog.views.IlvGraphic)
,
setSelected(IlvGraphic, boolean, boolean)
,
getSelection(IlvGraphic)
,
deSelectAll(boolean)
,
deSelectAll(int, boolean)
,
selectAll(IlvManagerView, boolean)
,
selectAll(boolean)
,
selectAll(boolean,boolean)
,
getSelections()
,
getSelectedObjects()
,
getManagers()
public final int getSelectedObjectsCount(boolean traverse, boolean onlyInManagers)
traverse
is set to true
,
the method will return recursively count the selected objects of
objects of type IlvObjectWithSelection
.
If the parameter onlyInManagers
is set
to true
, it will only count the selected objects of
manager objects added in this manager.
If the parameter onlyInManagers
is set
to false
, it will also count the selected objects of
other objects such as link bundles.traverse
- If true
, the method will also count
recursively the selected objects of subobjects.onlyInManagers
- If true
, the method will count only
selected objects in submanagers.isSelected(ilog.views.IlvGraphic)
,
setSelected(IlvGraphic, boolean, boolean)
,
getSelection(IlvGraphic)
,
deSelectAll(boolean)
,
deSelectAll(int, boolean)
,
selectAll(IlvManagerView, boolean)
,
selectAll(boolean)
,
selectAll(boolean,boolean)
,
getSelections()
,
getSelectedObjects()
,
getManagers()
public void setSelectionFactory(IlvSelectionFactory factory)
makeSelection
method on the graphic object to create the
selection object. Note that the factory may return null
for some objects; in this case, the manager
also calls makeSelection
.public IlvSelectionFactory getSelectionFactory()
null
if no factory is installed.public void write(IlvOutputStream stream) throws IOException
IlvOutputStream
.
You should not call this method directly.
This method is public for implementation purposes.write
in interface IlvPersistentObject
write
in class IlvGraphic
stream
- The output stream to write this graphic object to.IOException
- thrown when an exception occurs during
the write operation for this object.public void writeIt(IlvOutputStream stream) throws IOException
IlvOutputStream
.
You should not call this method directly.
This method is public for implementation purposes.IOException
public void writePrefix(IlvOutputStream stream, boolean isSubManager) throws IOException
IOException
public void writeSuffix(IlvOutputStream stream, boolean isSubManager) throws IOException
IOException
public void readPrefix(IlvInputStream stream, boolean isSubManager) throws IOException, IlvReadFileException
IOException
IlvReadFileException
public void readSuffix(IlvInputStream stream, boolean isSubManager) throws IOException, IlvReadFileException
IOException
IlvReadFileException
public void setFileName(URL fileName) throws IOException, IlvReadFileException
IOException
IlvReadFileException
getFileName()
public URL getFileName()
setFileName
, or null
if no IVL file was read by this method.setFileName(java.net.URL)
public void write(OutputStream stream, boolean binary) throws IOException
stream
- The output stream.binary
- If true
, the resulting file is in binary mode;
otherwise, it is in ASCII mode.IOException
- usual IO errors.write(java.io.OutputStream)
,
write(String)
public void write(OutputStream stream) throws IOException
stream
- The output stream.IOException
- usual IO errors.write(java.io.OutputStream, boolean)
,
write(String)
public void write(String filename, boolean binary) throws IOException
filename
- The name of the file.binary
- If true
, then the file is stored in
the binary IVL format. Otherwise, it is stored in ASCII IVL format.IOException
- usual IO errors.write(String)
,
read(String)
public void write(String filename) throws IOException
filename
- The name of the file.IOException
- usual IO errors.read(String)
,
read(java.net.URL)
public boolean read(InputStream stream) throws IOException, IlvReadFileException
stream
- An InputStream.true
if the stream contains binary IVL data,
and false
if the stream contains ASCII IVL data.IOException
- An I/O error occurs.IlvReadFileException
- when
the manager cannot read the file, either because the file
is not a Rogue Wave JViews formatted file, the format is not correct,
or some graphic classes cannot be found.read(String)
,
read(java.net.URL)
public boolean read(String filename) throws IOException, IlvReadFileException
filename
- The name of the file to read.true
if the stream contains binary IVL data,
and false
if the stream contains ASCII IVL data.IOException
- An I/O error occurs.IlvReadFileException
- when
the manager cannot read the file, either because the file
is not a Rogue Wave JViews formatted file, the format is not correct,
or some graphic classes cannot be found.read(java.net.URL)
,
write(String)
public boolean read(URL url) throws IOException, IlvReadFileException
url
- The location of the file.true
if the stream contains binary IVL data,
and false
if the stream contains ASCII IVL data.IOException
- An I/O error occurs.IlvReadFileException
- when
the manager cannot read the file, either because the file
is not a Rogue Wave JViews file, the format is not correct,
or some graphic classes cannot be found.read(String)
,
write(String)
protected IlvInputStream createInputStream(InputStream stream)
IlvInputStream
to read a manager.
This method is called from the read
method to create
the IlvInputStream
. If a stream factory has been
installed on this manager with setStreamFactory
,
this method calls the factory's createInputStream
method.protected IlvOutputStream createOutputStream(OutputStream stream)
IlvOutputStream
to write a manager.
This method is called from the write
method to create
the IlvOutputStream
. If a stream factory has been
installed on this manager with setStreamFactory
,
this method calls the factory's createOutputStream
method.public void setStreamFactory(IlvManagerStreamFactory factory)
read
and write
methods of the manager. You can install
a stream factory to write and read additional data to Rogue Wave JViews
files without having to subclass IlvManager
.getStreamFactory()
public IlvManagerStreamFactory getStreamFactory()
public final void beforeTransform(IlvGraphic obj, boolean redraw, boolean ifneeded, boolean parent)
applyToObject
before the contents of this manager changes. The method pair
beforeTransform
and afterTransform
are
part of the mechanism that makes sure the objects are correctly drawn,
events are correctly fired and the quadtree is kept up to date.
The method applyToObject
is a shortcut for the following
code.
synchronized (getTreeLock()) { if (redraw) initReDraws(); try { beforeTransform(obj, redraw, false, true); try { applyObject.apply(obj,arg); } finally { afterTransform(obj, redraw, false, true, true); } } finally { if (redraw) reDrawViews(); } }
obj
- The graphic object.redraw
- If true
, the object is redrawn.ifneeded
- If true
, redraws only if needed.parent
- If true
propagates calling beforeTransform
to the parent manager.applyToObject(ilog.views.IlvGraphic, ilog.views.IlvApplyObject, java.lang.Object, boolean)
,
afterTransform(ilog.views.IlvGraphic, boolean, boolean, boolean, boolean)
public final void afterTransform(IlvGraphic obj, boolean redraw, boolean ifneeded, boolean parent, boolean fireEvent)
applyToObject
after the contents of this manager changed.
For details, see beforeTransform(ilog.views.IlvGraphic, boolean, boolean, boolean)
.obj
- The graphic object.redraw
- If true
, the object is redrawn.ifneeded
- If true
, redraws only if needed.parent
- If true
propagates calling afterTransform
to the parent manager.fireEvent
- If true
, fires contents changed events when necessary.applyToObject(ilog.views.IlvGraphic, ilog.views.IlvApplyObject, java.lang.Object, boolean)
,
beforeTransform(ilog.views.IlvGraphic, boolean, boolean, boolean)
protected void beforeTransformObj(IlvGraphic obj, boolean redraw, boolean ifneeded, boolean parent)
beforeTransform(ilog.views.IlvGraphic, boolean, boolean, boolean)
.
This method is part of JViews internals. You should
not use it.protected void afterTransformObj(IlvGraphic obj, boolean redraw, boolean ifneeded, boolean parent, boolean fireEvent)
afterTransform(ilog.views.IlvGraphic, boolean, boolean, boolean, boolean)
.
This method is part of JViews internals. You should
not use it.public void check(boolean verbose)
getManagers()
), the method is called recursively on them.
This method can be used for debugging and/or testing an application or an
applet that uses the classes IlvIndexedSet
,
IlvManager
, IlvGrapher
, IlvManagerLayer
,
or any subclass.
In case of an error, the method throws a RuntimeException
.
It is mandatory to identify and fix the cause of the error.
Generally, the cause of the error is not respecting the following rule
by the code written on top of Rogue Wave JViews:
any change of the bounding box of an object must be done either using a
method of the class IlvManager
, such as
moveObject(ilog.views.IlvGraphic, double, double, boolean)
,
reshapeObject(ilog.views.IlvGraphic, ilog.views.IlvRect, boolean)
, and so on, or using the method
applyToObject(ilog.views.IlvGraphic, ilog.views.IlvApplyObject, java.lang.Object, boolean)
.
verbose
- If true
, the method displays some information
about each quadtree cell.public IlvGraphicEnumeration getSelectedMovingObjects(boolean[] flags)
flags
- The flags of the select interactor that control what should
move.IlvSelectInteractor.getSelectedMovingObjects(ilog.views.IlvManager)
public void translateSelections(double dx, double dy, IlvManagerView view)
dx
- The translation on the x axis in
the view's coordinate system.dy
- The translation on the y axis in
the view's coordinate system.view
- The view of the manager.public void translateObjects(IlvGraphicEnumeration enumeration, double dx, double dy, IlvTransformer t)
enumeration
- The enumeration of the input objects.dx
- The translation on the x axis.dy
- The translation on the y axis.t
- The transformer. If you pass null
,
the translation (dx, dy)
is in the manager
coordinate system; otherwise it is in the transformed coordinate system.public void deleteSelections(boolean redraw)
redraw
- If true
, the manager views are redrawn.public void deleteSelections(boolean traverse, boolean redraw)
traverse
- If true
, the method removes the selected
objects in this manager and its submanagers.redraw
- If true
, the manager views are redrawn.getManagers()
public void duplicateSelections(int dx, int dy)
IlvGraphic.copy()
method returns
null
are not duplicated.dx
- Copied objects are translated by dx (in manager coordinates)
on the x axis.dy
- Copied objects are translated by dy (in manager coordinates)
on the y axis.public void duplicateSelections(double dx, double dy, IlvTransformer t, boolean traverse)
IlvGraphic.copy()
method returns
null
are not duplicated.dx
- Copied objects are translated by dx (in manager view coordinates)
on the x axis.dy
- Copied objects are translated by dy (in manager view coordinates)
on the y axis.t
- The transformer used to draw the manager in the view.traverse
- If true
, then selected objects that
are recursively contained in managers that are contained in this manager
are duplicated as well.public void map(IlvApplyObject f, Object arg)
f
- The function to apply.arg
- The parameter passed to f
.mapIntersects(IlvApplyObject, Object, IlvRect, IlvTransformer)
,
mapInside(IlvApplyObject, Object, IlvRect, IlvTransformer)
public void map(IlvApplyObject f, Object arg, boolean traverse)
traverse
is true, then the
function will be applied
recursively to all objects contained in managers that are
contained in this manager.f
- The function to apply.arg
- The parameter passed to f
.traverse
- If true
, then the function will be applied
recursively to all objects contained in managers that are
contained in this manager.mapIntersects(IlvApplyObject, Object, IlvRect, IlvTransformer)
,
mapInside(IlvApplyObject, Object, IlvRect, IlvTransformer)
,
getManagers()
public void mapIntersects(IlvApplyObject f, Object arg, IlvRect rect, IlvTransformer t)
f
- The function to apply.arg
- The parameter passed to f
.rect
- The rectangle.t
- The transformer used to draw the objects.map(IlvApplyObject, Object)
,
mapInside(IlvApplyObject, Object, IlvRect, IlvTransformer)
public void mapIntersects(IlvApplyObject f, Object arg, IlvRect rect, IlvTransformer t, boolean traverse)
IlvManager
objects added in this manager
to apply the function to all objects that intersect the rectangle
if the parameter traverse
is set to true
.f
- The function to apply.arg
- The parameter passed to f
.rect
- The rectangle.t
- The transformer used to draw the objects.traverse
- If true
, then the method will recursively
traverse the IlvManager
objects added in this manager
to apply the function to all objects that intersect the rectangle.map(IlvApplyObject, Object)
,
mapInside(IlvApplyObject, Object, IlvRect, IlvTransformer)
,
getManagers()
public void mapInside(IlvApplyObject f, Object arg, IlvRect rect, IlvTransformer t)
f
- The function to apply.arg
- The parameter passed to f
.rect
- The rectangle.t
- The transformer used to draw the objects.map(IlvApplyObject, Object)
,
mapIntersects(IlvApplyObject, Object, IlvRect, IlvTransformer)
public void mapInside(IlvApplyObject f, Object arg, IlvRect rect, IlvTransformer t, boolean traverse)
IlvManager
objects added in this manager to
apply the function to all objects that are inside the specified
rectangle if the parameter traverse
is set to
true
.f
- The function to apply.arg
- The parameter passed to f
.rect
- The rectangle.t
- The transformer used to draw the objects.traverse
- When true
, the method will
recursively traverse the IlvManager
objects added in
this manager to apply the function to all objects that are inside
the specified rectangle.map(IlvApplyObject, Object)
,
mapIntersects(IlvApplyObject, Object, IlvRect, IlvTransformer)
,
getManagers()
protected void objectRemoved(IlvGraphic obj)
obj
- The graphic object.public IlvGraphicEnumeration pasteSelection(IlvPoint p, boolean select)
p
- The location for the new objects. This point corresponds to
the top-left corner of the rectangle that contains the new objects. The
point must be given in the manager's coordinate system.select
- If true
, then all new objects are selected.IlvGraphicSet
). This method
returns null
if no objects were created.copySelection()
,
lostOwnership(java.awt.datatransfer.Clipboard, java.awt.datatransfer.Transferable)
public void copySelection()
public void lostOwnership(Clipboard clipboard, Transferable contents)
lostOwnership
in interface ClipboardOwner
copySelection()
,
pasteSelection(ilog.views.IlvPoint, boolean)
public boolean removeProperty(String key)
true
if
the property was found.
Otherwise it returns false
.removeProperty
in class IlvGraphic
key
- The property to be removed.
The key null
is not allowed.true
if the property was found and has been removed.IlvGraphic.getProperty(String)
,
IlvGraphic.setProperty(String, Object)
,
IlvGraphic.replaceProperty(String, Object)
,
IlvGraphic
public void setProperty(String key, Object value)
value
if the value
is non-null
.
If the value is null
, the property is removed.setProperty
in class IlvGraphic
key
- The key string for this property.
The key null
is not allowed.value
- The new value of this property.IlvGraphic.getProperty(String)
,
IlvGraphic.removeProperty(String)
,
IlvGraphic.replaceProperty(String, Object)
,
IlvGraphic
public boolean replaceProperty(String key, Object value)
true
if
the property was found.
Otherwise it returns false
.replaceProperty
in class IlvGraphic
key
- The key string for this property.
The key null
is not allowed.value
- The new value of this property. This value must not be
null
.true
if property key
was found and it's
value has been replaced with value
.IlvGraphic.getProperty(String)
,
IlvGraphic.setProperty(String, Object)
,
IlvGraphic.removeProperty(String)
,
IlvGraphic.replaceProperty(String, Object)
,
IlvGraphic
public Object getProperty(String key)
null
if the property does not exist.getProperty
in class IlvGraphic
key
- The key string for this property.key
or null
if
property key
does not exist.IlvGraphic.setProperty(String, Object)
,
IlvGraphic.removeProperty(String)
,
IlvGraphic.replaceProperty(String, Object)
,
IlvGraphic
public boolean hasProperty(String key, Object value)
hasProperty
in class IlvGraphic
key
- The key string for this property.value
- The value to be tested.true
if the value of the property key
is value
.IlvGraphic
,
IlvGraphic.setProperty(String, Object)
,
IlvGraphic.removeProperty(String)
,
IlvGraphic.replaceProperty(String, Object)
public final IlvGraphicEnumeration getManagers()
IlvBufferedGraphicEnumeration
if it is necessary to add or remove objects while using the enumeration.public final IlvGraphicEnumeration getManagers(int layer)
IlvBufferedGraphicEnumeration
layer
- The layer.public final int getManagersCount()
public final int getManagersCount(int layer)
layer
- The layer.public boolean zoomable()
false
, since this
graphic object is not zoomable.zoomable
in class IlvGraphic
IlvGraphic
,
IlvGraphic.draw(java.awt.Graphics, ilog.views.IlvTransformer)
,
IlvGraphic.boundingBox(IlvTransformer)
,
IlvManager
public void applyTransform(IlvTransformer t)
IlvGraphic
.
Note that when a transformation is being applied to
a manager, the objects contained in this manager are
not transformed; only a local transformation is used
to draw them.applyTransform
in class IlvGraphic
t
- The transformation.getTransformer()
public void moveResize(IlvRect size)
IlvManager
.
This method changes the internal transformer to
reflect the new bounding box.moveResize
in class IlvGraphic
size
- The new bounding rectangle of the object.IlvGraphic
,
IlvGraphic.applyTransform(IlvTransformer)
public void setGraphicBag(IlvGraphicBag bag)
IlvGraphicBag
such as an
IlvManager
.
You should not call this method directly unless you are
creating a new type of bag.
This method checks that the manager is added in a bag that
is a manager other bags are not allowed.setGraphicBag
in class IlvGraphic
bag
- The graphic bag.IlvGraphic
public final void setCollapsed(boolean collapsing)
ManagerExpansionEvent
before
a manager is expanded or after it is collapsed.
Notice that expanding or collapsing influences the bounding
box of the manager. If the manager is already added in another manager,
you must use the applyToObject(ilog.views.IlvGraphic, ilog.views.IlvApplyObject, java.lang.Object, boolean)
method to call this method.setCollapsed
in interface IlvObjectWithSelection
collapsing
- When set to true
, the manager is collapsed.
When set to false
, the manager is expanded.isCollapsed()
,
setCollapsedGraphic(ilog.views.IlvGraphic)
public final boolean isCollapsed()
isCollapsed
in interface IlvObjectWithSelection
setCollapsed(boolean)
,
setCollapsedGraphic(ilog.views.IlvGraphic)
public final boolean isCollapsible()
isCollapsible
in interface IlvObjectWithSelection
public final void setCollapsedGraphic(IlvGraphic graphic)
applyToObject(ilog.views.IlvGraphic, ilog.views.IlvApplyObject, java.lang.Object, boolean)
method to change the
collapsed representation. This is also valid when changing any bounding
box affecting the graphic property of the collapsed representation that is
already set for a manager.
The default value is an instance
of IlvDefaultCollapsedGraphic
.graphic
- The new graphic object used to draw the manager
when it is collapsed.getCollapsedGraphic()
,
setCollapsed(boolean)
,
setAutoLabelForCollapsedGraphic(boolean)
public final IlvGraphic getCollapsedGraphic()
setCollapsedGraphic(ilog.views.IlvGraphic)
,
isCollapsed()
public final boolean isAutoLabelForCollapsedGraphic()
true
if the label of the collapsed graphic is
determined automatically from the subgraph name.
If enabled, a collapsed graphic of type IlvLabelInterface
receives the object name of the subgraph as its label.setAutoLabelForCollapsedGraphic(boolean)
,
setObjectName(ilog.views.IlvGraphic, java.lang.String)
public final void setAutoLabelForCollapsedGraphic(boolean set)
IlvLabelInterface
receives the object name of the subgraph as its label.
This option is enabled by default.
If you want to disable this option, do it before setting the collapsed
graphic or the name of the subgraph.set
- Whether the label of the collapsed graphic is determined automatically.isAutoLabelForCollapsedGraphic()
,
setObjectName(ilog.views.IlvGraphic, java.lang.String)
public void addManagerExpansionListener(ManagerExpansionListener listener)
listener
- The listener.removeManagerExpansionListener(ilog.views.event.ManagerExpansionListener)
public void removeManagerExpansionListener(ManagerExpansionListener listener)
listener
- The listener.addManagerExpansionListener(ilog.views.event.ManagerExpansionListener)
public void addGraphicBagHierarchyListener(GraphicBagHierarchyListener listener)
IlvManager
,
IlvGraphicSet
and IlvGraphicHandleBag
that is contained
in the manager whose graphic bag has changed.addGraphicBagHierarchyListener
in interface GraphicBagHierarchyEventReceiver
listener
- The listener.removeGraphicBagHierarchyListener(ilog.views.event.GraphicBagHierarchyListener)
public void removeGraphicBagHierarchyListener(GraphicBagHierarchyListener listener)
removeGraphicBagHierarchyListener
in interface GraphicBagHierarchyEventReceiver
listener
- The listener.addGraphicBagHierarchyListener(ilog.views.event.GraphicBagHierarchyListener)
public void enableGraphicBagHierarchyEventForwarding()
GraphicBagHierarchyEvent
events, since
the objects contained in this manager need to receive the events.enableGraphicBagHierarchyEventForwarding
in interface GraphicBagHierarchyEventReceiver
public boolean needsGraphicBagHierarchyEvent()
GraphicBagHierarchyEvent
events, either from itself or from its
ancestors.needsGraphicBagHierarchyEvent
in interface GraphicBagHierarchyEventReceiver
public void fireGraphicBagHierarchyEvent(GraphicBagHierarchyEvent event)
fireGraphicBagHierarchyEvent
in interface GraphicBagHierarchyEventReceiver
public void setSelectionInvariantSubManagerBounds(boolean enable)
IlvSelection
) is normally added to
a manager layer to visually draw the selection handles. The selection
objects are added to a special manager layer called the selection
layer.
If enabled, the bounding box of this manager excludes the selection layer. When selecting inner objects, its bounds do not change. This is useful only if this manager has a manager frame and the frame margins are large enough to always include the display of the selection objects. If this option is disabled and this manager acts as submanager of its parent manager, its bounding box includes the selection layer. When selecting inner objects of this manager, its bounds may change when a selection object is positioned near the border of the manager. This option has no effect if this manager is not a submanager of another manager. The option is disabled by default.
Note: Changing this option may change the bounding box
of the manager. If the manager is already added in another
manager, use the applyToObject(ilog.views.IlvGraphic, ilog.views.IlvApplyObject, java.lang.Object, boolean)
method to change this option.
enable
- Whether selection-invariant submanager bounds are enabled.IlvSelection
,
getManagerLayer(ilog.views.IlvGraphic)
,
boundingBox(IlvTransformer)
,
isSelectionInvariantSubManagerBounds()
public boolean isSelectionInvariantSubManagerBounds()
setSelectionInvariantSubManagerBounds(boolean)
public IlvRect boundingBox(IlvTransformer t)
boundingBox
in class IlvGraphic
t
- The transformer.IlvGraphic.draw(java.awt.Graphics, ilog.views.IlvTransformer)
,
IlvGraphic.zoomable()
,
IlvGraphic
public IlvGraphic copy()
copy
in class IlvGraphic
IlvGraphic
instance.IlvGraphic
public IlvManagerFrame getFrame()
The default frame is an instance of the
class IlvDefaultManagerFrame
.
Note that this method can return null
, since the method
setFrame(ilog.views.IlvManagerFrame)
can be called with a null
argument.
setFrame(ilog.views.IlvManagerFrame)
,
IlvDefaultManagerFrame
public void setFrame(IlvManagerFrame frame)
applyToObject(ilog.views.IlvGraphic, ilog.views.IlvApplyObject, java.lang.Object, boolean)
method to change the
frame. This is also true
when changing a property of
a frame that is already attached to a manager.
The default frame is an instance of the
class IlvDefaultManagerFrame
.
Note that this method can be called with a null
argument.
In this case, no frame is drawn around the manager.
frame
- The new frame.getFrame()
,
IlvDefaultManagerFrame
public final IlvManager getParent()
null
if this manager is not contained
in a manager.public IlvTransformer getTransformer()
public final void setTransformer(IlvTransformer t)
Notice that changing the local transformer influences the bounding
box of the manager. If the manager is already added in another manager,
you must use the applyToObject(ilog.views.IlvGraphic, ilog.views.IlvApplyObject, java.lang.Object, boolean)
method to call this method.
t
- The transformer.public final boolean isKeepingAspectRatio()
true
if the local transformer of this manager
keeps the aspect ratio; otherwise it returns false
.
This only affects the manager if it is added in another manager as
a graphic object.
If it does not keep the aspect ratio, it is possible to resize
the manager inside the other manager freely along the x and y axes.
This can cause the contents of the manager to be displayed distorted.
If it keeps the aspect ratio, the manager can only be resized
proportionally along the x and y axes. Hence the zoom factor for the
contents of the manager remains the same along the x axis and
the y axis.setKeepingAspectRatio(boolean)
public final void setKeepingAspectRatio(boolean set)
true
changes the bounding
box of the manager. If the manager is already added in another manager,
you must use the applyToObject(ilog.views.IlvGraphic, ilog.views.IlvApplyObject, java.lang.Object, boolean)
method to enable keeping
the aspect ratio.set
- true
to maintain the aspect ratio,
or false
otherwise.isKeepingAspectRatio()
public IlvTransformer getDrawingTransformer(IlvManagerView view)
IlvManagerView.getTransformer()
);
otherwise, the method composes the transformer of all the parents of this
manager (see getParent()
) to
compute the result.view
- A view of this manager or a view of a manager that
is an ancestor of this manager.public IlvTransformer getTopLevelTransformer()
public final Object getTreeLock()
public ULocale getULocale()
setULocale(com.ibm.icu.util.ULocale)
call.
If no locale is stored in this manager, it returns
the locale of the first view that displays this manager,
and if no view displays this manager, it returns
IlvLocaleUtil.getCurrentULocale()
.getULocale
in interface IlvULocaleAware
getULocale
in class IlvBidiGraphic
getStoredULocale()
,
setULocale(com.ibm.icu.util.ULocale)
,
IlvLocaleUtil.getCurrentULocale()
public final ULocale getStoredULocale()
setULocale(com.ibm.icu.util.ULocale)
call.
Different to getULocale()
, if no locale is stored in this manager,
it returns null
.getULocale()
,
setULocale(com.ibm.icu.util.ULocale)
public void setULocale(ULocale locale)
null
restores the default behavior, retrieving the locale
from the first view that displays this manager.
This method calls setULocale(ULocale, boolean)
with true
for the second argument, to redraw the manager.setULocale
in interface IlvULocaleAware
locale
- The new locale.getULocale()
public void setULocale(ULocale locale, boolean redraw)
null
restores the default behavior, retrieving the locale
from the first view that displays this manager.locale
- The new locale.redraw
- Whether to redraw the manager after the change of locales.getULocale()
public boolean isLocaleSensitive()
true
if the bounding box of this object depends
on the locale of this object.isLocaleSensitive
in class IlvGraphic
public ComponentOrientation getComponentOrientation()
setComponentOrientation(java.awt.ComponentOrientation)
call.
If no component orientation is stored in this manager, it returns
the component orientation of the first view that displays this manager,
and if no view displays this manager, it returns
ComponentOrientation.UNKNOWN
.getComponentOrientation
in interface IlvComponentOrientationAware
getComponentOrientation
in class IlvBidiGraphic
getStoredComponentOrientation()
,
setComponentOrientation(java.awt.ComponentOrientation)
public final ComponentOrientation getStoredComponentOrientation()
setComponentOrientation(java.awt.ComponentOrientation)
call.
Different to getComponentOrientation()
, if no component
orientation is stored in this manager,
it returns null
.getComponentOrientation()
,
setComponentOrientation(java.awt.ComponentOrientation)
public void setComponentOrientation(ComponentOrientation co)
null
restores the default behavior, retrieving the component orientation
from the first view that displays this manager.
This method calls setComponentOrientation(ComponentOrientation, boolean)
with true
for the second argument, to redraw the manager.setComponentOrientation
in interface IlvComponentOrientationAware
co
- The new component orientationgetComponentOrientation()
public void setComponentOrientation(ComponentOrientation co, boolean redraw)
null
restores the default behavior, retrieving the component orientation
from the first view that displays this manager.co
- The new component orientation.redraw
- Whether to redraw the manager after the change of orientation.getComponentOrientation()
public boolean isComponentOrientationSensitive()
true
if the bounding box of this object depends
on the component orientation of this object.isComponentOrientationSensitive
in class IlvGraphic
public boolean isBaseTextDirectionSensitive()
true
if the bounding box of this object depends on
the base text direction of this object.isBaseTextDirectionSensitive
in class IlvGraphic
public boolean containsFrame(IlvPoint p, IlvPoint tp, IlvTransformer t)
p
- The point to be tested.tp
- The point p
transformed by the
transformer t
.t
- The transformation used to draw the object.IlvManagerFrame
public boolean contains(IlvPoint p, IlvPoint tp, IlvTransformer t)
contains
of
IlvGraphic
, and it used when the manager is
used as a graphic object.
If the frame is opaque (see IlvManagerFrame.isOpaque(ilog.views.IlvManager)
)
then the method tests if the point is the bounding area of the manager.
If the frame is not opaque, then the method returns
true
if the point
lies inside a graphic object of this manager or inside the frame using
IlvManagerFrame.contains(ilog.views.IlvManager, ilog.views.IlvPoint, ilog.views.IlvPoint, ilog.views.IlvTransformer)
.contains
in class IlvGraphic
p
- The point to be tested.tp
- The point p
transformed by the
transformer t
.t
- The transformation used to draw the object.true
if the point lies inside this graphic object.IlvGraphic
public IlvPoint getIntersectionWithOutline(IlvPoint innerPoint, IlvPoint outerPoint, IlvTransformer t)
innerPoint
is not inside the graphic object,
or if outerPoint
is not outside the graphic object, it
must return a valid point. For instance, if there is no intersection,
it can return the start point.getIntersectionWithOutline
in class IlvGraphic
innerPoint
- A point usually inside the graphic object, given in
manager view coordinates.outerPoint
- A point usually outside the graphic object, given in
manager view coordinates.t
- The transformation used to draw the object.IlvClippingLinkConnector
public void draw(Graphics dst, IlvTransformer t)
draw
method
of the class IlvGraphic
. It is
called when the manager is added in another manager
as a graphic object. The method draws the frame of the
manager (see setFrame(ilog.views.IlvManagerFrame)
) and then the contents
of the manager.draw
in class IlvGraphic
dst
- The destination Graphics
instance.t
- The transformation used to draw the object.needsDrawSubmanagerContents(double, double, ilog.views.IlvTransformer)
protected boolean needsDrawSubmanagerContents(double innerWidth, double innerHeight, IlvTransformer t)
draw(Graphics, IlvTransformer)
to
decide whether the contents of the manager should be visible.
If it returns false
, only the frame of the manager is drawn.
The default implementation returns true
if the inner width
and the inner height are above the limit obtained by
getSizeLimitToDrawSubmanagerContents()
, or the manager has no
frame. If the manager displays a frame but is smaller than, say, 5 pixel,
its contents would be so small that it is not worth spending time to
drawing it.innerWidth
- The width of the inner part of the manager frame
in view coordinates.innerHeight
- The height of the inner part of the manager frame
in view coordinates.t
- The transformer to draw the manager.public void setSizeLimitToDrawSubmanagerContents(double limit)
draw(Graphics, IlvTransformer)
to
decide whether the contents of the manager should be visible.
See needsDrawSubmanagerContents(double, double, ilog.views.IlvTransformer)
for details.
If the inner width and inner height of the frame of the manager
is smaller than this limit, the contents of the manager is not
drawn inside the frame. Only the frame is drawn.
If the inner width and inner height is larger, the frame and the
contents are drawn.
The purpose is to optimize the drawing speed. A submanager containing
many objects would require a large amount of drawing time even though
the contents are only drawn in 1-2 pixels.
needsDrawSubmanagerContents(double, double, ilog.views.IlvTransformer)
,
getSizeLimitToDrawSubmanagerContents()
public double getSizeLimitToDrawSubmanagerContents()
needsDrawSubmanagerContents(double, double, ilog.views.IlvTransformer)
,
getSizeLimitToDrawSubmanagerContents()
public void componentOrientationChanged(ComponentOrientation oldOri, ComponentOrientation newOri)
componentOrientationChanged
in class IlvGraphic
oldOri
- Orientation of this object before the orientation change.newOri
- Orientation of this object after the orientation change.isComponentOrientationSensitive()
public void localeChanged(ULocale oldLocale, ULocale newLocale)
localeChanged
in class IlvGraphic
oldLocale
- Locale of this object before the locale change.newLocale
- Locale of this object after the locale change.isLocaleSensitive()
public void baseTextDirectionChanged(int oldBaseTextDirection, int newBaseTextDirection)
baseTextDirectionChanged
in class IlvGraphic
oldBaseTextDirection
- Resolved base text direction of this object before the change.newBaseTextDirection
- Resolved base text direction of this object after the change.isBaseTextDirectionSensitive()
public void setBaseTextDirection(int baseTextDirection, boolean redraw)
IlvBidiGraphic.setBaseTextDirection(int)
.setBaseTextDirection
in class IlvBidiGraphic
baseTextDirection
- The base text directionredraw
- Whether to redraw the object after the change.© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.