ilog.views.gantt.graphic.renderer
Class IlvBasicActivitySymbol

java.lang.Object
  extended by ilog.views.gantt.graphic.renderer.IlvActivityGraphicRenderer
      extended by ilog.views.gantt.graphic.renderer.IlvBasicActivitySymbol
All Implemented Interfaces:
IlvActivityRenderer
Direct Known Subclasses:
IlvActivitySymbol

public class IlvBasicActivitySymbol
extends IlvActivityGraphicRenderer

The class IlvBasicActivitySymbol is used to render the symbols at the start and end of an activity. The tooltip property of this renderer is not computed dynamically from the activity that is being rendered. Therefore, this renderer is primarily intended to be used when you apply CSS style sheets to the Gantt or Schedule chart. In this case, the CSS styling mechanism will handle dynamic updates to the renderer based upon its interpretation of the style sheets and the data model. If you are not using CSS styling and you want the tooltip of the renderer to be dynamically computed from an activity, you should use the IlvActivitySymbol renderer instead. Several predefined shapes are available.

Since:
JViews 5.5
See Also:
getShape(), setShape(int)

Field Summary
static int CIRCLE
          Renders the symbol as a hollow circle.
static int DIAMOND
          Renders the symbol as a diamond.
static int DOWN_PENTAGON
          Renders the symbol as a pentagon pointing down.
static int END
          The symbol is configured as an end symbol.
static int FILLED_CIRCLE
          Renders the symbol as a filled circle.
static int START
          The symbol is configured as a start symbol.
static int UP_PENTAGON
          Renders the symbol as a pentagon pointing up.
 
Constructor Summary
IlvBasicActivitySymbol()
          Creates a symbol renderer.
 
Method Summary
 int getAlignment()
          Returns the alignment of the symbol.
 Color getBackground()
          Returns the renderer background color.
 IlvRect getBounds(IlvActivityGraphic ag, IlvTransformer t)
          Returns the rectangle in which the activity graphic should be drawn.
 Color getForeground()
          Returns the renderer foreground color.
 int getShape()
          Returns the shape of the symbol.
 void setAlignment(int alignment)
          Sets the alignment of the symbol.
 void setGraphic(IlvGraphic graphic)
          Sets the IlvGraphic used to render the symbol.
 void setShape(int shape)
          Sets the shape of the symbol.
 
Methods inherited from class ilog.views.gantt.graphic.renderer.IlvActivityGraphicRenderer
contains, draw, getBottomMargin, getGraphic, getPopupMenu, getPopupMenuName, getToolTipText, getToolTipText, getTopMargin, isRedrawNeeded, makeSelection, prepareGraphic, setBackground, setBottomMargin, setForeground, setPopupMenu, setPopupMenuName, setToolTipText, setTopMargin
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

START

public static final int START
The symbol is configured as a start symbol.

See Also:
setAlignment(int), Constant Field Values

END

public static final int END
The symbol is configured as an end symbol.

See Also:
setAlignment(int), Constant Field Values

DOWN_PENTAGON

public static final int DOWN_PENTAGON
Renders the symbol as a pentagon pointing down. This is the default shape.

See Also:
setShape(int), Constant Field Values

UP_PENTAGON

public static final int UP_PENTAGON
Renders the symbol as a pentagon pointing up.

See Also:
setShape(int), Constant Field Values

DIAMOND

public static final int DIAMOND
Renders the symbol as a diamond.

See Also:
setShape(int), Constant Field Values

CIRCLE

public static final int CIRCLE
Renders the symbol as a hollow circle.

See Also:
setShape(int), Constant Field Values

FILLED_CIRCLE

public static final int FILLED_CIRCLE
Renders the symbol as a filled circle.

See Also:
setShape(int), Constant Field Values
Constructor Detail

IlvBasicActivitySymbol

public IlvBasicActivitySymbol()
Creates a symbol renderer. The default shape is a pentagon pointing down.

Method Detail

getAlignment

public int getAlignment()
Returns the alignment of the symbol. This will be one of the constants: START or END. The default value is START.

See Also:
setAlignment(int)

setAlignment

public void setAlignment(int alignment)
Sets the alignment of the symbol. The style must be one of the constants: START or END.

See Also:
getAlignment()

setGraphic

public void setGraphic(IlvGraphic graphic)
Sets the IlvGraphic used to render the symbol. This method is overridden to throw an UnsupportedOperationException. You should use the setShape(int) method to change the symbol instead.

Overrides:
setGraphic in class IlvActivityGraphicRenderer
Parameters:
graphic - The new graphic.
See Also:
IlvActivityGraphicRenderer.getGraphic()

getShape

public int getShape()
Returns the shape of the symbol. This will be one of the constants: DOWN_PENTAGON, UP_PENTAGON, DIAMOND, CIRCLE, or FILLED_CIRCLE. The default shape is DOWN_PENTAGON.

See Also:
setShape(int)

setShape

public void setShape(int shape)
Sets the shape of the symbol. The shape must be one of the constants: DOWN_PENTAGON, UP_PENTAGON, DIAMOND, CIRCLE, or FILLED_CIRCLE.

See Also:
getShape()

getForeground

public Color getForeground()
Returns the renderer foreground color.

Returns:
A Color representing the renderer foreground color.
See Also:
IlvActivityGraphicRenderer.setForeground(java.awt.Color)

getBackground

public Color getBackground()
Returns the renderer background color.

Returns:
A Color representing the renderer background color.
See Also:
IlvActivityGraphicRenderer.setBackground(java.awt.Color)

getBounds

public IlvRect getBounds(IlvActivityGraphic ag,
                         IlvTransformer t)
Returns the rectangle in which the activity graphic should be drawn.

Specified by:
getBounds in interface IlvActivityRenderer
Overrides:
getBounds in class IlvActivityGraphicRenderer
Parameters:
ag - The activity graphic.
t - The transformer.
Returns:
The bounding box.


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