All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class symantec.itools.awt.BorderPanel

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----java.awt.Panel
                           |
                           +----symantec.itools.awt.BorderPanel

public class BorderPanel
extends Panel
implements AlignStyle, BevelStyle
BorderPanel is a panel component that has an optional border and optional text title.


Variable Index

 o borderColor
The border color.
 o internalInsets
The internal border insets.
 o ixPad
The side border inset padding amount, in pixels.
 o iyPadBottom
The bottom border inset padding amount, in pixels.
 o iyPadTop
The top border inset padding amount, in pixels.
 o label
The text label to display in the border.
 o labelAlignment
The border label alignment: ALIGN_LEFT, ALIGN_CENTERED, or ALIGN_RIGHT.
 o labelColor
The border label color.
 o labelipadx
Label horizontal coordinate inset constant, in pixels.
 o labelpadx
Label horizontal coordinate padding constant, in pixels.
 o padbottom
The bottom border outside padding amount, in pixels.
 o padleft
The left border outside padding amount, in pixels.
 o padright
The right border outside padding amount, in pixels.
 o padtop
The top border outside padding amount, in pixels.
 o panel
The panel within the border.
 o style
The border style: BEVEL_RAISED, BEVEL_LOWERED, BEVEL_LINE, or BEVEL_NONE.

Constructor Index

 o BorderPanel()
Constructs a new default BorderPanel.
 o BorderPanel(int)
Constructs a new BorderPanel with the specified beveled border style.
 o BorderPanel(String)
Constructs a new BorderPanel with the specified border label.
 o BorderPanel(String, int)
Constructs a new BorderPanel with the specified border label and given alignment.
 o BorderPanel(String, int, int)
Constructs a new BorderPanel with the specified border label and given alignment and border styles.

Method Index

 o add(Component)
Adds a component to the end of this container.
 o add(Component, int)
Inserts a component into this container at the given position.
 o add(String, Component)
Adds a component to the end of this container and to the layout manager.
 o addNotify()
Tells this component that it has been added to a container.
 o countComponents()
Returns the number of components in this container.
 o getAlignStyle()
Gets the current border label alignment.
 o getBevelStyle()
Gets the current border style.
 o getBorderColor()
Gets the current border color.
 o getComponent(int)
Gets the component at the specified zero-relative component index.
 o getComponents()
Returns all of the components in this container.
 o getInternalInsets()
Gets the current internal border insets.
 o getIPadBottom()
Gets the current bottom border inset padding amount, in pixels.
 o getIPadSides()
Gets the current side border inset padding amount, in pixels.
 o getIPadTop()
Gets the current top border inset padding amount, in pixels.
 o getLabel()
Returns the text label displayed in the border.
 o getLabelColor()
Gets the current border label color.
 o getLabelTopMargin()
Returns the current margin above the label.
 o getLayout()
Gets the current border panel layout manager.
 o getPaddingBottom()
Gets the current bottom border outside padding amount, in pixels.
 o getPaddingLeft()
Gets the current left border outside padding amount, in pixels.
 o getPaddingRight()
Gets the current right border outside padding amount, in pixels.
 o getPaddingTop()
Gets the current top border outside padding amount, in pixels.
 o insets()
Returns the amount of space used by the current border.
 o layout()
Handles the laying out of components within this component.
 o minimumSize()
Returns the minimum dimensions to properly display this component.
 o paint(Graphics)
Paints this component using the given graphics context.
 o preferredSize()
Returns the recommended dimensions to properly display this component.
 o remove(Component)
Removes the specified component from this container.
 o removeAll()
Removes all the components from this container.
 o reshape(int, int, int, int)
Moves and/or resizes this component.
 o setAlignStyle(int)
Sets the border label alignment.
 o setBackground(Color)
Sets this component's background color.
 o setBevelStyle(int)
Sets the border style.
 o setBorderColor(Color)
Sets the current border color.
 o setBorderColor(Color, boolean)
Sets the current border color, and optionally the border label color.
 o setInternalInsets(Insets)
Sets the internal border insets.
 o setIPadBottom(int)
Sets the bottom border inset padding amount, in pixels.
 o setIPadSides(int)
Sets the side border inset padding amount, in pixels.
 o setIPadTop(int)
Sets the top border inset padding amount, in pixels.
 o setLabel(String)
Sets the text label to display in the border.
 o setLabelColor(Color)
Sets the border label color.
 o setLayout(LayoutManager)
Sets the layout manager to be used to layout this container.
 o setPadding(int, int, int, int)
Sets the border padding amounts.
 o setPaddingBottom(int)
Sets the bottom border outside padding amount, in pixels.
 o setPaddingLeft(int)
Sets the left border outside padding amount, in pixels.
 o setPaddingRight(int)
Sets the right border outside padding amount, in pixels.
 o setPaddingTop(int)
Sets the top border outside padding amount, in pixels.
 o update(Graphics)
Handles redrawing of this component on the screen.

Variables

 o labelpadx
  protected final static int labelpadx
Label horizontal coordinate padding constant, in pixels.

 o labelipadx
  protected final static int labelipadx
Label horizontal coordinate inset constant, in pixels.

 o borderColor
  protected Color borderColor
The border color.

 o labelColor
  protected Color labelColor
The border label color.

 o padtop
  protected int padtop
The top border outside padding amount, in pixels. This is the distance between the drawn border and the actual bounds of the component.

 o padbottom
  protected int padbottom
The bottom border outside padding amount, in pixels. This is the distance between the drawn border and the actual bounds of the component.

 o padleft
  protected int padleft
The left border outside padding amount, in pixels. This is the distance between the drawn border and the actual bounds of the component.

 o padright
  protected int padright
The right border outside padding amount, in pixels. This is the distance between the drawn border and the actual bounds of the component.

 o ixPad
  protected int ixPad
The side border inset padding amount, in pixels. This is the distance between the drawn border and the usable area within the border. It is used to determine the size of the panel contained within this component's borders.

See Also:
panel
 o iyPadTop
  protected int iyPadTop
The top border inset padding amount, in pixels. This is the distance between the drawn border and the usable area within the border. It is used to determine the size of the panel contained within this component's borders.

See Also:
panel
 o iyPadBottom
  protected int iyPadBottom
The bottom border inset padding amount, in pixels. This is the distance between the drawn border and the usable area within the border. It is used to determine the size of the panel contained within this component's borders.

See Also:
panel
 o style
  protected int style
The border style: BEVEL_RAISED, BEVEL_LOWERED, BEVEL_LINE, or BEVEL_NONE.

See Also:
BEVEL_RAISED, BEVEL_LOWERED, BEVEL_LINE, BEVEL_NONE
 o label
  protected String label
The text label to display in the border.

 o labelAlignment
  protected int labelAlignment
The border label alignment: ALIGN_LEFT, ALIGN_CENTERED, or ALIGN_RIGHT.

See Also:
ALIGN_LEFT, ALIGN_CENTERED, ALIGN_RIGHT
 o internalInsets
  protected Insets internalInsets
The internal border insets. The left and right fields are used while determining the preferred width of this component.

 o panel
  protected Panel panel
The panel within the border. This is the panel that contains the components added to the BorderPanel.

Constructors

 o BorderPanel
  public BorderPanel()
Constructs a new default BorderPanel. Its label will be ALIGN_CENTERED and it will have a BEVEL_LINE style border.

 o BorderPanel
  public BorderPanel(int style)
Constructs a new BorderPanel with the specified beveled border style. It will have the ALIGN_CENTERED label alignment style.

Parameters:
style - the desired beveled border style
See Also:
BEVEL_RAISED, BEVEL_LOWERED, BEVEL_LINE, BEVEL_NONE
 o BorderPanel
  public BorderPanel(String s)
Constructs a new BorderPanel with the specified border label. Its label will be ALIGN_CENTERED and it will have a BEVEL_LINE style border.

Parameters:
s - the label for the panel's border
 o BorderPanel
  public BorderPanel(String s,
                     int alignment)
Constructs a new BorderPanel with the specified border label and given alignment.

Parameters:
s - the label for the panel's border
alignment - the label alignment
See Also:
ALIGN_LEFT, ALIGN_CENTERED, ALIGN_RIGHT
 o BorderPanel
  public BorderPanel(String s,
                     int alignment,
                     int style)
Constructs a new BorderPanel with the specified border label and given alignment and border styles.

Parameters:
s - the label for the panel's border
alignment - the label alignment
style - the border bevel style
See Also:
ALIGN_LEFT, ALIGN_CENTERED, ALIGN_RIGHT, BEVEL_RAISED, BEVEL_LOWERED, BEVEL_LINE, BEVEL_NONE

Methods

 o addNotify
  public void addNotify()
Tells this component that it has been added to a container. This is a standard Java AWT method which gets called by the AWT when this component is added to a container. Typically, it is used to create this component's peer. It is overridden here to resize self after peer created.

Overrides:
addNotify in class Panel
See Also:
removeNotify
 o setPaddingTop
  public void setPaddingTop(int p)
Sets the top border outside padding amount, in pixels. This is the distance between the drawn border and the actual bounds of the component.

Parameters:
p - the top border outside padding amount, in pixels
See Also:
getPaddingTop
 o getPaddingTop
  public int getPaddingTop()
Gets the current top border outside padding amount, in pixels. This is the distance between the drawn border and the actual bounds of the component.

Returns:
the top border outside padding amount, in pixels
See Also:
setPaddingTop
 o setPaddingBottom
  public void setPaddingBottom(int p)
Sets the bottom border outside padding amount, in pixels. This is the distance between the drawn border and the actual bounds of the component.

Parameters:
p - the bottom border outside padding amount, in pixels
See Also:
getPaddingBottom
 o getPaddingBottom
  public int getPaddingBottom()
Gets the current bottom border outside padding amount, in pixels. This is the distance between the drawn border and the actual bounds of the component.

Returns:
the bottom border outside padding amount, in pixels
See Also:
setPaddingBottom
 o setPaddingLeft
  public void setPaddingLeft(int p)
Sets the left border outside padding amount, in pixels. This is the distance between the drawn border and the actual bounds of the component.

Parameters:
p - the left border outside padding amount, in pixels
See Also:
getPaddingLeft
 o getPaddingLeft
  public int getPaddingLeft()
Gets the current left border outside padding amount, in pixels. This is the distance between the drawn border and the actual bounds of the component.

Returns:
the left border outside padding amount, in pixels
See Also:
setPaddingLeft
 o setPaddingRight
  public void setPaddingRight(int p)
Sets the right border outside padding amount, in pixels. This is the distance between the drawn border and the actual bounds of the component.

Parameters:
p - the right border outside padding amount, in pixels
See Also:
getPaddingRight
 o getPaddingRight
  public int getPaddingRight()
Gets the current right border outside padding amount, in pixels. This is the distance between the drawn border and the actual bounds of the component.

Returns:
the right border outside padding amount, in pixels
See Also:
setPaddingRight
 o setIPadTop
  public void setIPadTop(int t)
Sets the top border inset padding amount, in pixels. This is the distance between the drawn border and the usable area within the border. It is used to determine the size of the panel contained within this component's borders.

Parameters:
t - top border inset padding amount
See Also:
getIPadTop, panel
 o setIPadBottom
  public void setIPadBottom(int b)
Sets the bottom border inset padding amount, in pixels. This is the distance between the drawn border and the usable area within the border. It is used to determine the size of the panel contained within this component's borders.

Parameters:
b - bottom border inset padding amount
See Also:
getIPadBottom, panel
 o getIPadTop
  public int getIPadTop()
Gets the current top border inset padding amount, in pixels. This is the distance between the drawn border and the usable area within the border. It is used to determine the size of the panel contained within this component's borders.

Returns:
top border inset padding amount
See Also:
setIPadTop, panel
 o setIPadSides
  public void setIPadSides(int s)
Sets the side border inset padding amount, in pixels. This is the distance between the drawn border and the usable area within the border. It is used to determine the size of the panel contained within this component's borders.

Parameters:
s - side border inset padding amount
See Also:
getIPadSides, panel
 o getIPadBottom
  public int getIPadBottom()
Gets the current bottom border inset padding amount, in pixels. This is the distance between the drawn border and the usable area within the border. It is used to determine the size of the panel contained within this component's borders.

Returns:
bottom border inset padding amount
See Also:
setIPadBottom, panel
 o setPadding
  public void setPadding(int t,
                         int b,
                         int l,
                         int r)
Sets the border padding amounts. This are the distances between the drawn border and the actual bounds of the component.

Parameters:
t - the top padding amount
b - the bottom padding amount
l - the left padding amount
r - the right padding amount
 o getIPadSides
  public int getIPadSides()
Gets the current side border inset padding amount, in pixels. This is the distance between the drawn border and the usable area within the border. It is used to determine the size of the panel contained within this component's borders.

