|
||||||||||
| 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.IlvActivityGraphicRenderer
ilog.views.gantt.graphic.renderer.IlvBasicActivityLabel
public class IlvBasicActivityLabel
An IlvBasicActivityLabel renders a text label by delegating
to an IlvLabel object. An IlvBasicActivityLabel is
positioned relative to a
main activity renderer. It can be positioned
horizontally or
vertically
using the constants defined in SwingConstants:
LEFT, RIGHT, TOP, BOTTOM,
or CENTER. The default alignment is horizontally
LEFT and vertically CENTER.
The text label 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 text label of the renderer to be dynamically computed from a
property of the activity, you should use the IlvActivityLabel
renderer instead.
| Field Summary |
|---|
| Fields inherited from interface javax.swing.SwingConstants |
|---|
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST |
| Constructor Summary | |
|---|---|
IlvBasicActivityLabel()
Creates an IlvBasicActivityLabel that has no main renderer. |
|
IlvBasicActivityLabel(IlvActivityRenderer main)
Creates an IlvBasicActivityLabel that is positioned relative
to the specified main renderer. |
|
| Method Summary | |
|---|---|
IlvRect |
getBounds(IlvActivityGraphic ag,
IlvTransformer t)
Returns the rectangle in which the activity graphic should be drawn. |
Font |
getFont()
Returns the font of the label. |
Color |
getForeground()
Returns the foreground color of the label. |
int |
getHorizontalAlignment()
Returns the alignment of the label along the X-axis relative to the main activity renderer. |
String |
getLabel()
Returns the label being rendered. |
IlvActivityRenderer |
getMainRenderer()
Returns the label's main activity renderer. |
float |
getOffset()
Returns the horizontal distance between the label and the main renderer. |
int |
getVerticalAlignment()
Returns the alignment of the label along the Y-axis relative to the main activity renderer. |
void |
setFont(Font font)
Sets the font of the label. |
void |
setGraphic(IlvGraphic graphic)
Sets the IlvGraphic used to render activities. |
void |
setHorizontalAlignment(int alignment)
Sets the alignment of the label along the X-axis relative to the main activity renderer. |
void |
setLabel(String label)
Sets the label to be rendered. |
void |
setMainRenderer(IlvActivityRenderer renderer)
Sets the label's main activity renderer. |
void |
setOffset(float offset)
Sets the horizontal distance between the label and the main renderer. |
void |
setVerticalAlignment(int alignment)
Sets the alignment of the label along the Y-axis relative to the main activity renderer. |
| 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 |
| Constructor Detail |
|---|
public IlvBasicActivityLabel()
IlvBasicActivityLabel that has no main renderer.
Use the setMainRenderer(ilog.views.gantt.graphic.renderer.IlvActivityRenderer) method to specify the main renderer.
public IlvBasicActivityLabel(IlvActivityRenderer main)
IlvBasicActivityLabel that is positioned relative
to the specified main renderer.
main - The main renderer.| Method Detail |
|---|
public IlvActivityRenderer getMainRenderer()
setMainRenderer(ilog.views.gantt.graphic.renderer.IlvActivityRenderer)public void setMainRenderer(IlvActivityRenderer renderer)
renderer - The new main activity renderer.getMainRenderer()public Color getForeground()
public Font getFont()
setFont(java.awt.Font)public void setFont(Font font)
font - The new font to render the label.getFont()public int getHorizontalAlignment()
main activity renderer. The default value is
LEFT.
SwingConstants:
LEFT, CENTER, or RIGHT.setHorizontalAlignment(int)public void setHorizontalAlignment(int alignment)
main activity renderer. If the alignment
is set to LEFT, the label will be drawn to the left of the
main renderer. If it is set to RIGHT, the label will be
drawn to the right of the main renderer. If it is set to
CENTER, the label will be centered horizontally across the
main renderer. The default value is LEFT.
alignment - One of the following constants defined in
SwingConstants: LEFT, CENTER, or
RIGHT.getHorizontalAlignment()public int getVerticalAlignment()
main activity renderer. The default value is
CENTER
SwingConstants:
TOP, CENTER, or BOTTOM.setVerticalAlignment(int)public void setVerticalAlignment(int alignment)
main activity renderer. If the alignment
is set to TOP, the top edge of the label will be aligned
with the top of the main renderer. If it is set to BOTTOM,
the bottom edge of the label will be aligned with the bottom of the
main renderer. If it is set to CENTER, the label will be
centered vertically with the main renderer. The default value is
CENTER.
alignment - One of the following constants defined in
SwingConstants: TOP, CENTER, or
BOTTOM.getVerticalAlignment()public float getOffset()
setOffset(float)public void setOffset(float offset)
offset - The new horizontal offset.getOffset()public String getLabel()
setLabel(java.lang.String)public void setLabel(String label)
getLabel()public void setGraphic(IlvGraphic graphic)
IlvGraphic used to render activities. Only
IlvLabels are supported by this class. Any other type of graphic
will throw an IllegalArgumentException.
setGraphic in class IlvActivityGraphicRenderergraphic - The new graphic.IlvActivityGraphicRenderer.getGraphic()
public IlvRect getBounds(IlvActivityGraphic ag,
IlvTransformer t)
getBounds in interface IlvActivityRenderergetBounds in class IlvActivityGraphicRendererag - The activity graphic.t - The transformer.
|
||||||||||
| PREV CLASS Documentation homepage NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||