SilverStream
Application Server 3.5

com.sssw.rt.form
Class AgcRectangle

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.AgcRectangle
All Implemented Interfaces:
Accessible, AgiControl, AgiHelpInfo, ImageObserver, MenuContainer, Serializable

public class AgcRectangle
extends PvBasePanel

The AgcRectangle control (Rectangle) provides a way to visually organize or group other controls on a form. It may be used to group Radio Buttons, database navigation buttons, or other related controls or images. Rectangles are display-only. Note that Non-SilverStream controls may not participate in the SilverStream transparency scheme. For this reason, it is recommented that all rectangle controls be place behind othercontrols so they do not occlude them.

Properties:
Border Style, Caption Text, Color, Control Type, Enabled, Font Name, Font Size, Font Style, Height, Left, Name, Text Color, Tool Tip, Top, Transparent, Visible, Width
Events:
mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased
See Also:
Serialized Form

Inner classes inherited from class javax.swing.JPanel
JPanel.AccessibleJPanel
 
Inner classes inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
 
Field Summary
static int BORDER_GROOVED
          Draw a grooved border.
static int BORDER_LOWERED
          Draw a lowered border.
static int BORDER_NONE
          No border is displayed.
static int BORDER_OUTLINE
          Draw a one-pixel border.
static int BORDER_RAISED
          Draw a raised border.
 
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
AgcRectangle()
           
 
Method Summary
 int getBorderStyle()
          Returns the control's border style.
 Color getColor()
          Returns the control's fill Color.
 Color getForeground()
          Returns the Color of the control's text.
 String getText()
          Get the label text of the rectangle.
 Color getTextColor()
          Deprecated. use AgcRectangle.getForeground()
 void setBackground(Color color)
          Assigns an instance of the java.awt.Color to the control's background.
 void setBorderStyle(int style)
          Assigns a style for the control's border.
 void setColor(Color color)
          Assigns the control's fill Color.
 void setFontIdentifier(AgoFontIdentifier font)
          Assigns the SilverStream font object (AgoFontIdentifier) to the control's text.
 void setForeground(Color color)
          Assigns an instance of the java.awt.Color to the control's text.
 void setText(String text)
          Assigns the control's text.
 void setTextColor(Color color)
          Deprecated. use AgcRectangle.setForeground(Color)
 
Methods inherited from class com.sssw.rt.form.PvBasePanel
getBackgroundColor, getFontIdentifier, setBackgroundColor
 
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 javax.swing.JComponent
addAncestorListener, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getAlignmentX, getAlignmentY, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getGraphics, getHeight, getInsets, getInsets, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getVisibleRect, getWidth, getX, getY, grabFocus, hasFocus, isDoubleBuffered, isFocusCycleRoot, isLightweightComponent, isManagingFocus, isOpaque, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintChildren, print, printAll, processComponentKeyEvent, processFocusEvent, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, resetKeyboardActions, revalidate, scrollRectToVisible, setAlignmentX, setAlignmentY, setAutoscrolls, setBorder, setDebugGraphicsOptions, setDoubleBuffered, setEnabled, setFont, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setUI, setVisible, unregisterKeyboardAction, update
 
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.awt.Component
action, add, addComponentListener, addFocusListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, inside, isDisplayable, isEnabled, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processInputMethodEvent, processMouseEvent, remove, removeComponentListener, removeFocusListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setDropTarget, setLocale, setLocation, setLocation, setName, setSize, setSize, show, size, toString, transferFocus
 
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
 

Field Detail

BORDER_NONE

public static final int BORDER_NONE
No border is displayed.
See Also:
AgcRectangle.getBorderStyle(), AgcRectangle.setBorderStyle(int)

BORDER_OUTLINE

public static final int BORDER_OUTLINE
Draw a one-pixel border.
See Also:
AgcRectangle.getBorderStyle(), AgcRectangle.setBorderStyle(int)

BORDER_LOWERED

public static final int BORDER_LOWERED
Draw a lowered border.
See Also:
AgcRectangle.getBorderStyle(), AgcRectangle.setBorderStyle(int)

BORDER_RAISED

public static final int BORDER_RAISED
Draw a raised border.
See Also:
AgcRectangle.getBorderStyle(), AgcRectangle.setBorderStyle(int)

BORDER_GROOVED

public static final int BORDER_GROOVED
Draw a grooved border. This is the default value.
See Also:
AgcRectangle.getBorderStyle(), AgcRectangle.setBorderStyle(int)
Constructor Detail

AgcRectangle

public AgcRectangle()
Method Detail

getText

public String getText()
Get the label text of the rectangle.
Example:

The following code fragment illustrates how to call getText().

   String s;
   s = ControlName1.getText();
 
See Also:
AgcRectangle.setText(String)

setText

public void setText(String text)
Assigns the control's text.
Parameters:
text - specifies the text to assign to the control
Example:

The following code fragment illustrates how to use the setText() method.

 ControlName1.setText("Add");
 
See Also:
AgcRectangle.getText()

getTextColor

public Color getTextColor()
Deprecated. use AgcRectangle.getForeground()

Returns the Color of the control's text.
Example:

The following code fragment illustrates how to use the getTextColor() method.

  Color c;
  c = ControlName1.getTextColor();
 
See Also:
AgcRectangle.setTextColor(Color)

getForeground

public Color getForeground()
Returns the Color of the control's text.
Overrides:
getForeground in class Component
Example:

The following code fragment illustrates how to use the getTextColor() method.

  Color c;
  c = ControlName1.getForeground();
 
See Also:
AgcRectangle.setForeground(Color)

setTextColor

public void setTextColor(Color color)
Deprecated. use AgcRectangle.setForeground(Color)

Assigns an instance of the java.awt.Color to the control's text.
Parameters:
color - specifies the instance of a java.awt.Color Object or one of the Color constants, for example, Color.red
Example:

The following code fragment illustrates how to set the text Color to red.

 ControlName1.setTextColor(Color.red);
 
See Also:
AgcRectangle.getTextColor()

setForeground

public void setForeground(Color color)
Assigns an instance of the java.awt.Color to the control's text.
Overrides:
setForeground in class JComponent
Parameters:
color - specifies the instance of a java.awt.Color Object or one of the Color constants, for example, Color.red
Example:

The following code fragment illustrates how to set the text Color to red.

 ControlName1.setForeground(Color.red);
 
See Also:
AgcRectangle.getForeground()

setBackground

public void setBackground(Color color)
Assigns an instance of the java.awt.Color to the control's background.
Overrides:
setBackground in class JComponent
Parameters:
color - specifies the instance of a java.awt.Color Object or one of the Color constants, for example, Color.red
Example:

The following code fragment illustrates how to set the background Color to red.

 ControlName1.setBackground(Color.red);
 

setFontIdentifier

public void setFontIdentifier(AgoFontIdentifier font)
Assigns the SilverStream font object (AgoFontIdentifier) to the control's text.
Overrides:
setFontIdentifier in class PvBasePanel
Parameters:
font - specifies the AgoFontIdentifier object that assigns the font for the control.
Example:

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);
  ControlName1.setFontIdentifier(newFont);
 
See Also:
AgoFontIdentifier, PvBasePanel.getFontIdentifier(), Font Name property, Font Size property, Font Style property

getColor

public Color getColor()
Returns the control's fill Color.
See Also:
AgcRectangle.setColor(Color)

setColor

public void setColor(Color color)
Assigns the control's fill Color.
Parameters:
color - specifies the instance of a java.awt.Color object or one of the color constants (e.g., Color.red)
Example:

The following code fragment illustrates how to set the color of a control to red.

  ControlName1.setColor(Color.red);
 
See Also:
AgcRectangle.getColor()

getBorderStyle

public int getBorderStyle()
Returns the control's border style.
Example:

The following code fragment illustrates how to obtain the border style.

  int borderStyle;
  borderStyle = ControlName1.getBorderStyle();
 
See Also:
AgcRectangle.setBorderStyle(int)

setBorderStyle

public void setBorderStyle(int style)
Assigns a style for the control's border.
Parameters:
style - specifies the border style
Usage:

These constants must be qualified with the classname, for example, AgcRectangle.BORDER_OUTLINE.

Example:

The following code fragment illustrates how to set a rectangle's border style to none.

 ControlName1.setBorderStyle(AgcRectangle.BORDER_NONE);
 
See Also:
AgcRectangle.getBorderStyle(), Border Style property

SilverStream
Application Server 3.5