APIdia Launch Partner
Top Inners Fields Constructors Methods
sun.tools.jconsole

public Class BorderedComponent

extends JPanel
implements ActionListener
Class Inheritance
All Implemented Interfaces
java.awt.event.ActionListener, java.util.EventListener
Known Direct Subclasses
sun.tools.jconsole.PlotterPanel, sun.tools.jconsole.MemoryTab.PoolChart
Annotations
@SuppressWarnings:serial
Imports
java.awt.*, java.awt.event.*, javax.swing.*, javax.swing.border.*, javax.swing.plaf.*, javax.swing.plaf.basic.BasicGraphicsUtils

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class
protected static class
protected static class
BorderedComponent.LabeledBorder

A subclass of TitledBorder which implements an arbitrary border with the addition of a JComponent (JLabel, JPanel, etc) in the default position.

Field Summary

Modifier and TypeField and Description
pack-priv boolean
private Icon
pack-priv JComponent
private Icon
pack-priv JLabel
pack-priv JButton
pack-priv String

Constructor Summary

AccessConstructor and Description
public
public
public
BorderedComponent(String text, JComponent comp, boolean collapsible)

Method Summary

Modifier and TypeMethod and Description
public void
actionPerformed(ActionEvent ev)

Implements java.awt.event.ActionListener.actionPerformed.

Invoked when an action occurs.

public void
doLayout()

Overrides java.awt.Container.doLayout.

Causes this container to lay out its components.

private static Image
public Dimension
getMinimumSize()

Overrides javax.swing.JComponent.getMinimumSize.

If the minimum size has been set to a non-null value just returns it.

public void
public void
Inherited from javax.swing.JPanel:
getAccessibleContextgetUIgetUIClassIDparamStringsetUIupdateUI

Field Detail

collapsedback to summary
pack-priv boolean collapsed
collapseIconback to summary
private Icon collapseIcon
compback to summary
pack-priv JComponent comp
expandIconback to summary
private Icon expandIcon
labelback to summary
pack-priv JLabel label
moreOrLessButtonback to summary
pack-priv JButton moreOrLessButton
valueLabelStrback to summary
pack-priv String valueLabelStr

Constructor Detail

BorderedComponentback to summary
public BorderedComponent(String text)
BorderedComponentback to summary
public BorderedComponent(String text, JComponent comp)
BorderedComponentback to summary
public BorderedComponent(String text, JComponent comp, boolean collapsible)

Method Detail

actionPerformedback to summary
public void actionPerformed(ActionEvent ev)

Implements java.awt.event.ActionListener.actionPerformed.

Doc from java.awt.event.ActionListener.actionPerformed.

Invoked when an action occurs.

doLayoutback to summary
public void doLayout()

Overrides java.awt.Container.doLayout.

Doc from java.awt.Container.doLayout.

Causes this container to lay out its components. Most programs should not call this method directly, but should invoke the validate method instead.

getImageback to summary
private static Image getImage(String name)
getMinimumSizeback to summary
public Dimension getMinimumSize()

Overrides javax.swing.JComponent.getMinimumSize.

Doc from javax.swing.JComponent.getMinimumSize.

If the minimum size has been set to a non-null value just returns it. If the UI delegate's getMinimumSize method returns a non-null value then return that; otherwise defer to the component's layout manager.

setComponentback to summary
public void setComponent(JComponent comp)
setValueLabelback to summary
public void setValueLabel(String str)
sun.tools.jconsole back to summary

private Class BorderedComponent.ArrowIcon

extends Object
implements Icon
Class Inheritance
All Implemented Interfaces
javax.swing.Icon

Field Summary

Modifier and TypeField and Description
private int
private JLabel

Constructor Summary

AccessConstructor and Description
public
ArrowIcon(int direction, JLabel textLabel)

Method Summary

Modifier and TypeMethod and Description
public int
getIconHeight()

Implements javax.swing.Icon.getIconHeight.

Returns the icon's height.

public int
getIconWidth()

Implements javax.swing.Icon.getIconWidth.

Returns the icon's width.

public void
paintIcon(Component c, Graphics g, int x, int y)

Implements javax.swing.Icon.paintIcon.

Draw the icon at the specified location.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

directionback to summary
private int direction
textLabelback to summary
private JLabel textLabel

Constructor Detail

ArrowIconback to summary
public ArrowIcon(int direction, JLabel textLabel)

Method Detail

getIconHeightback to summary
public int getIconHeight()

Implements javax.swing.Icon.getIconHeight.

Doc from javax.swing.Icon.getIconHeight.

Returns the icon's height.

getIconWidthback to summary
public int getIconWidth()

Implements javax.swing.Icon.getIconWidth.

Doc from javax.swing.Icon.getIconWidth.

Returns the icon's width.

paintIconback to summary
public void paintIcon(Component c, Graphics g, int x, int y)

Implements javax.swing.Icon.paintIcon.

Doc from javax.swing.Icon.paintIcon.

Draw the icon at the specified location. Icon implementations may use the Component argument to get properties useful for painting, e.g. the foreground or background color.

sun.tools.jconsole back to summary

protected Class BorderedComponent.FocusBorder

extends AbstractBorder
implements FocusListener
Class Inheritance
All Implemented Interfaces
java.awt.event.FocusListener, java.util.EventListener

Field Summary

Modifier and TypeField and Description
private Component
private Color
private boolean

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
focusGained(FocusEvent e)

Implements java.awt.event.FocusListener.focusGained.

Invoked when a component gains the keyboard focus.

public void
focusLost(FocusEvent e)

Implements java.awt.event.FocusListener.focusLost.

Invoked when a component loses the keyboard focus.

public Insets
getBorderInsets(Component c, Insets insets)

Overrides javax.swing.border.AbstractBorder.getBorderInsets.

Reinitializes the insets parameter with this Border's current Insets.

public void
paintBorder(Component c, Graphics g, int x, int y, int width, int height)

Overrides javax.swing.border.AbstractBorder.paintBorder.

Implements javax.swing.border.Border.paintBorder.

This default implementation does no painting.

Inherited from javax.swing.border.AbstractBorder:
getBaselinegetBaselineResizeBehaviorgetBorderInsetsgetInteriorRectanglegetInteriorRectangleisBorderOpaque

Field Detail

compback to summary
private Component comp
focusColorback to summary
private Color focusColor
focusLostTemporarilyback to summary
private boolean focusLostTemporarily

Constructor Detail

FocusBorderback to summary
public FocusBorder(Component comp)

Method Detail

focusGainedback to summary
public void focusGained(FocusEvent e)

Implements java.awt.event.FocusListener.focusGained.

Doc from java.awt.event.FocusListener.focusGained.

Invoked when a component gains the keyboard focus.

focusLostback to summary
public void focusLost(FocusEvent e)

Implements java.awt.event.FocusListener.focusLost.

Doc from java.awt.event.FocusListener.focusLost.

Invoked when a component loses the keyboard focus.

getBorderInsetsback to summary
public Insets getBorderInsets(Component c, Insets insets)

Overrides javax.swing.border.AbstractBorder.getBorderInsets.

Doc from javax.swing.border.AbstractBorder.getBorderInsets.

Reinitializes the insets parameter with this Border's current Insets.

paintBorderback to summary
public void paintBorder(Component c, Graphics g, int x, int y, int width, int height)

Overrides javax.swing.border.AbstractBorder.paintBorder.

Implements javax.swing.border.Border.paintBorder.

Doc from javax.swing.border.AbstractBorder.paintBorder.

This default implementation does no painting.

sun.tools.jconsole back to summary

protected Class BorderedComponent.LabeledBorder

extends TitledBorder
Class Inheritance

A subclass of TitledBorder which implements an arbitrary border with the addition of a JComponent (JLabel, JPanel, etc) in the default position.

If the border property value is not specified in the constructor or by invoking the appropriate set method, the property value will be defined by the current look and feel, using the following property name in the Defaults Table:

Field Summary

Modifier and TypeField and Description
private Point
protected JComponent
Inherited from javax.swing.border.TitledBorder:
ABOVE_BOTTOMABOVE_TOPBELOW_BOTTOMBELOW_TOPborderBOTTOMCENTERDEFAULT_JUSTIFICATIONDEFAULT_POSITIONEDGE_SPACINGLEADINGLEFTRIGHTTEXT_INSET_HTEXT_SPACINGtitletitleColortitleFonttitleJustificationtitlePositionTOPTRAILING

