public class IlvExpandCollapseMarker extends IlvGraphic
IlvExpandCollapseMarker displays an icon to expand or collapse
a frame. The icon contains a "[+]" symbol to expand, and a "[-]" symbol to
collapse.
The default values for an IlvExpandCollapseMarker instance
are as follows:
Color.blackColor.whiteColor(60,178,113)Color(0,128,0)9IlvPoint(0,0)truetrue
The IlvExpandCollapseMarker is mostly used as expand or
collapse icon at manager or link bundle frames. It can also be used
as regular graphic object. The following code example shows how to use
an IlvExpandCollapseMarker in a
simple Java application:
IlvManager manager = new IlvManager();
IlvExpandCollapseMarker myMarker =
new IlvExpandCollapseMarker(new IlvPoint(120,100), true);
myMarker.setForeground(Color.cyan);
myMarker.setSize(9);
manager.addObject( myMarker, true);
IlvExpandCollapseMarker is a custom graphic object, that is,
a subclass of IlvGraphic. Graphic objects are controlled using
an IlvManager instance and displayed using one or more
IlvManagerView instances in a Java Swing application.
For information about generic features for graphic objects, see
IlvGraphic.
IlvPoint,
IlvManager,
IlvManagerView,
Serialized Form| Constructor and Description |
|---|
IlvExpandCollapseMarker()
Creates a new
IlvExpandCollapseMarker as "[-]" symbol
centered in (0, 0). |
IlvExpandCollapseMarker(IlvExpandCollapseMarker source)
Creates a marker by copying an existing one.
|
IlvExpandCollapseMarker(IlvInputStream stream)
Reads the object from an
IlvInputStream. |
IlvExpandCollapseMarker(IlvPoint p,
boolean expanded,
int size)
Creates a new expand / collapse marker.
|
| Modifier and Type | Method and Description |
|---|---|
void |
applyTransform(IlvTransformer t)
Applies a transformation to the object.
|
IlvRect |
boundingBox(IlvTransformer t)
Returns the bounding rectangle of the object.
|
protected IlvRect |
calcBoundingBox(IlvTransformer t)
Calculates the bounding rectangle of the object.
|
IlvGraphic |
copy()
Copies the object.
|
void |
draw(Graphics dst,
IlvTransformer t)
Draws the object.
|
Color |
getBackground()
Returns the background color of the marker.
|
Color |
getBottomRightBorder()
Returns the color of the bottom right border rectangle of the marker.
|
Color |
getForeground()
Returns the foreground color of the marker.
|
IlvPoint |
getPoint()
Returns the top left corner point of the marker.
|
int |
getSize()
Returns the size of rectangle of the marker.
|
Color |
getTopLeftBorder()
Returns the color of the top left border rectangle of the marker.
|
boolean |
isExpandedIcon()
Returns whether the marker shows the expanded icon "[-]" or the
collapsed icon "[+]".
|
boolean |
isZoomable()
Returns whether the marker follows the zoom level.
|
IlvSelection |
makeSelection()
Creates a selection object for this graphic object.
|
void |
setBackground(Color color)
Changes the background color of the marker.
|
void |
setBottomRightBorder(Color color)
Changes the color of the bottom right border rectangle of the marker.
|
void |
setExpandedIcon(boolean expanded)
Sets whether the marker shows the expanded icon "[-]" or the
collapsed icon "[+]".
|
void |
setForeground(Color color)
Changes the foreground color of the marker.
|
void |
setPoint(IlvPoint p)
Changes the top left corner point of the marker.
|
void |
setSize(int size)
Changes the size of the rectangle of the marker.
|
void |
setTopLeftBorder(Color color)
Changes the color of the top left border rectangle of the marker.
|
void |
setZoomable(boolean zoomable)
Sets whether the marker follows the zoom level.
|
void |
write(IlvOutputStream stream)
Writes the object to an
IlvOutputStream. |
boolean |
zoomable()
Returns
true if the object is zoomable; otherwise it
returns false. |
addActionListener, addNamedPropertyListener, allViewsRemoved, baseTextDirectionChanged, blinkingStateOn, boundingBox, callDraw, componentOrientationChanged, contains, getAndAssociateObjectInteractor, getBaseTextDirection, getBlinkingAction, getBlinkingObjectOwner, getBlinkingOffPeriod, getBlinkingOnPeriod, getCenter, getComponentOrientation, getDefaultInteractor, getGraphicBag, GetGraphicObject, getIntersectionWithOutline, getLocale, getName, getNamedProperty, getObjectInteractor, getPopupMenu, getPopupMenu, getPopupMenuName, getProperty, getResolvedBaseTextDirection, getToolTipBaseTextDirection, getToolTipText, getToolTipText, getTopLevelGraphicBag, getTransferData, getTransferDataFlavors, getULocale, getZOrderIndex, hasProperty, inside, intersects, invalidateBBoxCache, invalidateBidiCache, isBaseTextDirectionSensitive, isComponentOrientationSensitive, isDataFlavorSupported, isEditable, isInApplyToObject, isLocaleSensitive, isMovable, isPersistent, isSelectable, isVisible, localeChanged, move, move, moveResize, needsViewNotification, notifyObjectInteractorToManager, processActionEvent, reDraw, registerBlinkingResource, removeActionListener, removeNamedProperty, removeNamedPropertyListener, removeProperty, replaceProperty, resize, rotate, scale, setBaseTextDirection, setBaseTextDirectionDuringConstruction, setBlinkingAction, setBlinkingOffPeriod, setBlinkingOnPeriod, setEditable, setFillOn, setGraphicBag, setInApplyToObject, setMovable, setName, setNamedProperty, setNameImpl, setObjectInteractor, setPopupMenu, setPopupMenuName, setProperty, setSelectable, setStrokeOn, setToolTipBaseTextDirection, setToolTipText, setVisible, setZOrderIndex, toString, translate, updateNeedsViewNotification, usesBidiMarkers, viewAddedOrRemovedpublic IlvExpandCollapseMarker()
IlvExpandCollapseMarker as "[-]" symbol
centered in (0, 0).public IlvExpandCollapseMarker(IlvPoint p, boolean expanded, int size)
p - The location of the marker.
It defines the top left corner point of the marker.expanded - If true, it displays a "[-]" symbol,
if false, it displays a "[+]" symbol.size - The size of the rectangle containing the symbol.public IlvExpandCollapseMarker(IlvExpandCollapseMarker source)
source - The source marker.public IlvExpandCollapseMarker(IlvInputStream stream) throws IlvReadFileException
IlvInputStream.stream - The input stream.IlvReadFileException - if the format is not correct.public IlvGraphic copy()
copy in class IlvGraphicIlvGraphicpublic IlvPoint getPoint()
setPoint(ilog.views.IlvPoint)public void setPoint(IlvPoint p)
p - The new top left corner point.getPoint()public boolean isExpandedIcon()
setExpandedIcon(boolean)public void setExpandedIcon(boolean expanded)
expanded - If true, it displays a "[-]" symbol,
if false, it displays a "[+]" symbol.isExpandedIcon()public int getSize()
setSize(int)public void setSize(int size)
size - The size of the marker.getSize()public boolean isZoomable()
setZoomable(boolean)public void setZoomable(boolean zoomable)
Note: If this object is contained inside an
IlvManager, users must use the method
IlvManager.applyToObject(ilog.views.IlvGraphic, ilog.views.IlvApplyObject, java.lang.Object, boolean) for this operation.
isZoomable()public boolean zoomable()
true if the object is zoomable; otherwise it
returns false.zoomable in class IlvGraphicIlvGraphic,
IlvGraphic.draw(java.awt.Graphics, ilog.views.IlvTransformer),
IlvGraphic.boundingBox(IlvTransformer),
IlvManagerpublic void setForeground(Color color)
IlvBlinkingColor.setForeground in class IlvGraphiccolor - The new color.IlvGraphic.draw(Graphics, IlvTransformer),
IlvGraphic.setBackground(Color),
IlvGraphic.setFillOn(boolean),
IlvGraphic.setStrokeOn(boolean),
IlvGraphicpublic Color getForeground()
public void setBackground(Color color)
IlvBlinkingColor.setBackground in class IlvGraphiccolor - The new color.IlvGraphic.draw(Graphics, IlvTransformer),
IlvGraphic.setForeground(Color),
IlvGraphic.setFillOn(boolean),
IlvGraphic.setStrokeOn(boolean),
IlvGraphicpublic Color getBackground()
public void setTopLeftBorder(Color color)
IlvBlinkingColor.color - The new color.public Color getTopLeftBorder()
public void setBottomRightBorder(Color color)
IlvBlinkingColor.color - The new color.public Color getBottomRightBorder()
public void draw(Graphics dst, IlvTransformer t)
draw in class IlvGraphicdst - The destination Graphics.t - The transformation used to draw the object.IlvGraphic.callDraw(Graphics,IlvTransformer),
IlvGraphic.boundingBox(IlvTransformer),
IlvGraphic.zoomable(),
IlvGraphicpublic IlvRect boundingBox(IlvTransformer t)
calcBoundingBox(ilog.views.IlvTransformer)
to recalculate the bounding box.boundingBox in class IlvGraphict - The transformer used to draw the object.IlvGraphic.draw(java.awt.Graphics, ilog.views.IlvTransformer),
IlvGraphic.zoomable(),
IlvGraphicprotected IlvRect calcBoundingBox(IlvTransformer t)
boundingBox(ilog.views.IlvTransformer) if the current bounding
box is not cached.t - The transformer used to draw the object.public void applyTransform(IlvTransformer t)
getPoint()).applyTransform in class IlvGraphict - The transformer to be applied.IlvGraphicpublic IlvSelection makeSelection()
IlvUnresizeableDrawSelection.makeSelection in class IlvGraphicIlvDrawSelectionpublic void write(IlvOutputStream stream) throws IOException
IlvOutputStream.
You should not call this
method directly; instead, you should use the write
methods of the manager.write in interface IlvPersistentObjectwrite in class IlvGraphicstream - The output stream.IOException - thrown when an exception occurs during
the write operation for this object.© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.