|
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.higrid.CellStyle | +--com.klg.jclass.higrid.CellFormat
The CellFormat class completely describes a given cell displayed within HiGrid. From the CellStyle class, it inherits basic formatting information. It implements the JCCellInfo interface, so that it can render cells in a standard way. It also adds other properties useful for display. Vectors of CellFormat objects are found within the RowFormat class, which themselves are aggregated within the FormatNode class. The sum of all of these classes serve as a design-time template for the run-time rendering of HiGrid.
Field Summary | |
protected Rectangle |
drawingArea
|
protected boolean |
drawingAreaValid
|
protected boolean |
editable
|
protected Class |
editor
|
protected String |
editorName
|
protected int |
height
|
protected static int |
MINIMUM_INITIAL_HEADER_WIDTH
|
protected String |
name
|
protected com.klg.jclass.higrid.RowFormat |
parent
|
protected Rectangle |
preferredTotalArea
|
protected boolean |
preferredTotalAreaValid
|
protected Class |
renderer
|
protected String |
rendererName
|
protected boolean |
rowHeightIsValid
|
protected boolean |
showing
|
protected Comparator |
sortable
|
protected String |
text
|
protected Rectangle |
totalArea
|
protected boolean |
totalAreaValid
|
protected Point |
translationOffset
|
protected boolean |
translationOffsetValid
|
protected int |
type
|
protected int |
width
|
Fields inherited from class com.klg.jclass.higrid.CellStyle |
allowWidthSizing, backgroundColor, borderInsets, borderStyle, clipHints, editHeightPolicy, editWidthPolicy, font, foregroundColor, horizontalAlignment, marginInsets, selectAll, selectedBackgroundColor, selectedForegroundColor, verticalAlignment |
Fields inherited from interface com.klg.jclass.cell.JCCellInfo |
BOTTOM, CENTER, LEFT, RIGHT, SHOW_ALL, SHOW_HORIZONTAL, SHOW_NONE, SHOW_VERTICAL, TOP |
Constructor Summary | |
CellFormat()
Default Constructor. |
|
CellFormat(com.klg.jclass.higrid.CellStyleModel cellStyle)
Constructor. |
Method Summary | |
protected void |
calculateDrawingArea()
|
protected void |
calculatePreferredTotalArea()
|
protected void |
calculateTotalArea()
|
protected void |
calculateTranslationOffset()
|
Class |
getCellEditor()
Retrieves the Cell Editor for this object. |
String |
getCellEditorName()
Retrieves the Cell Editor name for this object. |
Class |
getCellRenderer()
Retrieves the Cell Renderer for this object. |
String |
getCellRendererName()
Retrieves the Cell Renderer name for this object. |
Class |
getDataType()
Retrieves the cell's associated data type. |
Rectangle |
getDrawingArea()
Returns the drawing area for the cell being displayed or edited. |
protected int |
getFontHeight(Component comp,
Font font)
|
protected int |
getFontHeight(FontMetrics fm,
Font font)
|
int |
getHeight()
Retrieves the height of this object. |
String |
getName()
Retrieves the name of this object. |
com.klg.jclass.higrid.CellFormat |
getOtherCellFormat()
Retrieves the cell format of the other header/record pair. |
com.klg.jclass.higrid.RowFormat |
getParent()
Retrieves the parent of this object. |
Rectangle |
getPreferredTotalArea()
Returns the preferred area for the cell being displayed or edited. |
Comparator |
getSortable()
Retrieves the sortable. |
protected int |
getStringWidth(FontMetrics fm,
Font font,
String s)
Accounts for bug in AWT which does not account for italic fonts. |
String |
getText()
Retrieves the text label of this object. |
Rectangle |
getTotalArea()
Returns the total area for the cell being displayed or edited. |
protected Point |
getTranslationOffset()
|
int |
getType()
Retrieves the type of this object. |
int |
getWidth()
Retrieves the width of this object. |
boolean |
isEditable()
Retrieves whether input is allowed for this object. |
boolean |
isEnabled()
Retrieves whether the cell is enabled. |
boolean |
isShowing()
Retrieves whether this object is showing. |
protected void |
rowHeightChanged()
Called by parent RowFormat when its height changes. |
void |
setAllowWidthSizing(boolean allow)
Sets whether width sizing is currently allowed. |
void |
setBorderInsets(Insets insets)
Sets the border insets for this object. |
void |
setCellEditor(Class editor)
Sets the Cell Editor for this object. |
void |
setCellEditorName(String editorName)
Sets the Cell Editor for this object. |
void |
setCellRenderer(Class renderer)
Sets the Cell Renderer for this object. |
void |
setCellRendererName(String rendererName)
Sets the Cell Renderer for this object. |
void |
setDefaultSize(Component comp,
boolean addSortLabel)
Sets the height and width of this cell based on its font and text. |
void |
setEditable(boolean editable)
Sets whether input is currently allowed. |
void |
setFont(FontMetrics fm,
Font font)
Sets the font for this object. |
void |
setHeight(int height)
Sets the height of this object. |
void |
setMarginInsets(Insets insets)
Sets the margin insets for this object. |
void |
setName(String name)
Sets the name of this object. |
void |
setOtherShowing(boolean showing)
Sets whether this object is showing for the other header/record pair. |
protected void |
setOtherWidth(int width)
Sets the width of the other header/record pair. |
void |
setParent(com.klg.jclass.higrid.RowFormat parent)
Sets the parent of this object. |
void |
setShowing(boolean showing)
Sets whether this object is showing. |
void |
setSortable(Comparator sortable)
Sets the sortable. |
void |
setText(String text)
Sets the text label of this object. |
void |
setType(int type)
Sets the type of this object. |
void |
setWidth(int width)
Sets the width of this object. |
void |
setWidth(int width,
boolean checkAllow)
Sets the width of this object. |
protected void |
widthChanged()
Called by parent RowFormat when its width changes. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.klg.jclass.cell.JCCellInfo |
getBackground, getBorderInsets, getBorderStyle, getClipHints, getFont, getForeground, getHorizontalAlignment, getMarginInsets, getSelectAll, getSelectedBackground, getSelectedForeground, getVerticalAlignment |
Field Detail |
protected static final int MINIMUM_INITIAL_HEADER_WIDTH
protected int height
protected int width
protected boolean editable
protected String editorName
protected String rendererName
protected transient Class editor
protected transient Class renderer
protected com.klg.jclass.higrid.RowFormat parent
protected String text
protected String name
protected int type
protected Rectangle drawingArea
protected Rectangle totalArea
protected Rectangle preferredTotalArea
protected Point translationOffset
protected boolean drawingAreaValid
protected boolean totalAreaValid
protected boolean preferredTotalAreaValid
protected boolean translationOffsetValid
protected boolean rowHeightIsValid
protected boolean showing
protected Comparator sortable
Constructor Detail |
public CellFormat()
public CellFormat(com.klg.jclass.higrid.CellStyleModel cellStyle)
cellStyle
- the CellStyle to initialize the CellFormat with.Method Detail |
public boolean isShowing()
public void setShowing(boolean showing)
showing
- Whether object is to be shown.public void setOtherShowing(boolean showing)
showing
- Whether object is to be shown.public void setBorderInsets(Insets insets)
setBorderInsets
in interface CellStyleModel
setBorderInsets
in class CellStyle
public int getHeight()
public void setHeight(int height)
height
- The new height.public int getWidth()
public void setWidth(int width)
width
- The new width.protected void setOtherWidth(int width)
width
- The new width.public void setWidth(int width, boolean checkAllow)
width
- The new width.checkAllow
- True if allowWidthSizing is to be checked.public void setMarginInsets(Insets insets)
setMarginInsets
in interface CellStyleModel
setMarginInsets
in class CellStyle
insets
- The new margin insets.public void setFont(FontMetrics fm, Font font)
font
- The new font.
IllegalArgumentException
- If parameter is null.public void setAllowWidthSizing(boolean allow)
setAllowWidthSizing
in interface CellStyleModel
setAllowWidthSizing
in class CellStyle
allow
- Whether to allow width sizing.public com.klg.jclass.higrid.CellFormat getOtherCellFormat()
public Class getDataType()
getDataType
in interface JCCellInfo
public boolean isEnabled()
isEnabled
in interface JCCellInfo
public boolean isEditable()
isEditable
in interface JCCellInfo
public void setEditable(boolean editable)
public Class getCellEditor()
public void setCellEditor(Class editor)
editor
- The new Cell Editor.public String getCellEditorName()
public void setCellEditorName(String editorName)
public Class getCellRenderer()
public void setCellRenderer(Class renderer)
renderer
- The new Cell Renderer.public String getCellRendererName()
public void setCellRendererName(String rendererName)
public com.klg.jclass.higrid.RowFormat getParent()
public void setParent(com.klg.jclass.higrid.RowFormat parent)
parent
- The new parent.public String getText()
public void setText(String text)
text
- The new text.public String getName()
public void setName(String name)
name
- The new name.public int getType()
public void setType(int type)
type
- The new type.public Comparator getSortable()
com.sun.java.util
class.public void setSortable(Comparator sortable)
sortable
- The new sortable.com.sun.java.util.collections.Comparator
.public Rectangle getDrawingArea()
getDrawingArea
in interface JCCellInfo
public Rectangle getTotalArea()
public Rectangle getPreferredTotalArea()
protected Point getTranslationOffset()
protected int getStringWidth(FontMetrics fm, Font font, String s)
protected int getFontHeight(FontMetrics fm, Font font)
protected int getFontHeight(Component comp, Font font)
public void setDefaultSize(Component comp, boolean addSortLabel)
comp
- Component to get FontMetrics from.addSortLabel
- true if space is to be reserved for the sort icon.protected void rowHeightChanged()
protected void widthChanged()
protected void calculateDrawingArea()
protected void calculateTotalArea()
protected void calculatePreferredTotalArea()
protected void calculateTranslationOffset()
|
Copyright © 2004 Quest Software Inc.. All rights reserved. |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |