|
SilverStream Application Server 3.5 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.Component | +--java.awt.Container | +--javax.swing.JComponent | +--javax.swing.JPanel | +--com.sssw.rt.atlas.AtPanel | +--com.sssw.rt.form.PvBasePanel | +--com.sssw.rt.form.PvBaseContainer | +--com.sssw.rt.form.AgcTabControl
A container control that organizes the components of complex applications. The Tab Panel can contain any of the SilverStream controls.
Inner classes inherited from class javax.swing.JPanel |
JPanel.AccessibleJPanel |
Inner classes inherited from class javax.swing.JComponent |
JComponent.AccessibleJComponent |
Fields inherited from class com.sssw.rt.atlas.AtPanel |
BGIMAGE_DRAW_CENTERED,
BGIMAGE_DRAW_NORMAL,
BGIMAGE_DRAW_STRETCH,
BGIMAGE_DRAW_TILED |
Fields inherited from class javax.swing.JComponent |
accessibleContext,
listenerList,
TOOL_TIP_TEXT_KEY,
ui,
UNDEFINED_CONDITION,
WHEN_ANCESTOR_OF_FOCUSED_COMPONENT,
WHEN_FOCUSED,
WHEN_IN_FOCUSED_WINDOW |
Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT,
CENTER_ALIGNMENT,
LEFT_ALIGNMENT,
RIGHT_ALIGNMENT,
TOP_ALIGNMENT |
Constructor Summary | |
AgcTabControl()
|
Method Summary | |
void |
addControl(int pane,
Component control)
Get/set control information. |
void |
addControl(int pane,
Component control,
Object constraints)
|
void |
addControlAt(int pane,
Component control,
int pos)
|
void |
addControlAt(int pane,
Component control,
int pos,
Object constraints)
|
void |
addPane(String name)
Adds a pane to the Tab Panel control. |
void |
addPane(String name,
Image image)
Adds a pane with an image to the Tab Panel control. |
Component |
getControl(int pane,
int control)
|
int |
getControlCount(int pane)
|
int |
getCurrentPane()
Returns the index of the currently active pane. |
Color |
getDarkShadowColor()
Returns the Color object associated with the control's dark shadow property. |
AgoFontIdentifier |
getFontIdentifier()
Returns the SilverStream font object (AgoFontIdentifier) for the control's text. |
Color |
getHighlightColor()
Returns the Color object displayed as the highlight effect on the control. |
Color |
getInactiveTabColor()
Returns the Color object displayed for inactive panes. |
int |
getPaneCount()
Returns the number of panes that comprise a Tab Panel control. |
Image |
getPaneImage(int pane)
Returns the image associated with the specified pane. |
String |
getPaneName(int pane)
Returns the text displayed in the tab of a pane. |
Color |
getShadowColor()
Returns the Color object associated with the control's shadow Color. |
int |
getTabHeight()
Get the height of a tab (depends on the font) |
void |
removeControl(int pane,
Component control)
|
void |
removePane(int pane)
Removes a specific pane from the Tab Panel control. |
void |
setBackgroundColor(Color color)
Assigns the control's background Color. |
void |
setColors(Color backgroundColor,
Color highlightColor,
Color shadowColor,
Color darkShadowColor,
Color inactiveTabColor)
Set the shading colors. |
void |
setCurrentPane(int pane)
Assigns a pane as the currently active pane. |
void |
setDarkShadowColor(Color color)
Assigns the Color object associated with the control's dark shadow Color. |
void |
setFontIdentifier(AgoFontIdentifier font)
Assigns the SilverStream font object (AgoFontIdentifier)for the text on the tab labels. |
void |
setHighlightColor(Color color)
Assigns the Color object to display as the highlight effect on the control. |
void |
setInactiveTabColor(Color color)
Assigns the Color object displayed for inactive panes. |
void |
setPaneCount(int n,
String prefix)
Creates a specified number of panes for a Tab control. |
void |
setPaneImage(int pane,
Image image)
Assigns the specified image to the specified pane. |
void |
setPaneName(int pane,
String name)
Assigns the text displayed in the tab of a pane. |
void |
setShadowColor(Color color)
Assigns the Color object associated with the control's shadow Color. |
Methods inherited from class com.sssw.rt.form.PvBaseContainer |
acceptValues,
addControl,
addControlAt,
getControl,
getControlCount,
getUserDefinedTabOrder,
removeControl,
setTabOrder,
setUserDefinedTabOrder |
Methods inherited from class com.sssw.rt.form.PvBasePanel |
getBackgroundColor |
Methods inherited from class com.sssw.rt.atlas.AtPanel |
addImpl,
addNotify,
clientPaint,
clientPaint,
deliverMouseEvent,
deliverMouseMoveEvent,
doAtCommand,
drawTiledImage,
enableAtCommands,
getBackgroundImage,
getBackgroundImageMode,
getHelper,
getTransparent,
hide,
hideToolTip,
imageUpdate,
isFocusTraversable,
isOptimizedDrawingEnabled,
ownedImage,
paintBorder,
paintComponent,
paintImmediately,
paintImmediately,
paintNow,
preprocessKeyEvent,
processEvent,
reshape,
setBackgroundImage,
setBackgroundImageMode,
setTransparent,
show,
showToolTip |
Methods inherited from class javax.swing.JPanel |
getAccessibleContext,
getUIClassID,
paramString,
updateUI |
Methods inherited from class java.awt.Container |
add,
add,
add,
add,
add,
addContainerListener,
countComponents,
deliverEvent,
doLayout,
findComponentAt,
findComponentAt,
getComponent,
getComponentAt,
getComponentAt,
getComponentCount,
getComponents,
getLayout,
insets,
invalidate,
isAncestorOf,
layout,
list,
list,
locate,
minimumSize,
paintComponents,
preferredSize,
printComponents,
processContainerEvent,
remove,
remove,
removeAll,
removeContainerListener,
setCursor,
setLayout,
validate,
validateTree |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Methods implemented from interface com.sssw.rt.form.AgiControl |
getComponent,
getHelpInfo,
setHelpInfo |
Methods implemented from interface com.sssw.rt.util.AgiTabstopHandler |
getTabOrder |
Methods implemented from interface com.sssw.rt.event.AgiValueChangingListener |
valueChanging |
Methods implemented from interface java.awt.event.MouseListener |
mouseClicked,
mouseEntered,
mouseExited,
mousePressed,
mouseReleased |
Methods implemented from interface java.awt.event.MouseMotionListener |
mouseDragged,
mouseMoved |
Constructor Detail |
public AgcTabControl()
Method Detail |
public void addPane(String name, Image image)
name
- specifies the text displayed on the tab of the paneimage
- specifies the image to display on the tab of the paneNew panes are added to the end of the tab control.
The following code fragment illustrates how to add a pane with the text "database" and the "newdatabase.gif" image. The image is located in the same database as the form.
Image img; img = getImage("newdatabase.gif"); TabControl1.addPane("Database",img);
public void addPane(String name)
name
- specifies the text displayed on the tab of the paneNew panes are added to the end of the tab control.
The following code fragment illustrates how to add a pane with the text "Database".
TabControl1.addPane("Database");
public void removePane(int pane)
pane
- specifies the index of the pane to removeThe Tab Control is zero-based so the index of the first pane is zero.
The following code fragment illustrates how to remove the fourth pane of a Tab control.
TabControl1.removePane(3);
public int getPaneCount()
The number of panes can be specified at runtime using the AgcTabControl.setPaneCount(int, String)
method
or at design time using the Pane property.
The following code fragment illustrates how to obtain the number of panes.
int paneCount; paneCount = TabControl1.getPaneCount();
public void setPaneCount(int n, String prefix)
count
- specifies the total number of panes for the controlnamePrefix
- specifies a text string to add to the tab of any new panes that are createdThe text is added to the tab of the new panes along with an integer that indicates the index of the pane. If the number of panes decreases, this parameter is not used.
The following code fragment illustrates how to create a Tab control with four panes with each pane containing the text "newPane" followed by an integer that represents the index of the pane.
TabControl1.setPaneCount(3,"newPane");
AgcTabControl.addPane(String)
,
AgcTabControl.addPane(String, Image)
,
AgcTabControl.getPaneCount()
,
AgcTabControl.removePane(int)
public String getPaneName(int pane)
pane
- specifies the pane whose text or name is to be obtained
The Tab Control is zero-based so the index for the first pane is zero.
This value can be set at design time using the Pane Name property, or assigned or changed
at runtime using the AgcTabControl.setPaneName(int, String)
method.
The following code fragment illustrates how to obtain the text displayed for the pane whose index is three.
String name; name = TabControl1.getPaneName(3);
public void setPaneName(int pane, String name)
paneIndex
- specifies the index of the pane whose name is to be setname
- specifies the text to display on the tab of the specified paneThe Tab Control is zero-based so the index of the first pane is zero. This value can be established at design time using the Pane Name property.
The following code fragment illustrates how to assign the text "New Database" to the fourth tab.
TabControl1.setPaneName(3,"New Database");
AgcTabControl.getPaneName(int)
public Image getPaneImage(int pane)
pane
- specifies the pane whose image is to be obtainedThe Tab Control is zero-based so the index for the first pane is zero. This value can be set at runtime using the @link #setPaneImage(int, Image)} method.
The following code fragment illustrates how to obtain the image currently assigned to the fourth pane.
Image img; img = TabControl1.getPaneImage(3);
public void setPaneImage(int pane, Image image)
paneIndex
- specifies the paneimage
- specifies the imageThe Tab Control is zero-based so the index for the first pane is zero.
The following code fragment illustrates how to assign an image to a pane in a tab control.
This example first obtains the image using the getImage()
method, then assigns it with setPaneImage()
.
Image img; img = getImage("newdatabase.gif"); TabControl1.setPaneImage(3,img);
AgcTabControl.getPaneImage(int)
public int getTabHeight()
public void addControl(int pane, Component control)
You may need to call the awt method validate() after calling addControl() in order to make the controls redraw correctly. Specifically, if you programmatically add a subform containing a tab control on which there are other controls, say, buttons. The tab control shows up but the buttons don't until you call validate() - or resize the designer, which has the same effect.
Container.validate()
public void addControl(int pane, Component control, Object constraints)
public void addControlAt(int pane, Component control, int pos)
public void addControlAt(int pane, Component control, int pos, Object constraints)
public void removeControl(int pane, Component control)
public Component getControl(int pane, int control)
public int getControlCount(int pane)
public void setCurrentPane(int pane)
paneIndex
- specifies the pane to assign as currentThe Tab Control is zero-based so the index for the first pane is zero.
The following code fragment illustrates how to make the fourth pane active.
TabControl1.setCurrentPane(3);
AgcTabControl.getCurrentPane()
public int getCurrentPane()
The Tab control is zero-based so the index for the first pane is zero.
The following code fragment illustrates how to use the getCurrentPane()
method.
int currentPane; currentPane = TabControl1.getCurrentPane();
AgcTabControl.setCurrentPane(int)
public void setFontIdentifier(AgoFontIdentifier font)
fontID
- specifies the AgoFontIdentifier object that assigns the font for the controlThe AgoFontIdentifier object consists of three parts: a Font Name, a Font Style and a Font Size. The Font Name can be one of these values: Dialog, SansSerif, Serif, Monospaced, Helvetica, TimesRoman, Courier, DialogInput, Zapfdingbats. At runtime, Java translates this value to the appropriate font installed on the system.
The Font Size can be any integer.
The Font Style can be one of these values:
This code fragment illustrates how to construct a new AgoFontIdentifier object (called newFont) and how to call
the setFontIdentifier()
method:
AgoFontIdentifier newFont; String newName; int newSize; int newStyle; newName="TimesRoman"; newSize=20; newStyle=AgoFontIdentifier.ITALIC; newFont=new AgoFontIdentifier(newName, newStyle, newSize); TabControl1.setFontIdentifier(newFont);
AgcTabControl.getFontIdentifier()
,
Font Name property,
Font Size property,
Font Style propertypublic AgoFontIdentifier getFontIdentifier()
The AgoFontIdentifier object consists of three parts: a Font Name, a Font Style and a Font Size. The Font Style can be one of these values:
The Font Name can be one of these values:Dialog, SansSerif, Serif, Monospaced, Helvetica, TimesRoman, Courier, DialogInput, Zapfdingbats.
At runtime, Java translates this value to the appropriate font installed on the system.
The Font Size can be any integer.
The following code fragment illustrates how to construct a new AgoFontIdentifier object (called newFont)
and how to call the getFontIdentifier()
method:
AgoFontIdentifier font; font = TabControl1.getFontIdentifier();
AgcTabControl.setFontIdentifier(AgoFontIdentifier)
,
Font Name property,
Font Size property,
Font Style propertypublic void setColors(Color backgroundColor, Color highlightColor, Color shadowColor, Color darkShadowColor, Color inactiveTabColor)
backgroundColor
- highlightColor
- shadowColor
- darkShadowColor
- inactiveTabColor
- public void setBackgroundColor(Color color)
bgColor
- the instance of a java.awt.Color object or one of the Color constants, for example, Color.redFor controls that support it, the Transparent property must be false for the background Color to show.
The following example illustrates how to set the background Color on a control using one of the Color constants:
TabControl1.setBackgroundColor(Color.white);This example illustrates how to create a new Color and then use it to set the background Color:
Color colLabelColor = new Color(247, 247, 222); TabControl1.setBackgroundColor(colLabelColor);
public void setHighlightColor(Color color)
color
- specifies the instance of a java.awt.Color object or one of the Color constants, for example, Color.redThe following example illustrates how to set the highlight Color to red using the Java Color constant.
TabControl1.setHighlightColor(Color.red);
AgcTabControl.getHighlightColor()
public void setShadowColor(Color color)
color
- specifies the instance of a java.awt.Color object
or one of the Color constants, for example, Color.redThis example illustrates how to set the Shadow Color to red using the Java Color constant.
TabControl1.setShadowColor(Color.red);
AgcTabControl.getShadowColor()
public void setDarkShadowColor(Color color)
color
- specifies the instance of a java.awt.Color object.
or one of the Color constants, for example, Color.red.This example illustrates how to set the Dark Shadow to red using the Java Color constant.
TabControl1.setDarkShadowColor(Color.red);
AgcTabControl.getDarkShadowColor()
public void setInactiveTabColor(Color color)
color
- specifies the instance of a java.awt.Color object.
or one of the Color constants, for example, Color.redThis example illustrates how to set the Inactive Tab Color to red using the Java Color constant.
TabControl1.setInactiveTabColor(Color.red);
AgcTabControl.getInactiveTabColor()
public Color getHighlightColor()
The following example illustrates how to obtain the current Highlight Color.
Color c; c = TabControl1.getHighlightColor();
AgcTabControl.setHighlightColor(Color)
public Color getShadowColor()
This example illustrates how to obtain the current Shadow Color.
Color c; c = TabControl1.getShadowColor();
AgcTabControl.setShadowColor(Color)
public Color getDarkShadowColor()
This value can be set at design time with the Dark Shadow property, or at runtime using the setDarkShadowColor() method.
This example illustrates how to obtain the current Dark Shadow Color.
Color c; c = TabControl1.getDarkShadowColor();
AgcTabControl.setDarkShadowColor(Color)
public Color getInactiveTabColor()
The following example illustrates how to obtain the current Inactive Tab Color.
Color c; c = TabControl1.getInactiveTabColor();
AgcTabControl.setInactiveTabColor(Color)
|
SilverStream Application Server 3.5 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |