ilog.views.gantt.graphic.renderer
Class IlvBasicActivityBar

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

public class IlvBasicActivityBar
extends IlvActivityGraphicRenderer

The class IlvBasicActivityBar draws a rectangle to render the duration of a given activity in a Gantt sheet. It also renders an optional text label inside the rectangle. The text label and tooltip properties of this renderer are 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 text label of the renderer to be dynamically computed from a property of the activity, you should use the IlvActivityBar renderer instead.

IlvBasicActivityBar
An IlvBasicActivityBar as a shadow rectangle.

IlvBasicActivityBar
An IlvBasicActivityBar as a relief rectangle.

Since:
JViews 5.5

Field Summary
static int RELIEF
          The activity will be rendered as a relief rectangle.
static int SHADOW
          The activity will be rendered as a shadow rectangle.
 
Constructor Summary
IlvBasicActivityBar()
          Creates an IlvBasicActivityBar renderer with the default SHADOW style.
 
Method Summary
 Color getBackground()
          Returns the renderer background color.
 Font getFont()
          Returns the renderer font.
 Color getForeground()
          Returns the renderer foreground color.
 String getLabel()
          Returns the label being rendered.
 int getStyle()
          Returns the style of the renderer.
 int getThickness()
          Returns the thickness of the renderer shadow or relief.
 void setFont(Font font)
          Sets the renderer font.
 void setGraphic(IlvGraphic graphic)
          Sets the IlvGraphic used to render activities.
 void setLabel(String label)
          Sets the label to be rendered.
 void setStyle(int style)
          Sets the rectangle renderer style.
 void setThickness(int thickness)
          Sets the thickness of the renderer shadow or relief.
 
Methods inherited from class ilog.views.gantt.graphic.renderer.IlvActivityGraphicRenderer
contains, draw, getBottomMargin, getBounds, 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

SHADOW

public static final int SHADOW
The activity will be rendered as a shadow rectangle.

See Also:
setStyle(int), Constant Field Values

RELIEF

public static final int RELIEF
The activity will be rendered as a relief rectangle.

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

IlvBasicActivityBar

public IlvBasicActivityBar()
Creates an IlvBasicActivityBar renderer with the default SHADOW style.

Method Detail

getStyle

public int getStyle()
Returns the style of the renderer. This will be one of the constants: SHADOW or RELIEF.

See Also:
setStyle(int)

setStyle

public void setStyle(int style)
Sets the rectangle renderer style. The style must be one of the following constants: SHADOW or RELIEF.

See Also:
getStyle()

getForeground

public Color getForeground()
Returns the renderer foreground color.

See Also:
IlvActivityGraphicRenderer.setForeground(java.awt.Color)

getBackground

public Color getBackground()
Returns the renderer background color.

See Also:
IlvActivityGraphicRenderer.setBackground(java.awt.Color)

getThickness

public int getThickness()
Returns the thickness of the renderer shadow or relief.

See Also:
setThickness(int)

setThickness

public void setThickness(int thickness)
Sets the thickness of the renderer shadow or relief.

See Also:
getThickness()

getFont

public Font getFont()
Returns the renderer font.

See Also:
setFont(java.awt.Font)

setFont

public void setFont(Font font)
Sets the renderer font.

See Also:
getFont()

getLabel

public String getLabel()
Returns the label being rendered.

See Also:
setLabel(java.lang.String)

setLabel

public void setLabel(String label)
Sets the label to be rendered.

See Also:
getLabel()

setGraphic

public void setGraphic(IlvGraphic graphic)
Sets the IlvGraphic used to render activities. Only IlvShadowLabels and IlvReliefLabels are supported by this class. Any other type of graphic will throw an IllegalArgumentException.

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


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