|
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
The base class for band formats
Constructor Summary | |
AgoBandFormatBase()
|
Method Summary | |
Color |
getBackgroundColor()
Returns the Color object which describes the band's background color |
String |
getColumnName(int columnIndex)
Returns the text associated with or displayed by this column |
int |
getIndent()
Returns the number of pixels by which this band is indented |
String |
getName()
Returns the name of the band |
boolean |
getTransparent()
Return the band transparency property |
void |
setBackgroundColor(Color backgroundcolor)
Sets the band background color |
boolean |
setColumnName(int columnIndex,
String columnName)
Sets the text value to be displayed in the specified column |
void |
setIndent(int indent)
Set the number of pixels by which this band is to be indented |
void |
setName(String name)
Sets the band name |
void |
setTransparent(boolean transparent)
Sets the band transparency property |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public AgoBandFormatBase()
Method Detail |
public String getName()
This example searches for a band with a specific name
int bandCount = viewFmt.getBandCount(); for (int i = 0; i < bandCount; i++) { AgoBandFormatBase bandFmt = viewFmt.getBandFormat(i); String name = bandFmt.getName(); if (name.equals("CustomerBand")) { // do something useful with the band we've found } }
AgoBandFormatBase.setName(String name)
public void setName(String name)
name
- the name for the bandbandFmt.setName("CustomerBand");
AgoBandFormatBase.getName()
public int getIndent()
int pixelIndent = bandFmt.getIndent();
AgoBandFormatBase.setIndent(int indent)
public void setIndent(int indent)
indent
- the indent margin, in pixelsbandFmt.setIndent(20);
AgoBandFormatBase.getIndent()
public boolean getTransparent()
Returns true if column is transparent
boolean isTransparent = bandFmt.getTransparent();
AgoBandFormatBase.setTransparent(boolean transparent)
public void setTransparent(boolean transparent)
transparent
- set to true to make column transparentNote that if the band is transparent, the background color will not be shown
bandFmt.setTransparent(true);
AgoBandFormatBase.getTransparent()
public final Color getBackgroundColor()
This example illustrates how to obtain the background Color of a band.
Color bgColor; bgColor = bandFmt.getBackgroundColor();
AgoBandFormatBase.setBackgroundColor(Color backgroundcolor)
public void setBackgroundColor(Color backgroundcolor)
backgroundcolor
- the background color, as defined in java.awt.Color
.The Transparent property must be false for the background color to show.
The following example illustrates how to set the background color on a band using one of the Color constants:
bandFmt.setBackgroundColor(Color.white);This example illustrates how to create a new Color and then use it to set the background color:
Color col = new Color(247, 247, 222); bandFmt.setBackgroundColor(col);
AgoBandFormatBase.getBackgroundColor()
public boolean setColumnName(int columnIndex, String columnName)
columnIndex
- the (0-based) index of the column whose name is to be setcolumnName
- the name to use for the text of the columnThe name parameter passed to this method is equivalent to the string passed in to initColumnTextHeader, and is appropriate only if this column is to contain a constant value, which normally means it has to be a column of a header band. It returns true if it is able to set the property -- if this column has not yet been initialized, or has been initialized with initColumnTextHeader(), It returns false if it is not able to set the property -- if this column has been initialized with initColumnTextProperty()
bandFmt.setColumnName(2, "CustomerID");
AgoColumnText.initColumnTextProperty(String propertyName, AgoFontIdentifier fontid, Color textColor, int alignment)
,
AgoColumnText.initColumnTextHeader(String headerText, AgoFontIdentifier fontid, Color textColor, int alignment)
public String getColumnName(int columnIndex)
columnIndex
- the (0-based) index of the column whose name is to be returnedThe name returned by this method is equivalent to the string passed in to initColumnTextHeader, and is available only if this column contains a constant value, which normally means it has to be a column of a header band. It returns the text of the header if it is able to get the name (i.e. if this column has been initialized either with setColumnName or with initColumnTextHeader), and it returns null if it is not able to get the name (i.e. if this column has been initialized with initColumnTextProperty)
String name = bandFmt.getColumnName(2);
AgoColumnText.initColumnTextProperty(String propertyName, AgoFontIdentifier fontid, Color textColor, int alignment)
,
AgoColumnText.initColumnTextHeader(String headerText, AgoFontIdentifier fontid, Color textColor, int alignment)
|
SilverStream Application Server 3.5 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |