public abstract class IltShelfBaseRenderer extends IltShelfItemContainerBaseRenderer
IltShelf| Modifier and Type | Class and Description |
|---|---|
static class |
IltShelfBaseRenderer.Standard
The base renderer for the standard shelf representation.
|
| Modifier | Constructor and Description |
|---|---|
protected |
IltShelfBaseRenderer()
Default constructor
|
protected |
IltShelfBaseRenderer(ilog.tgo.graphic.renderer.internal.IltBaseRendererState state)
Used for compatibility with previous drawers.
|
| Modifier and Type | Method and Description |
|---|---|
protected IlvRect |
boundingBoxWithTransformer(IlvTransformer t,
IlvRect rect,
boolean withSelection)
Computes the shelf bounding box taking the given transfomer
into account.
|
protected ilog.tgo.graphic.renderer.internal.IltBaseRendererState |
createBaseRendererState()
Resets the properties
|
void |
draw(Graphics g,
IlvTransformer t,
IlvRect rect)
Draws the entire base, such that it fits into a given rectangle.
|
void |
drawSlotNumbers(Graphics g,
IlvTransformer t,
IlvRect drawRect)
Draws the slot numbers in the bounding box of the slot numbers.
|
Color |
getFrameForeground()
Returns the color of the shelf frame.
|
protected Ilt2DPalette |
getFramePalette()
Returns the palette of the shelf frame.
|
Font |
getLabelFont()
Returns the font of the slot numbers.
|
Color |
getLabelForeground()
Returns the color of the slot numbers.
|
int |
getLabelPosition()
Returns the label position relative to the base.
|
int |
getLabelSpacing()
Returns the height of the space separating displayed logical numbers
from the shelf outline.
|
IlvRect |
getSlotNumbersBBox(IlvTransformer t,
IlvRect drawRect)
Returns the bounding box of the area where the slot numbers should be
drawn.
|
IlvRect |
getSlotRect(int slotXIndex,
double slotXSpan,
int slotYIndex,
double slotYSpan,
IlvRect drawRect)
Returns the rectangle where the shelf item at the given slot position
(defined by
slotXIndex and slotYIndex indexes)
should be drawn. |
IlvRect |
getSlotsBBox(IlvRect drawRect)
Returns the bounding box of all the slots in this shelf item container.
|
int |
getXSlotIndex()
Returns the value of the first slot number for the numbers that will be
displayed either below or above the shelf frame.
|
String |
getXSlotLabel(int index)
Returns the label that represents the given slot.
|
String[] |
getXSlotLabels()
Returns the value of the slot labels that will be
displayed either below or above the shelf frame.
|
protected boolean |
isExtraBorderOutside()
Specifies whether the extra borders should be drawn inside or outside
the
rect used to call drawExtraBorders. |
boolean |
isLabelAntialiasing()
Returns if the slot numbers label uses anti-aliasing.
|
boolean |
isLabelVisible()
Returns if the slot numbers are visible.
|
void |
setFrameForeground(Color c)
Sets the color of the shelf frame.
|
void |
setLabelAntialiasing(boolean v)
Sets if the slot numbers label uses anti-aliasing.
|
void |
setLabelFont(Font f)
Sets the font of the slot numbers.
|
void |
setLabelForeground(Color c)
Sets the color of the slot numbers.
|
void |
setLabelPosition(int v)
Sets the label position relative to the base.
|
void |
setLabelSpacing(int v)
Returns the height of the space separating displayed logical numbers
from the shelf outline.
|
void |
setLabelVisible(boolean v)
Sets if the slot numbers are visible.
|
void |
setXSlotIndex(int x)
Sets the value of the first slot number for the numbers that will be
displayed either below or above the shelf frame.
|
void |
setXSlotLabels(String[] labels)
Sets the value of slot labels that will be displayed
either below or above the shelf frame.
|
getDirection, getItem, getItem, getItemSpan, getSlotArray, getSlotBorderWidth, getSlotCount, getSlotCountX, getSlotCountY, getSlotRect, getSlotRect, getSlotRect, getSlotSepSize, getSlotSizes, getSlotSpanX, getSlotSpanY, isVertical, setDirection, setSlotArray, setSlotSizes__isDottedBorderVisible, attach, boundingBox, contains, containsExtraBorders, containsMain, drawAlarmBorder, drawExtraBorder, drawExtraBorder, drawExtraBorders, drawMain, drawSelectionBorder, dropResources, getAlarmBorderColor, getAlarmBorderWidth, getAlarmColorLevel, getBackground, getBaseRenderer, getBaseRendererState, getBorderColor, getBorderColor2, getBorderLineStyle, getBorderPalette, getBorderPattern, getBorderWidth, getBrightPalette, getDarkPalette, getDeprecatedBlinkingMode, getDetailLevel, getDottedBorderBackground, getDottedBorderForeground, getDottedBorderLineStyle, getDottedBorderPalette, getExtraBorders, getFillAngle, getFillEnd, getFillStart, getFillStyle, getFillTexture, getForeground, getPalette, getPattern, getRepresentationObject, getSelectionBorderBackground, getSelectionBorderForeground, getSelectionBorderLineStyle, getSelectionBorderWidth, getSourceImage, getView, initBaseRenderer, initResources, isAlarmBorderVisible, isAlarmColorVisible, isBaseSelectionBorderVisible, isDottedBorderVisible, isPolygonalBorder, isReliefBorders, isUsingBlinkingResources, setAlarmBorderColor, setAlarmBorderVisible, setAlarmBorderWidth, setAlarmColorLevel, setAlarmColorVisible, setBackground, setBaseRendererState, setBaseSelectionBorderVisible, setBorderColor, setBorderColor2, setBorderLineStyle, setBorderPattern, setBorderWidth, setDeprecatedBlinkingMode, setDetailLevel, setDottedBorderBackground, setDottedBorderForeground, setDottedBorderLineStyle, setDottedBorderVisible, setFillAngle, setFillEnd, setFillStart, setFillStyle, setFillTexture, setForeground, setPattern, setPolygonalBorder, setReliefBorders, setRepresentationObject, setSelectionBorderBackground, setSelectionBorderForeground, setSelectionBorderLineStyle, setSelectionBorderWidth, setSourceImage, setViewprotected IltShelfBaseRenderer()
protected IltShelfBaseRenderer(ilog.tgo.graphic.renderer.internal.IltBaseRendererState state)
protected ilog.tgo.graphic.renderer.internal.IltBaseRendererState createBaseRendererState()
createBaseRendererState in class IltShelfItemContainerBaseRendererpublic Color getFrameForeground()
public void setFrameForeground(Color c)
public boolean isLabelVisible()
public void setLabelVisible(boolean v)
public final boolean isLabelAntialiasing()
public final void setLabelAntialiasing(boolean v)
public Font getLabelFont()
public void setLabelFont(Font f)
public Color getLabelForeground()
public void setLabelForeground(Color c)
public int getLabelSpacing()
public void setLabelSpacing(int v)
public int getLabelPosition()
Possible values are:
IlvDirection.Top
IlvDirection.Bottom
public void setLabelPosition(int v)
Possible values are:
IlvDirection.Top
IlvDirection.Bottom
public int getXSlotIndex()
public void setXSlotIndex(int x)
public String[] getXSlotLabels()
XSlotLabels
or null if nothing was defined in CSS.getXSlotLabel(int)public void setXSlotLabels(String[] labels)
labels - Slot label array.getXSlotLabel(int)public String getXSlotLabel(int index)
This method executes the following steps to compute the slot label:
slotLabels
is defined. If this property is defined, this method
retrieves the label that corresponds to the given slot, if
there is one. If a label is not found, this method returns
an empty label.
slotLabels property is not defined,
this method will compute a slot label based on
the slot index parameter and the value of X Slot index property
defined in this base renderer.
In case of horizontal shelves, the slot label should not exceed the width of the slot. Whenever this happens, the label is automatically truncated by this base renderer. In order to have a better graphic representation, the use of short labels is recommended.
index - Slot index.setXSlotIndex(int),
setXSlotLabels(java.lang.String[])protected Ilt2DPalette getFramePalette()
The value depends on the semantic state of the object. This palette is automatically built depending on CSS properties.
See the description array at the beginning of this file, for more information on the policy used to build this palette.
protected boolean isExtraBorderOutside()
rect used to call drawExtraBorders.
This implementation returns true as the borders should be
drawn outside rectfor shelves.
isExtraBorderOutside in class IltBaseRendererpublic IlvRect getSlotsBBox(IlvRect drawRect)
This implementation returns drawRect reduced by the
outline thickness of the shelf.
getSlotsBBox in class IltShelfItemContainerBaseRendererdrawRect - As in draw.IltObject.BorderWidthpublic IlvRect getSlotRect(int slotXIndex, double slotXSpan, int slotYIndex, double slotYSpan, IlvRect drawRect)
slotXIndex and slotYIndex indexes)
should be drawn.getSlotRect in class IltShelfItemContainerBaseRendererslotXIndex - The x index coordinate of the slot for
which the drawing rectangle will be computed.slotXSpan - The span of the slot along the x axis.slotYIndex - The y index coordinate of the slot for
which the drawing rectangle will be computed.slotYSpan - The span of the slot along the y axis.drawRect - The drawing rectangle of the shelf item container.IlvRect with integer coordinatespublic IlvRect getSlotNumbersBBox(IlvTransformer t, IlvRect drawRect)
t - Transformer applied to the slot numbers.drawRect - As in draw.public void drawSlotNumbers(Graphics g, IlvTransformer t, IlvRect drawRect)
g - As in draw.t - As in draw.drawRect - As in draw.public void draw(Graphics g, IlvTransformer t, IlvRect rect)
draw in class IltBaseRendererg - The graphics context to draw into.t - The transformer that has been applied to rect.
(It is only passed because drawing with an
Ilt2DPalette requires it.)rect - The rectangle to draw into. This is a rectangle with
integer coordinates. Its corners have the following
coordinates:
x1 = rect.x,
x2 = rect.x + rect.width - 1,
y1 = rect.y,
y2 = rect.y + rect.height - 1.
This implementation of the function calls drawMain, then
drawExtraBorders, and finally drawSlotNumbers.
protected IlvRect boundingBoxWithTransformer(IlvTransformer t, IlvRect rect, boolean withSelection)
boundingBoxWithTransformer in class IltBaseRenderert - Transformer currently set in the view.rect - Rectangle with the raw value.withSelection - Indicates if bounding box will include
selection border or not.© Copyright Rogue Wave Software, Inc. 1997, 2017. All Rights Reserved.