|
JClass DesktopViews 6.3.0 API Documentation |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.klg.jclass.cell.renderers.JCStringCellRenderer
A classic String cell renderer based on the lightweight rendering model. This renderer handles all text rendering. Special features include multi-line detection and clip arrows.
This is the default String cell renderer in JClass.
This renderer does not handle HTML rendering. If you
want HTML rendering for String data, use JCLabelCellRenderer
.
JCLabelCellRenderer
is based on a JLabel
, which handles
HTML rendering.
JCLabelCellRenderer
,
Serialized FormField Summary | |
protected boolean |
drawClipArrowOutline
|
protected com.klg.jclass.cell.Utilities |
utilities
|
Constructor Summary | |
JCStringCellRenderer()
|
Method Summary | |
void |
draw(Graphics gc,
com.klg.jclass.cell.JCCellInfo cellInfo,
Object o,
boolean selected)
Used to draw the cell. |
int |
getAlignedX(int x,
int width,
int textWidth,
int align)
Returns an adjusted X position based on the String width and the horizontal alignment. |
int |
getAlignedY(int y,
int height,
int textHeight,
int align)
Returns an adjusted Y position based on the String height and the vertical alignment. |
int |
getHeight(FontMetrics fm,
String text)
Returns the height required to paint the String. |
Dimension |
getPreferredSize(Graphics gc,
com.klg.jclass.cell.JCCellInfo cellInfo,
Object o)
Used to determine the preferred size of the cell. |
int |
getWidth(FontMetrics fm,
String text)
Returns the width required to paint a multi-line String. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected com.klg.jclass.cell.Utilities utilities
protected boolean drawClipArrowOutline
Constructor Detail |
public JCStringCellRenderer()
Method Detail |
public void draw(Graphics gc, com.klg.jclass.cell.JCCellInfo cellInfo, Object o, boolean selected)
cellInfo.getDrawingArea()
.
draw
in interface JCLightCellRenderer
gc
- graphics context to use for drawingcellInfo
- cell property informationo
- object to be renderedselected
- public int getAlignedX(int x, int width, int textWidth, int align)
align
- textWidth
- width
- x
-
public int getAlignedY(int y, int height, int textHeight, int align)
align
- height
- textHeight
- y
-
public int getHeight(FontMetrics fm, String text)
fm
- text
-
public int getWidth(FontMetrics fm, String text)
fm
- text
-
public Dimension getPreferredSize(Graphics gc, com.klg.jclass.cell.JCCellInfo cellInfo, Object o)
getPreferredSize
in interface JCLightCellRenderer
cellInfo
- cell property informationgc
- o
-
java.awt.Dimension
instance containing preferred height and width.
|
Copyright © 2004 Quest Software Inc.. All rights reserved. |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |