|
||||||||||
| PREV CLASS Documentation homepage NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectilog.views.gantt.graphic.renderer.IlvActivityCompositeRenderer
public class IlvActivityCompositeRenderer
An IlvActivityCompositeRenderer is a renderer composed of zero, one, or
more child activity renderers. The various child renderers
are called successively to render the activity graphic.
| Constructor Summary | |
|---|---|
IlvActivityCompositeRenderer()
Creates a new IlvActivityCompositeRenderer containing no child
renderers. |
|
| Method Summary | |
|---|---|
void |
addRenderer(IlvActivityRenderer renderer)
Appends an activity renderer to the list of child renderers. |
boolean |
contains(IlvActivityGraphic ag,
IlvPoint p,
IlvPoint tp,
IlvTransformer t)
This method is called by an activity graphic to
test whether a point lies within its boundaries. |
void |
draw(Graphics dst,
IlvActivityGraphic ag,
IlvTransformer t)
This method is called by an activity graphic to
render itself. |
IlvRect |
getBounds(IlvActivityGraphic ag,
IlvTransformer t)
Returns the rectangle in which the activity graphic should be drawn. |
JPopupMenu |
getPopupMenu(IlvActivityGraphic ag,
IlvPoint p,
IlvTransformer t,
IlvManagerView view,
IlvPopupMenuManager popupManager)
This method is called by an activity graphic
to return the Swing popup menu to display when the popup is triggered while the mouse
pointer is at a specified location inside the activity graphic renderer. |
String |
getPopupMenuName()
This method is called by an activity graphic
to return the name of the Swing popup menu. |
IlvActivityRenderer |
getRenderer(int index)
Returns the child activity renderer at the specified index in the composite renderer. |
IlvActivityRenderer |
getRendererAt(int index)
Deprecated. Beginning with ILOG JViews 6.0, you should use the getRenderer(int)
method instead. |
protected IlvActivityRenderer |
getRendererContaining(IlvActivityGraphic ag,
IlvPoint p)
Deprecated. Beginning with ILOG JViews 6.0 you should use the getRendererContaining(IlvActivityGraphic,IlvPoint,IlvPoint,
IlvTransformer) method instead. |
protected IlvActivityRenderer |
getRendererContaining(IlvActivityGraphic ag,
IlvPoint p,
IlvPoint tp,
IlvTransformer t)
Returns which of the child composite renderers contains the specified point. |
int |
getSize()
Returns the number of child renderers contained in the composite renderer. |
String |
getToolTipText(IlvActivityGraphic ag,
IlvPoint p,
IlvTransformer t)
This method is called by an activity
graphic to return tooltip text for itself. |
void |
insertRendererAt(IlvActivityRenderer renderer,
int index)
Inserts an activity renderer at the specified index in the list of child renderers. |
boolean |
isRedrawNeeded(ActivityEvent evt)
This method is called by an activity graphic to determine
if it should redraw itself as a result of the specified activity event. |
IlvSelection |
makeSelection(IlvActivityGraphic g)
This method is called by an activity graphic
to create and return a selection object for itself. |
void |
setPopupMenuName(String popupName)
Sets the Swing popup menu of this activity composite renderer by name. |
void |
setRenderer(int index,
IlvActivityRenderer renderer)
Sets an activity renderer at the specified index in the list of child renderers. |
void |
setRendererAt(IlvActivityRenderer renderer,
int index)
Deprecated. Beginning with ILOG JViews 6.0, you should use the setRenderer(int, ilog.views.gantt.graphic.renderer.IlvActivityRenderer)
method instead. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public IlvActivityCompositeRenderer()
IlvActivityCompositeRenderer containing no child
renderers.
| Method Detail |
|---|
public int getSize()
public IlvActivityRenderer getRendererAt(int index)
getRenderer(int)
method instead.
null is
returned.
index - The index of the child renderer.
IndexOutOfBoundsException - if index < 0 || index >=
getSize().public IlvActivityRenderer getRenderer(int index)
index >=
getSize(), then null is returned.
index - The index of the child renderer.
IndexOutOfBoundsException - if index < 0.public void addRenderer(IlvActivityRenderer renderer)
renderer - The activity renderer to be appended.
public void insertRendererAt(IlvActivityRenderer renderer,
int index)
renderer - The activity renderer to be inserted.index - The index at which to insert the child renderer.
IndexOutOfBoundsException - if index < 0 || index >
getSize().
public void setRendererAt(IlvActivityRenderer renderer,
int index)
setRenderer(int, ilog.views.gantt.graphic.renderer.IlvActivityRenderer)
method instead.
renderer - The activity renderer to be set.index - The index at which the renderer should be set.
IndexOutOfBoundsException - if index < 0 || index >=
getSize().
public void setRenderer(int index,
IlvActivityRenderer renderer)
null renderers are added in between.
index - The index at which the renderer should be set.renderer - The activity renderer to be set.
IndexOutOfBoundsException - if index < 0.
public IlvRect getBounds(IlvActivityGraphic ag,
IlvTransformer t)
getBounds method of each individual renderer
contained in the composite and merges the results into a single rectangle.
getBounds in interface IlvActivityRendererag - The activity graphic.t - The transformer.
public boolean contains(IlvActivityGraphic ag,
IlvPoint p,
IlvPoint tp,
IlvTransformer t)
activity graphic to
test whether a point lies within its boundaries.
contains in interface IlvActivityRendererag - The activity graphic.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 activity graphic.
public void draw(Graphics dst,
IlvActivityGraphic ag,
IlvTransformer t)
activity graphic to
render itself. This implementation successively calls each IlvActivityRenderer instance contained in the composite to render the activity
graphic.
draw in interface IlvActivityRendererdst - The destination into which the presentation will be drawn.ag - The activity graphic holding the position where the presentation should be
drawn.t - The transformer.public boolean isRedrawNeeded(ActivityEvent evt)
activity graphic to determine
if it should redraw itself as a result of the specified activity event. This method
is implemented to return true if any of the composite renderer's
children return true to the same query.
isRedrawNeeded in interface IlvActivityRendererevt - The activity event.
public IlvSelection makeSelection(IlvActivityGraphic g)
activity graphic
to create and return a selection object for itself. This default implementation
returns an IlvActivityGraphicSelection instance.
Note, that the selection object must be compatible with all activity renderer
implementations in use, not just the specific renderer implementation this method is
invoked on. This is because the renderer assigned to an activity graphic may
change while the activity graphic remains selected. The IlvActivityGraphicSelection returned by this implementation is generic and is
compatible with all renderer implementations.
makeSelection in interface IlvActivityRendererg - The activity graphic.
protected IlvActivityRenderer getRendererContaining(IlvActivityGraphic ag,
IlvPoint p)
getRendererContaining(IlvActivityGraphic,IlvPoint,IlvPoint,
IlvTransformer) method instead.
null if the point is not contained by any of
the child renderers.
ag - The activity graphic.p - The point in world coordinates.
protected IlvActivityRenderer getRendererContaining(IlvActivityGraphic ag,
IlvPoint p,
IlvPoint tp,
IlvTransformer t)
null if the point is not contained by any of the child
renderers.
ag - The activity graphic.p - The point in world coordinates.tp - The point p transformed.t - The transformer.
p if there is one. Otherwise this
method returns null.
public String getToolTipText(IlvActivityGraphic ag,
IlvPoint p,
IlvTransformer t)
activity
graphic to return tooltip text for itself. This implementation determines which
child renderer contains the specified mouse location and returns the value of the
child renderer's getToolTipText method.
getToolTipText in interface IlvActivityRendererag - The activity graphic.p - The location of the mouse (in view coordinates).t - The transformer.
public JPopupMenu getPopupMenu(IlvActivityGraphic ag,
IlvPoint p,
IlvTransformer t,
IlvManagerView view,
IlvPopupMenuManager popupManager)
activity graphic
to return the Swing popup menu to display when the popup is triggered while the mouse
pointer is at a specified location inside the activity graphic renderer. This
implementation determines which child renderer contains the specified mouse location
and returns the value of the getPopupMenu method of the child renderer.
This method can return null to turn off the popup menu for this activity
graphic object.
Note that you must enable the popup menu mechanism for the manager view by calling
the method IlvGanttSheet.setPopupMenusEnabled(boolean)
getPopupMenu in interface IlvActivityRendererag - The activity graphic.p - The location of the mouse (in view coordinates).t - The transformer that converts the coordinate system of this
object (the manager coordinates) into the coordinate system of
the manager view in which the tooltip is about to be displayed
(the view coordinates).view - The manager view that triggered the popup menu.popupManager - The popup menu manager.
null.IlvActivityGraphic.getPopupMenu(IlvPoint,IlvTransformer,IlvManagerView,
IlvPopupMenuManager)public void setPopupMenuName(String popupName)
This is an alternative way to set the popup menu of this renderer. You need to
register a Swing popup menu for the name through IlvPopupMenuManager.registerMenu(String,
JPopupMenu) and use the name to specify the popup menu of this activity composite
renderer. Popup menus for ILOG JViews activity graphic renderers will work only if
your manager view is contained in a hierarchy of Swing components. In addition, you
must enable the popup menu mechanism for the Gantt sheet view by calling the method
IlvGanttSheet.setPopupMenusEnabled(boolean).
popupName - The name of the registered Swing popup menu to be used for this
activity composite renderer. If popupName is
null, the popup menu is turned off for this activity
graphic renderer.IlvPopupMenuManager,
getPopupMenuName()public String getPopupMenuName()
activity graphic
to return the name of the Swing popup menu. If you have set a popup menu name by
calling the setPopupMenuName(java.lang.String) method, then that popup menu name is returned.
This method can return null.
getPopupMenuName in interface IlvActivityRenderernull.IlvActivityGraphic.getPopupMenu(IlvPoint,IlvTransformer,IlvManagerView,
IlvPopupMenuManager),
setPopupMenuName(java.lang.String)
|
||||||||||
| PREV CLASS Documentation homepage NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||