ilog.views.gantt.graphic.renderer
Interface IlvActivityRenderer

All Known Implementing Classes:
IlvActivityBar, IlvActivityCompositeGraphicRenderer, IlvActivityCompositeRenderer, IlvActivityGraphicRenderer, IlvActivityLabel, IlvActivitySummary, IlvActivitySymbol, IlvBasicActivityBar, IlvBasicActivityLabel, IlvBasicActivitySymbol

public interface IlvActivityRenderer

An IlvActivityRenderer object defines the graphic presentation of a given activity and its activity graphic.


Method Summary
 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 object.
 String getPopupMenuName()
          This method is called by an activity graphic to return the name of the Swing popup menu.
 String getToolTipText(IlvActivityGraphic ag, IlvPoint p, IlvTransformer t)
          This method is called by an activity graphic to return tooltip text for itself.
 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 ag)
          This method is called by an activity graphic to create and return a selection object for itself.
 

Method Detail

getBounds

IlvRect getBounds(IlvActivityGraphic ag,
                  IlvTransformer t)
Returns the rectangle in which the activity graphic should be drawn. In the typical case, the implementation of this method should just apply the transformer to the definitionRect of the activity graphic.

Parameters:
ag - The activity graphic.
t - The transformer.
Returns:
The bounding box.

contains

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.

Parameters:
ag - 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.
Returns:
true if the point lies inside this activity graphic.
Since:
JViews 8.1

draw

void draw(Graphics dst,
          IlvActivityGraphic ag,
          IlvTransformer t)
This method is called by an activity graphic to render itself.

Parameters:
dst - 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.

isRedrawNeeded

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. This method should return true if the event indicates that a property of the activity visualized by the renderer has changed.

Parameters:
evt - The activity event.
Returns:
Whether the activity graphic should redraw based upon the specified activity change.

makeSelection

IlvSelection makeSelection(IlvActivityGraphic ag)
This method is called by an activity graphic to create and return a selection object for itself.

Note, that the selection object must be compatible with all activity renderer implementations in use, not just the specific renderer implementation this method is being invoked on. This is because the renderer assigned to an activity graphic may change while the activity graphic remains selected. The default IlvActivityGraphicSelection class is generic and is compatible with all renderer implementations.

Parameters:
ag - The activity graphic.
Returns:
The selection object.
Since:
JViews 3.5

getToolTipText

String getToolTipText(IlvActivityGraphic ag,
                      IlvPoint p,
                      IlvTransformer t)
This method is called by an activity graphic to return tooltip text for itself. This method can return null to turn off the tooltip for the activity graphic.

Parameters:
ag - The activity graphic.
p - The location of the mouse (in view coordinates).
t - The transformer.
Returns:
The tooltip text.
Since:
JViews 3.5

getPopupMenu

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 object. You can override this method to display different popup menus over different parts of your graphic object.

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).

Parameters:
ag - 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 tool tip is about to be displayed (the view coordinates).
view - The manager view that triggered the popup menu.
popupManager - The popup menu manager.
Returns:
The Swing popup menu, which can be null.
Since:
JViews 7.5
See Also:
IlvActivityGraphic.getPopupMenu(IlvPoint,IlvTransformer,IlvManagerView,IlvPopupMenuManager)

getPopupMenuName

String getPopupMenuName()
This method is called by an activity graphic to return the name of the Swing popup menu. This method can return null.

Returns:
The name of the Swing popup menu, which can be null.
Since:
JViews 7.5
See Also:
IlvActivityGraphic.getPopupMenu(IlvPoint,IlvTransformer,IlvManagerView,IlvPopupMenuManager)


Copyright © 1996-2007 ILOG S.A. All rights reserved.   Documentation homepage.