|
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.AgoViewFormat
Every AgcView and AgcViewDownloadable control is composed of a view format, that is the physical structure of the view's bands and columns, and data. The AgoViewFormat class represents view's physical format. When you define a view using the View designer (AgcViewDownloadable objects), SilverStream constructs the AgoViewFormat for you. When you build a dynamic view (AgcView), you must programmatically construct and manipulate the AgoViewFormat. You can programmatically manipulate the view format of an AgcViewDownloadable control, by first obtaining its AgoViewFormat object and traversing its children. You define a view by defining the columns (using one of the AgoColumnxxxx classes) and bands then appending them to the AgoViewFormat object.
You can use the view format object to obtain information about its component bands. You can also use it to specify or change the overall characteristics of the view. For example, you might specify whether or not the view's caret is visible (setNoCaret()), or whether all of the rows of a hierarchical view are are visible (expanded) when the view is first displayed to the user.
Constructor Summary | |
AgoViewFormat()
AgoViewFormat constructor. |
Method Summary | |
void |
adjustToDisplayDimensions(int displaywidth,
int displayheight)
Adjust the view format to fit the screen dimensions. |
void |
appendBandFormat(AgoBandFormatBase bandformat)
Appends a band format. |
boolean |
getAdjustToDisplayDimensions()
Get the state of the property that specifies that the view should automatically adjust to changes in the display dimensions |
Color |
getBackgroundColor()
Get the Color object which describes the view's background color. |
String |
getBackgroundImageSpec()
Get the name of the file containing the background image specification. |
int |
getBandCount()
Return the number of bands in the view. |
AgoBandFormatBase |
getBandFormat(int bandIndex)
Return the band format specified by the index 0..nBands-1. |
AgoBandFormatBase |
getBandFormat(String bandName)
Return the band format specified by the name. |
Color |
getCaretColor()
Gets caret color. |
AgoBandFormatBase |
getHeaderBandFormat()
Get the header band format. |
boolean |
getHoverCaretChange()
Get the property that specifies whether or not the caret changes when the cursor is just moved over a row without clicking on the row The caret is the rectangle that marks selected items. |
boolean |
getInitiallyExpanded()
Get the property which specifies whether or not the view will be expanded when it is first made visible. |
boolean |
getNoCaret()
Get the value of the property which specifies that the caret is not to be displayed. |
boolean |
getResizable()
Get property which determines whether the view is resizable or not. |
boolean |
getShowInitialSelection()
Get the property which specifies whether a selected item is to be displayed when the view is initialized or not. |
boolean |
getTransparent()
Get the transparent property. |
void |
removeBandFormat(AgoBandFormatBase bandformat)
Removes a band format. |
void |
setAdjustToDisplayDimensions(boolean adjusttodisplaydimensions)
Set the state of the property that specifies that the view should automatically adjust to changes in the display dimensions |
void |
setBackgroundColor(Color backgroundcolor)
Set the background color of the view. |
void |
setBackgroundImageSpec(String backgroundimagespec)
Set the background image specification for the view. |
void |
setCaretColor(Color caretcolor)
Set the color for the caret. |
void |
setHeaderBandFormat(AgoBandFormatBase headerbandformat)
Sets the header band format. |
void |
setHoverCaretChange(boolean hovercaretchange)
Set the property that specifies whether or not the caret changes when the cursor is just moved over a row without clicking on the row The caret is the rectangle that marks selected items. |
void |
setInitiallyExpanded(boolean initiallyexpanded)
Set the property which specifies whether or not the view will be expanded when it is first made visible. |
void |
setNoCaret(boolean nocaret)
Set the value of the property which specifies that the caret is not to be displayed. |
void |
setResizable(boolean resizable)
Sets the resizable property. |
void |
setShowInitialSelection(boolean showinitialselection)
Set the property which specifies whether a selected item is to be displayed when the view is initialized or not. |
void |
setTransparent(boolean transparent)
Set the transparent property. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public AgoViewFormat()
AgoViewFormat vFmt = new AgoViewFormat();
Method Detail |
public void adjustToDisplayDimensions(int displaywidth, int displayheight)
displaywidth
- display width in pixel unitsdisplayheight
- display height in pixel unitsvFmt.adjustToDisplayDimensions(600, 400);
AgoViewFormat.getAdjustToDisplayDimensions()
,
AgoViewFormat.setAdjustToDisplayDimensions(boolean adjusttodisplaydimensions)
public final Color getCaretColor()
Color caretColor = vFmt.getCaretColor();
public void setCaretColor(Color caretcolor)
caretcolor
- as defined in java.awt.Color
vFmt.setcaretColor(Color.blue);
AgoViewFormat.getCaretColor()
public final Color getBackgroundColor()
Color bgColor; bgColor = viewFmt.getBackgroundColor();
AgoViewFormat.setBackgroundColor(Color backgroundcolor)
public void setBackgroundColor(Color backgroundcolor)
backgroundcolor
- as defined in java.awt.Color
The Transparent property must be false for the background color to show.
viewFmt.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); viewFmt.setBackgroundColor(col);
AgoViewFormat.getBackgroundColor()
public final String getBackgroundImageSpec()
String imageFileName = vFmt.getBackgroundImageSpec();
public void setBackgroundImageSpec(String backgroundimagespec)
backgroundimagespec
- the name of the file containing the image specificationAgoViewFormat.getBackgroundImageSpec()
public final boolean getHoverCaretChange()
Returns true if hover change mode is on (the caret changes when the user moves the mouse over the column).
boolean caretWillChange = vFmt.getHoverCaretChange();
public void setHoverCaretChange(boolean hovercaretchange)
hovercaretchange
- if set to true the caret changes when the user moves the mouse over the columnvFmt.setHoverCaretChange(true);
AgoViewFormat.getHoverCaretChange()
public final boolean getNoCaret()
Returns true if the caret is not being displayed.
boolean caretBeingShown = ! vFmt.getNoCaret();
public void setNoCaret(boolean nocaret)
nocaret
- set to true to deactivate the caretvFmt.setNoCaret(false);
AgoViewFormat.getNoCaret()
public final boolean getTransparent()
Returns true if the view is transparent.
boolean isTransparent = vFmt.getTransparent();
AgoViewFormat.setTransparent(boolean transparent)
public void setTransparent(boolean transparent)
transparent
- set to true to make the view transparentvFmt.setTransparent(true);
AgoViewFormat.getTransparent()
public final boolean getShowInitialSelection()
Returns true if a selected item is to be displayed when the view is initialized.
boolean willShowSelection = vFmt.getShowInitialSelection();
AgoViewFormat.setShowInitialSelection(boolean showinitialselection)
public void setShowInitialSelection(boolean showinitialselection)
showinitialselection
- if set to true a selected item is displayed when the view is initializedvFmt.setShowInitialSelection(false);
AgoViewFormat.setShowInitialSelection(boolean showinitialselection)
public final boolean getInitiallyExpanded()
Returns true if the view will be expanded when it is first made visible.
boolean willBeVisible = vFmt.getInitiallyExpanded();
AgoViewFormat.setInitiallyExpanded(boolean initiallyexpanded)
public void setInitiallyExpanded(boolean initiallyexpanded)
initiallyexpanded
- vFmt.setInitiallyExpanded(false);
AgoViewFormat.getInitiallyExpanded()
public final boolean getAdjustToDisplayDimensions()
boolean willAdjust = vFmt.getAdjustToDisplayDimensions();
AgoViewFormat.setAdjustToDisplayDimensions(boolean adjusttodisplaydimensions)
public void setAdjustToDisplayDimensions(boolean adjusttodisplaydimensions)
adjusttodisplaydimensions
- set to true to activate the propertyvFmt.setAdjustToDisplayDimensions(true);
AgoViewFormat.getAdjustToDisplayDimensions()
public final boolean getResizable()
Returns true if view is resizable. This applies to all bands, unless overridden at the band level.
boolean isResizable = vFmt.getResizable();
public void setResizable(boolean resizable)
resizable
- set to true to make the view resizable by the uservFmt.setResizable(true);
AgoViewFormat.getResizable()
public final int getBandCount()
The header band does not count as one of the bands.
int bandCount = vFmt.getBandCount();
public final AgoBandFormatBase getBandFormat(int bandIndex)
bandindex
- the band indexThe header band does not count as one of the bands. To get the header band format, use getHeaderBandFormat
// get the band format from the first band in the view (excluding the header band) AgoBandFormat bFmt = (AgoBandFormat)vFmt.getBandFormat(0);
AgoViewFormat.getHeaderBandFormat()
public final AgoBandFormatBase getBandFormat(String bandName)
bandName
- the name of the bandThe header band does not count as one of the bands. To get the header band format, use getHeaderBandFormat
// get the band format from the band called "CustomerBand" AgoBandFormat bFmt = (AgoBandFormat)vFmt.getBandFormat("CustomerBand");
AgoViewFormat.getHeaderBandFormat()
public void appendBandFormat(AgoBandFormatBase bandformat)
bandformat
- the AgoBandFormat object to be addedAgoBandFormat bFmt = new AgoBandFormat("customerBand"); vFmt.appendBandFormat(bFmt);
public void removeBandFormat(AgoBandFormatBase bandformat)
bandformat
- the band format object to remove// remove the first band format (excluding the header band) AgoBandFormat bFmt = bandFmt.getBandFormat(0); vFmt.removeBandFormat(bFmt);
public AgoBandFormatBase getHeaderBandFormat()
AgoBandFormat hdrBand = (AgoBandFormat)vFmt.getHeaderBandFormat();
AgoViewFormat.getBandFormat(int bandIndex)
,
AgoViewFormat.setHeaderBandFormat(AgoBandFormatBase headerbandformat)
,
AgoBandFormatBase
public void setHeaderBandFormat(AgoBandFormatBase headerbandformat)
headerbandformat
- the AgoBandFormat object specifying the header bandAgoBandFormat bFmt = new AgoBandFormat("Customerheader"); vFmt.setHeaderBandFormat(bFmt);
AgoViewFormat.getHeaderBandFormat()
,
AgoBandFormatBase
|
SilverStream Application Server 3.5 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |