public abstract class IlvTimeIndicator extends IlvGraphic implements VerticalScrollListener
IlvTimeIndicator
class is used to represent
a time in an IlvGanttSheet
. The time indicator uses
an IlvGraphic
as a renderer.Modifier and Type | Field and Description |
---|---|
protected IlvGraphic |
renderer
The graphic representing this renderer.
|
Constructor and Description |
---|
IlvTimeIndicator(Date time,
IlvGraphic renderer)
Deprecated.
Beginning with Perforce JViews 8.1, use the
IlvTimeIndicator(Date,
IlvGraphic, String) constructor that takes a description
argument. |
IlvTimeIndicator(Date time,
IlvGraphic renderer,
String description)
Creates a new
IlvTimeIndicator for indicating a time, with an associated
renderer. |
Modifier and Type | Method and Description |
---|---|
void |
applyTransform(IlvTransformer t)
Overrides the
applyTransform method of the
IlvGraphic class so that it does nothing. |
IlvRect |
boundingBox(IlvTransformer t)
Returns the bounding rectangle of the time indicator renderer.
|
IlvGraphic |
copy()
Overrides the
copy method of the IlvGraphic
class. |
void |
draw(Graphics dst,
IlvTransformer t)
Draws the time indicator graphic objects.
|
float |
getAlpha()
Returns the current alpha value for the layer that holds this graphic
object.
|
String |
getDescription()
Returns the description of the time indicator.
|
int |
getMaxWidth()
Gets the maximum width for this time indicator.
|
IlvGraphic |
getRenderer()
Returns the renderer used to draw this time indicator.
|
Date |
getTime()
Gets the time associated to this time indicator.
|
void |
maxVerticalPositionChanged(VerticalScrollEvent evt)
Deprecated.
Beginning with Perforce JViews 8.5, this method does nothing and is never
invoked because time indicators no longer need to implement the
VerticalScrollListener interface in order to redraw themselves
properly. |
protected IlvGraphic |
prepareGraphic(IlvTransformer t)
Deprecated.
Beginning with Perforce JViews 8.1, this method is not invoked internally
anymore.
|
void |
setAlpha(float alpha)
Set the alpha value for the layer that holds this graphic object.
|
void |
setBackground(Color c)
Changes the background color of the time indicator graphic object.
|
void |
setDescription(String description)
Sets the description of the time indicator.
|
void |
setFillOn(boolean value)
Changes the fill status of the time indicator graphic object.
|
void |
setForeground(Color c)
Changes the foreground color of the time indicator graphic object.
|
void |
setMaxWidth(int maxWidth)
Sets the maximum width for this time indicator, so that the drawing
does not exceed this width;
|
void |
setRenderer(IlvGraphic renderer)
Sets the renderer used to draw this time indicator.
|
void |
setStrokeOn(boolean value)
Changes the stroke status of the time indicator graphic object.
|
void |
setTime(Date time)
Sets the time this time indicator will represent.
|
void |
setToolTipText(String text)
Sets the text to display in the tooltip of this object.
|
protected IlvRect |
timeIndicatorBBox()
Deprecated.
Beginning with Perforce JViews 8.5 call
boundingBox(IlvTransformer)
instead. |
void |
update()
Deprecated.
Beginning with Perforce JViews 8.5, this method is no longer used because the
time indicator will redraw itself automatically whenever its time value or its renderer is changed.
|
void |
verticalExtentChanged(VerticalScrollEvent evt)
Deprecated.
Beginning with Perforce JViews 8.5, this method does nothing and is never
invoked because time indicators no longer need to implement the
VerticalScrollListener interface in order to redraw themselves
properly. |
void |
verticalPositionChanged(VerticalScrollEvent evt)
Deprecated.
Beginning with Perforce JViews 8.5, this method does nothing and is never
invoked because time indicators no longer need to implement the
VerticalScrollListener interface in order to redraw themselves
properly. |
boolean |
zoomable()
Returns
false , indicating that time indicators are not zoomable
graphics. |
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, makeSelection, move, move, moveResize, needsViewNotification, notifyObjectInteractorToManager, processActionEvent, reDraw, registerBlinkingResource, removeActionListener, removeNamedProperty, removeNamedPropertyListener, removeProperty, replaceProperty, resize, rotate, scale, setBaseTextDirection, setBaseTextDirectionDuringConstruction, setBlinkingAction, setBlinkingOffPeriod, setBlinkingOnPeriod, setEditable, setGraphicBag, setInApplyToObject, setMovable, setName, setNamedProperty, setNameImpl, setObjectInteractor, setPopupMenu, setPopupMenuName, setProperty, setSelectable, setToolTipBaseTextDirection, setVisible, setZOrderIndex, toString, translate, updateNeedsViewNotification, usesBidiMarkers, viewAddedOrRemoved, write
protected IlvGraphic renderer
@Deprecated public IlvTimeIndicator(Date time, IlvGraphic renderer)
IlvTimeIndicator(Date,
IlvGraphic, String)
constructor that takes a description
argument.IlvTimeIndicator
for indicating a time, with an
associated renderer. By default, the time indicator is not selectable.time
- The associated time.renderer
- The renderer used to display the time indicator.public IlvTimeIndicator(Date time, IlvGraphic renderer, String description)
IlvTimeIndicator
for indicating a time, with an associated
renderer. By default, the time indicator is not selectable.time
- The associated time.renderer
- The renderer used to render the time indicator.description
- A description string.public String getDescription()
setDescription(String)
public void setDescription(String description)
description
- The description.getDescription()
public IlvGraphic getRenderer()
null
.IlvGraphic
used to draw this time indicator.public void setRenderer(IlvGraphic renderer)
renderer
- An IlvGraphic
to draw the time indicator.
Can not be null
.public Date getTime()
Date
representing the time associated to this
time indicator, or null
.public void setTime(Date time)
time
- A Date
representing the time associated to this
time indicator..public int getMaxWidth()
public void setMaxWidth(int maxWidth)
maxWidth
- the maximum width for this time indicator.public float getAlpha()
setAlpha(float)
public void setAlpha(float alpha)
Note: Alpha values less than 1.0 are slower to draw, especially on X11
platforms when the system property sun.java2d.pmoffscreen
is
not set to false.
alpha
- float value for new alpha value setting for the layer
containing this object.getAlpha()
public void setForeground(Color c)
Note that not all graphic objects have a foreground color. Therefore, a call to this method may not do anything.
setForeground
in class IlvGraphic
c
- The new color.IlvGraphic.draw(Graphics, IlvTransformer)
,
IlvGraphic.setBackground(Color)
,
IlvGraphic.setFillOn(boolean)
,
IlvGraphic.setStrokeOn(boolean)
,
IlvGraphic
public void setFillOn(boolean value)
Note that not all graphic objects may be filled. Therefore, a call to this method may not do anything.
setFillOn
in class IlvGraphic
value
- true
if fill is on.IlvGraphic.draw(Graphics, IlvTransformer)
,
IlvGraphic.setBackground(Color)
,
IlvGraphic.setForeground(Color)
,
IlvGraphic.setStrokeOn(boolean)
,
IlvGraphic
public void setBackground(Color c)
Note that not all graphic objects have a background color. Therefore, a call to this method may not do anything.
setBackground
in class IlvGraphic
c
- The new color.IlvGraphic.draw(Graphics, IlvTransformer)
,
IlvGraphic.setForeground(Color)
,
IlvGraphic.setFillOn(boolean)
,
IlvGraphic.setStrokeOn(boolean)
,
IlvGraphic
public void setStrokeOn(boolean value)
Note that not all graphic objects may be stroked. Therefore, a call to this method may not do anything.
setStrokeOn
in class IlvGraphic
value
- true
if stroke is on.IlvGraphic.draw(Graphics, IlvTransformer)
,
IlvGraphic.setBackground(Color)
,
IlvGraphic.setForeground(Color)
,
IlvGraphic.setFillOn(boolean)
,
IlvGraphic
public void setToolTipText(String text)
Tooltips for Perforce JViews graphic objects will work only
if your manager view is contained in a hierarchy of Swing components.
In addition, you must enable the tooltip mechanism for the manager view
by calling the static method
IlvToolTipManager.registerView(ilog.views.IlvManagerView)
.
Tooltip formatting is supported by the underlying Swing tooltip
mechanism (see JToolTip
). For instance, the
following string is a multiline tooltip:
"<html>This is a<br>multiline<br>tooltip</html>".
An easy way to create formatted multiline tooltips is the method
IlvSwingUtil.createMultiLineToolTipText(java.lang.String[], int)
.
See also the method
IlvSwingUtil.escapeForHTMLElement(java.lang.String, boolean)
.
setToolTipText
in class IlvGraphic
text
- The tooltip string to display. Set text
to
null
to turn off the tooltip for this graphic object.IlvToolTipManager
,
IlvToolTipManager.registerView(ilog.views.IlvManagerView)
,
IlvGraphic.getToolTipText()
,
IlvGraphic.getToolTipText(IlvPoint, IlvTransformer)
,
IlvGraphic
public void applyTransform(IlvTransformer t)
applyTransform
method of the
IlvGraphic
class so that it does nothing.
This means that all methods of IlvGraphic
that
are using this method will do nothing.
You cannot directly change the shape of an IlvTimeIndicator
.applyTransform
in class IlvGraphic
t
- the transformer to be applied.IlvGraphic
public boolean zoomable()
false
, indicating that time indicators are not zoomable
graphics.zoomable
in class IlvGraphic
IlvGraphic
,
IlvGraphic.draw(java.awt.Graphics, ilog.views.IlvTransformer)
,
IlvGraphic.boundingBox(IlvTransformer)
,
IlvManager
@Deprecated public void update()
public IlvRect boundingBox(IlvTransformer t)
boundingBox
in class IlvGraphic
t
- The transformer used to draw the object. The value
null
can be used for the identity transformer.draw(java.awt.Graphics, ilog.views.IlvTransformer)
,
zoomable()
@Deprecated protected IlvRect timeIndicatorBBox()
boundingBox(IlvTransformer)
instead.@Deprecated protected IlvGraphic prepareGraphic(IlvTransformer t)
bounds
.t
- The transformer.public IlvGraphic copy()
copy
method of the IlvGraphic
class. This method always returns null
. You
should not use it.copy
in class IlvGraphic
null
.IlvGraphic
public void draw(Graphics dst, IlvTransformer t)
If you need to change the way the time indicator is rendered, you should change the renderer.
draw
in class IlvGraphic
dst
- The destination where the time indicator will be drawn.t
- The transformer.IlvGraphic.callDraw(Graphics,IlvTransformer)
,
IlvGraphic.boundingBox(IlvTransformer)
,
IlvGraphic.zoomable()
,
IlvGraphic
@Deprecated public void maxVerticalPositionChanged(VerticalScrollEvent evt)
VerticalScrollListener
interface in order to redraw themselves
properly.IlvVerticalScrollable
object is changed.maxVerticalPositionChanged
in interface VerticalScrollListener
evt
- The event.IlvVerticalScrollable.setMaxVerticalPosition(int)
@Deprecated public void verticalExtentChanged(VerticalScrollEvent evt)
VerticalScrollListener
interface in order to redraw themselves
properly.IlvVerticalScrollable
object is
changed.verticalExtentChanged
in interface VerticalScrollListener
evt
- The event.IlvVerticalScrollable.setVerticalExtent(int)
@Deprecated public void verticalPositionChanged(VerticalScrollEvent evt)
VerticalScrollListener
interface in order to redraw themselves
properly.IlvVerticalScrollable
object is
changed.verticalPositionChanged
in interface VerticalScrollListener
evt
- The event.IlvVerticalScrollable.setVerticalPosition(int)
© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.