Constructor Summary

AccessConstructor and Description
public
LabeledBorder(JComponent
the label the border should display
label
)

Creates a LabeledBorder instance.

public
LabeledBorder(Border
the border
border
)

Creates a LabeledBorder instance with the specified border and an empty label.

public
LabeledBorder(Border
the border
border
,
JComponent
the label the border should display
label
)

Creates a LabeledBorder instance with the specified border and label.

Method Summary

Modifier and TypeMethod and Description
private static boolean
computeIntersection(Rectangle dest, int rx, int ry, int rw, int rh)

public Insets
getBorderInsets(Component
the component for which this border insets value applies
c
,
Insets
the object to be reinitialized
insets
)

Overrides javax.swing.border.TitledBorder.getBorderInsets.

Reinitialize the insets parameter with this Border's current Insets.

public JComponent
getLabel()

Returns the label of the labeled border.

public Dimension
getMinimumSize(Component
the component where this border will be drawn
c
)

Overrides javax.swing.border.TitledBorder.getMinimumSize.

Returns the minimum dimensions this border requires in order to fully display the border and title.

public void
paintBorder(Component
the component for which this border is being painted
c
,
Graphics
the paint graphics
g
,
int
the x position of the painted border
x
,
int
the y position of the painted border
y
,
int
the width of the painted border
width
,
int
the height of the painted border
height
)

Overrides javax.swing.border.TitledBorder.paintBorder.

Implements javax.swing.border.Border.paintBorder.

Paints the border for the specified component with the specified position and size.

public void
setLabel(JComponent label)

Sets the title of the titled border.

Inherited from javax.swing.border.TitledBorder:
getBaselinegetBaselineResizeBehaviorgetBordergetFontgetTitlegetTitleColorgetTitleFontgetTitleJustificationgetTitlePositionisBorderOpaquesetBordersetTitlesetTitleColorsetTitleFontsetTitleJustificationsetTitlePosition

Field Detail

compLocback to summary
private Point compLoc
labelback to summary
protected JComponent label

Hides javax.swing.border.TitledBorder.label.

Constructor Detail

LabeledBorderback to summary
public LabeledBorder(JComponent label)

Creates a LabeledBorder instance.

Parameters
label:JComponent

the label the border should display

LabeledBorderback to summary
public LabeledBorder(Border border)

Creates a LabeledBorder instance with the specified border and an empty label.

Parameters
border:Border

the border

LabeledBorderback to summary
public LabeledBorder(Border border, JComponent label)

Creates a LabeledBorder instance with the specified border and label.

Parameters
border:Border

the border

label:JComponent

the label the border should display

Method Detail

computeIntersectionback to summary
private static boolean computeIntersection(Rectangle dest, int rx, int ry, int rw, int rh)
getBorderInsetsback to summary
public Insets getBorderInsets(Component c, Insets insets)

Overrides javax.swing.border.TitledBorder.getBorderInsets.

Reinitialize the insets parameter with this Border's current Insets.

Parameters
c:Component

the component for which this border insets value applies

insets:Insets

the object to be reinitialized

getLabelback to summary
public JComponent getLabel()

Returns the label of the labeled border.

getMinimumSizeback to summary
public Dimension getMinimumSize(Component c)

Overrides javax.swing.border.TitledBorder.getMinimumSize.

Returns the minimum dimensions this border requires in order to fully display the border and title.

Parameters
c:Component

the component where this border will be drawn

paintBorderback to summary
public void paintBorder(Component c, Graphics g, int x, int y, int width, int height)

Overrides javax.swing.border.TitledBorder.paintBorder.

Implements javax.swing.border.Border.paintBorder.

Paints the border for the specified component with the specified position and size.

Parameters
c:Component

the component for which this border is being painted

g:Graphics

the paint graphics

x:int

the x position of the painted border

y:int

the y position of the painted border

width:int

the width of the painted border

height:int

the height of the painted border

setLabelback to summary
public void setLabel(JComponent label)

Sets the title of the titled border. param title the title for the border