Returns:
side border inset padding amount
See Also:
setIPadSides, panel
 o setLabel
  public void setLabel(String s)
Sets the text label to display in the border.

Parameters:
s - the new border label. If null, label is removed
See Also:
getLabel
 o getLabel
  public String getLabel()
Returns the text label displayed in the border.

See Also:
setLabel
 o setBorderColor
  public void setBorderColor(Color clr,
                             boolean useForLabel)
Sets the current border color, and optionally the border label color.

Parameters:
clr - the new border color
useForLabel - if true use the new border color for the label color as well
See Also:
getBorderColor
 o setBorderColor
  public void setBorderColor(Color clr)
Sets the current border color.

Parameters:
clr - the new border color
See Also:
getBorderColor
 o getBorderColor
  public Color getBorderColor()
Gets the current border color.

Returns:
the current border color
See Also:
setBorderColor
 o setAlignStyle
  public void setAlignStyle(int alignment)
Sets the border label alignment.

Parameters:
alignment - the new border label alignment. One of ALIGN_LEFT, ALIGN_CENTERED, or ALIGN_RIGHT
See Also:
getAlignStyle, ALIGN_LEFT, ALIGN_CENTERED, ALIGN_RIGHT
 o getAlignStyle
  public int getAlignStyle()
Gets the current border label alignment.

Returns:
the current border label alignment. One of ALIGN_LEFT, ALIGN_CENTERED, or ALIGN_RIGHT
See Also:
ALIGN_LEFT, ALIGN_CENTERED, ALIGN_RIGHT, setAlignStyle
 o setLabelColor
  public void setLabelColor(Color clr)
Sets the border label color.

Parameters:
clr - the new border label color
See Also:
getLabelColor
 o getLabelColor
  public Color getLabelColor()
Gets the current border label color.

Returns:
the current border label color
 o setBevelStyle
  public void setBevelStyle(int s)
Sets the border style.

Parameters:
s - the new border style. One of BEVEL_RAISED, BEVEL_LOWERED, BEVEL_LINE, or BEVEL_NONE
See Also:
BEVEL_RAISED, BEVEL_LOWERED, BEVEL_LINE, BEVEL_NONE, getBevelStyle
 o getBevelStyle
  public int getBevelStyle()
Gets the current border style.

Returns:
current border style. One of BEVEL_RAISED, BEVEL_LOWERED, BEVEL_LINE, or BEVEL_NONE
See Also:
BEVEL_RAISED, BEVEL_LOWERED, BEVEL_LINE, BEVEL_NONE, setBevelStyle
 o setInternalInsets
  public void setInternalInsets(Insets insets)
Sets the internal border insets. The left and right fields of the internal insets are used while determining the preferred width of this component.

Parameters:
insets - the new internal border insets
See Also:
getInternalInsets
 o getInternalInsets
  public Insets getInternalInsets()
Gets the current internal border insets. The left and right fields of the internal insets are used while determining the preferred width of this component.

Returns:
the current internal border insets
See Also:
setInternalInsets
 o layout
  public void layout()
Handles the laying out of components within this component. This is a standard Java AWT method which gets called by the AWT when this component is validated with the validate() method.

Overrides:
layout in class Container
See Also:
validate
 o minimumSize
  public Dimension minimumSize()
Returns the minimum dimensions to properly display this component. This is a standard Java AWT method which gets called to determine the minimum size of this component. The minimum size of this component is equal to the preferred size.

Overrides:
minimumSize in class Container
See Also:
preferredSize
 o preferredSize
  public Dimension preferredSize()
Returns the recommended dimensions to properly display this component. This is a standard Java AWT method which gets called to determine the recommended size of this component. The size returned is large enough to display the entire border label and the panel within the border.

Overrides:
preferredSize in class Container
See Also:
minimumSize
 o setLayout
  public void setLayout(LayoutManager l)
Sets the layout manager to be used to layout this container. This is a standard Java AWT method which gets called to specify which layout manager should be used to layout the components in standard containers.

Parameters:
l - the layout manager to use to layout this container's components
Overrides:
setLayout in class Container
See Also:
getLayout
 o getLayout
  public LayoutManager getLayout()
Gets the current border panel layout manager.

Returns:
current LayoutManager of border panel
Overrides:
getLayout in class Container
See Also:
setLayout
 o add
  public Component add(Component c)
Adds a component to the end of this container. This is a standard Java AWT method which gets called to add a component to a container. The specified component is added to the end of this container.

Parameters:
c - the component to add
Returns:
the added component
Overrides:
add in class Container
See Also:
remove
 o add
  public Component add(String s,
                       Component c)
Adds a component to the end of this container and to the layout manager. This is a standard Java AWT method which gets called to add a component to a container. The specified component is added to the end of this container, and also added to this container's layout manager with the given name.

Parameters:
name - the positioning directive for the layout manager
c - the component to add
Returns:
the added component
Overrides:
add in class Container
See Also:
remove
 o add
  public Component add(Component c,
                       int pos)
Inserts a component into this container at the given position. This is a standard Java AWT method which gets called to add a component to a container. The specified component is added to this container at the given zero-relative position index. A position index of -1 appends the component to the end.

Parameters:
c - the component to add
pos - the zero-relative index at which to add the component or -1 for end
Returns:
the added component
Overrides:
add in class Container
See Also:
remove
 o remove
  public void remove(Component c)
Removes the specified component from this container. This is a standard Java AWT method which gets called to remove a component from a container. When this happens the component's removeNotify() will also get called to indicate component removal.

Parameters:
c - the component to remove
Overrides:
remove in class Container
See Also:
removeAll, add
 o removeAll
  public void removeAll()
Removes all the components from this container. This is a standard Java AWT method which gets called to remove all the components from a container. When this happens each component's removeNotify() will also get called to indicate component removal.

Overrides:
removeAll in class Container
See Also:
remove, add
 o reshape
  public void reshape(int x,
                      int y,
                      int width,
                      int height)
Moves and/or resizes this component. This is a standard Java AWT method which gets called to move and/or resize this component. Components that are in containers with layout managers should not call this method, but rely on the layout manager instead.

Parameters:
x - horizontal position in the parent's coordinate space
y - vertical position in the parent's coordinate space
width - the new width
height - the new height
Overrides:
reshape in class Component
 o update
  public void update(Graphics g)
Handles redrawing of this component on the screen. This is a standard Java AWT method which gets called by the Java AWT (repaint()) to handle repainting this component on the screen. The graphics context clipping region is set to the bounding rectangle of this component and its <0,0> coordinate is this component's top-left corner. Typically this method paints the background color to clear the component's drawing space, sets graphics context to be the foreground color, and then calls paint() to draw the component.

Parameters:
g - the graphics context
Overrides:
update in class Component
See Also:
repaint, paint
 o countComponents
  public int countComponents()
Returns the number of components in this container. This is a standard Java AWT method which gets called to return a count of the components within this container.

Overrides:
countComponents in class Container
 o getComponent
  public Component getComponent(int i)
Gets the component at the specified zero-relative component index. This is a standard Java AWT method which gets called to return the component at a specific position.

Parameters:
i - the zero-relative index of the component to retrieve
Returns:
the component at the given index
Throws: ArrayIndexOutOfBoundsException
if the given component index does not exist
Overrides:
getComponent in class Container
See Also:
getComponents
 o getComponents
  public Component[] getComponents()
Returns all of the components in this container. This is a standard Java AWT method which gets called to return an array of all of the components in this container.

Returns:
an array of components in this container
Overrides:
getComponents in class Container
See Also:
getComponent
 o insets
  public Insets insets()
Returns the amount of space used by the current border. This is a standard Java AWT method which gets called to determine the size of the current border. The returned value is the width of each border side in pixels.

Returns:
the current border insets
Overrides:
insets in class Container
 o paint
  public void paint(Graphics g)
Paints this component using the given graphics context. This is a standard Java AWT method which typically gets called by the AWT to handle painting this component. It paints this component using the given graphics context. The graphics context clipping region is set to the bounding rectangle of this component and its <0,0> coordinate is this component's top-left corner.

Parameters:
g - the graphics context used for painting
Overrides:
paint in class Container
See Also:
repaint, update
 o getLabelTopMargin
  protected int getLabelTopMargin()
Returns the current margin above the label.

 o setBackground
  public void setBackground(Color c)
Sets this component's background color. This is a standard Java AWT method which gets called to change the background color of this component.

Parameters:
c - the new background color
Overrides:
setBackground in class Component
See Also:
getBackground

All Packages  Class Hierarchy  This Package  Previous  Next  Index