|
SilverStream Application Server 3.5 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.sssw.rt.tview.AgoBandFormatBase | +--com.sssw.rt.tview.AgoBandFormat
Defines a band (row) format for a Java-based view control. A band format consists of one or more columns appended to it. Columns are displayed in the order in which they are added to the band using appendColumnFormat(). You can create multiple band formats for a single view. You specify that a band format is a header band (after instantiating it) by calling the AgoBandFormatBase.setHeaderBandFormat() method.
Constructor Summary | |
AgoBandFormat(String name)
|
Method Summary | |
void |
adjustToDisplayDimensions(int displaywidth,
int displayheight)
Adjusts the band format to fit the screen dimensions. |
void |
appendColumnFormat(AgoColumnBase columnformat)
Appends a column to the band |
int |
getColumnCount()
Returns the number of columns in the band. |
AgoColumnBase |
getColumnFormat(int column)
Returns the format object for the specified column. |
int |
getColumnSpacer()
Returns the band's inter-column spacing, in pixels. |
int |
getDefaultWidth()
Returns the band's default dispay width, in pixels. |
int |
getFixedRowHeight()
Returns the the row height, in pixels. |
int |
getFontScalePointDelta()
Returns the amount (in points) by which the font size is to be increased (a positive number) or decreased (a negative number) for each level of indent in the hierarchy. |
Object |
getGridIdentifier()
Returns an Object that identifies the group of bands with which this band must align itself. |
int |
getInterRowSpacer()
Returns the inter-row spacing, in pixels |
boolean |
getUseFixedRowHeight()
Returns the property that specifies whether or not rows using this band format have a fixed height |
void |
insertColumnFormat(AgoColumnBase columnformat,
AgoColumnBase insertbefore)
Inserts a column format. |
boolean |
isHierarchical()
Returns a value indicating whether this band has a hierarchical column or not. |
void |
removeColumnFormat(AgoColumnBase columnformat)
Removes a column format. |
void |
setColumnSpacer(int columnspacer)
Sets the inter-column spacing, in pixels. |
void |
setFixedRowHeight(int rowheight)
Sets the row height. |
void |
setFontScalePointDelta(int fontscalepointdelta)
Sets the amount (in points) by which the font size is to be increased (a positive number) or decreased (a negative number) for each level of indent in the hierarchy. |
void |
setGridIdentifier(Object grididentifier)
Sets the Object which identifies the group of bands with which this band must align itself. |
void |
setInterRowSpacer(int interrowspacer)
Sets the inter-row spacing, in pixels. |
void |
setUseFixedRowHeight(boolean fixedrowheight)
Specify whether or not rows in this band are to have a fixed height. |
Methods inherited from class com.sssw.rt.tview.AgoBandFormatBase |
getBackgroundColor,
getColumnName,
getIndent,
getName,
getTransparent,
setBackgroundColor,
setColumnName,
setIndent,
setName,
setTransparent |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public AgoBandFormat(String name)
name
- a string containing the band format nameAgoBandFormat hdrBandFmt = new AgoBandFormat("hdrBandFmt");
Method Detail |
public void adjustToDisplayDimensions(int displaywidth, int displayheight)
displaywidth
- display width, in pixelsdisplayheight
- display height, in pixelsbandFmt.adjustToDisplayDimensions(600, 400);
public int getDefaultWidth()
int width = bandFmt.getDefaultWidth();
public final int getColumnSpacer()
int spacing =bandFmt.getColumnSpacer() * 2;
AgoBandFormat.setColumnSpacer(int columnspacer)
public void setColumnSpacer(int columnspacer)
columnspacer
- the space between columns, in pixelsThe spacer is the number of extra pixels to be placed on each side of the column for spacing. The columns are, in effect, twice the spacer distance apart. If the columns are to be separated by x, x/2 should be specified as the spacer distance. The default value is 2, so columns are 4 pixels apart.
int actualSpace = 6; bandFmt.setColumnSpacer(actualSpace/2);
AgoBandFormat.getColumnSpacer()
public final int getInterRowSpacer()
The spacer is the number of extra pixels to be placed above and below each row. The rows are, in effect, twice the spacer distance apart.
int spacing =bandFmt.getInterRowSpacer() * 2;
AgoBandFormat.setInterRowSpacer(int interrowspacer)
public void setInterRowSpacer(int interrowspacer)
interrowspacer
- space between rows, in pixelsThe spacer is the number of extra pixels to be placed above and below each row. The rows are, in effect, twice the spacer distance apart. If the rows are to be separated by x, x/2 should be specified as the spacer distance. The default value is 2, so rows are 4 pixels apart.
int actualSpace = 6; bandFmt.setInterRowSpacer(actualSpace/2);
AgoBandFormat.getInterRowSpacer()
public final int getFontScalePointDelta()
int delta; delta = bandFmt.getFontScalePointDelta();
AgoBandFormat.setFontScalePointDelta(int fontscalepointdelta)
public void setFontScalePointDelta(int fontscalepointdelta)
fontscalepointdelta
- the amount (in points) by which the font size is to be
increased or decreased for each indent level.// specify that the font size decreases by 2 points for each indent level bandFmt.setFontScalePointDelta(-2);
AgoBandFormat.getFontScalePointDelta()
public final Object getGridIdentifier()
The grid group identifier object may be any object - an Integer, a String, or any other class. Its sole purpose is to identify members of a group of bands which must be kept in alignment. Normally this group will consist only of a header band and a data band, but depending on the application, more bands may be included.
// make sure the header band and the data band line up Object grid = hdrBandFmt.getGridIdentifier(); if (grid == null) { grid = new String("customerGrid"); hdrBandFmt.setGridIdentifier(grid); } bandFmt.setGridIdentifier(grid);
AgoBandFormat.setGridIdentifier(Object grididentifier)
public void setGridIdentifier(Object grididentifier)
grididentifier
- Object identifying the group of bands which must be aligned with each otherThe grid group identifier object may be any object - an Integer, a String, or any other class. Its sole purpose is to identify members of a group of bands which must be kept in alignment. Normally this group will consist only of a header band and a data band, but depending on the application, more bands may be included
Integer grid = new Integer(99); hdrBandFmt.setGridIdentifier(grid); bandFmt.setGridIdentifier(grid);
AgoBandFormat.getGridIdentifier()
public final boolean getUseFixedRowHeight()
Returns true if rows have a fixed height. Otherwise, row height is set dynamically to the height of the tallest cell in the row.
int height; // find out the fixed row height, if we are using one if (bandFmt.getUseFixedRowHeight()) height = bandFmt.getFixedRowHeight(); else height = -1; // indicate that height is variable
AgoBandFormat.setUseFixedRowHeight(boolean fixedrowheight)
,
AgoBandFormat.getFixedRowHeight()
,
AgoBandFormat.adjustToDisplayDimensions(int displaywidth, int displayheight)
public void setUseFixedRowHeight(boolean fixedrowheight)
fixedrowheight
- True means rows in this band are to have a fixed height.
Otherwise, row height is set to the height of the tallest cell in the row.// specify that we are using fixed row height bandFmt.setUseFixedRowHeight(true); // and specify the height bandFmt.setFixedRowHeight(35);
AgoBandFormat.getFixedRowHeight()
,
AgoBandFormat.setFixedRowHeight(int rowheight)
,
AgoBandFormat.adjustToDisplayDimensions(int displaywidth, int displayheight)
public final int getFixedRowHeight()
This value is relevant only if the row height has been specified as fixed using setFixedRowHeight().
int height; // find out the fixed row height, if we are using one if (bandFmt.getUseFixedRowHeight()) height = bandFmt.getFixedRowHeight(); else height = -1; // indicate that height is variable
AgoBandFormat.setFixedRowHeight(int rowheight)
,
AgoBandFormat.setUseFixedRowHeight(boolean fixedrowheight)
public void setFixedRowHeight(int rowheight)
rowheight
- the fixed row height, in pixelsThis value is relevant only if the row height has been specified as fixed using setFixedRowHeight()
// specify that we are using fixed row height bandFmt.setUseFixedRowHeight(true); // and specify the height bandFmt.setFixedRowHeight(35);
AgoBandFormat.getFixedRowHeight()
,
AgoBandFormat.setUseFixedRowHeight(boolean fixedrowheight)
public final int getColumnCount()
int colCount = bandFmt.getColumnCount();
public final AgoColumnBase getColumnFormat(int column)
column
- the (0-based) integer index of a columnThis example searches for text columns and does something to them
AgoColumnBase colFmt = null; int colCount = bandFmt.getColumnCount(); for (int i = 0; i < colCount; i++) { colFmt = bandFmt.getColumnFormat(i); if (colFmt instanceof AgoColumnText) { // do something useful with the column } }
AgoBandFormat.appendColumnFormat(AgoColumnBase columnformat)
public void appendColumnFormat(AgoColumnBase columnformat)
columnformat
- the column object to appendAgoColumnText colFmt = new AgoColumnText(); bandFmt.appendColumnFormat(colFmt);
AgoBandFormat.getColumnFormat(int column)
,
AgoBandFormat.insertColumnFormat(AgoColumnBase columnformat, AgoColumnBase insertbefore)
,
AgoColumnBase
public void insertColumnFormat(AgoColumnBase columnformat, AgoColumnBase insertbefore)
columnformat
- the column object to insertinsertbefore
- inserts the object before this AgoColumnBase object.
If this parameter is null, the specified column is appended at the end.// insert a column before column three AgoColumnBase prevColFmt = bandFmt.getColumnFormat(2); AgoColumnText colFmt = new AgoColumnText(); bandFmt.insertColumnFormat(colFmt, prevColFmt);
AgoBandFormat.appendColumnFormat(AgoColumnBase columnformat)
,
AgoBandFormat.getColumnFormat(int column)
public void removeColumnFormat(AgoColumnBase columnformat)
columnformat
- the column object to remove// remove column three AgoColumnBase colFmt = bandFmt.getColumnFormat(2); bandFmt.removeColumnFormat(colFmt);
public final boolean isHierarchical()
|
SilverStream Application Server 3.5 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |