APIdia Launch Partner
Top Description Inners Constructors Methods
com.sun.java.swing.plaf.motif

public Class MotifBorders

extends Object
Class Inheritance
Imports
java.awt.Color, .Component, .Dimension, .Font, .FontMetrics, .Graphics, .Insets, .Point, .Rectangle, javax.swing.AbstractButton, .ButtonModel, .JButton, .JComponent, .JInternalFrame, .JMenuBar, .JPopupMenu, .UIManager, javax.swing.border.AbstractBorder, javax.swing.plaf.UIResource, sun.swing.SwingUtilities2

Factory object that can vend Icons appropriate for the basic L & F.
Author
Amy Fowler

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
public static class
public static class
public static class
public static class
public static class
public static class

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static void
drawBezel(Graphics g, int x, int y, int w, int h, boolean isPressed, boolean hasFocus, Color shadow, Color highlight, Color darkShadow, Color focus)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

MotifBordersback to summary
public MotifBorders()

Method Detail

drawBezelback to summary
public static void drawBezel(Graphics g, int x, int y, int w, int h, boolean isPressed, boolean hasFocus, Color shadow, Color highlight, Color darkShadow, Color focus)
com.sun.java.swing.plaf.motif back to summary

public Class MotifBorders.BevelBorder

extends AbstractBorder
implements UIResource
Class Inheritance
All Implemented Interfaces
javax.swing.plaf.UIResource
Annotations
@SuppressWarnings:serial

Field Summary

Modifier and TypeField and Description
private Color
private boolean
private Color

Constructor Summary

AccessConstructor and Description
public
BevelBorder(boolean isRaised, Color darkShadow, Color lightShadow)

Method Summary

Modifier and TypeMethod and Description
public Insets
getBorderInsets(Component c, Insets insets)

Overrides javax.swing.border.AbstractBorder.getBorderInsets.

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

public boolean
public void
paintBorder(Component c, Graphics g, int x, int y, int w, int h)

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

darkShadowback to summary
private Color darkShadow
isRaisedback to summary
private boolean isRaised
lightShadowback to summary
private Color lightShadow

Constructor Detail

BevelBorderback to summary
public BevelBorder(boolean isRaised, Color darkShadow, Color lightShadow)

Method Detail

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.

Annotations
@Override
isOpaqueback to summary
public boolean isOpaque(Component c)
paintBorderback to summary
public void paintBorder(Component c, Graphics g, int x, int y, int w, int h)

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.

Annotations
@Override
com.sun.java.swing.plaf.motif back to summary

public Class MotifBorders.ButtonBorder

extends AbstractBorder
implements UIResource
Class Inheritance
All Implemented Interfaces
javax.swing.plaf.UIResource
Known Direct Subclasses
com.sun.java.swing.plaf.motif.MotifBorders.ToggleButtonBorder, com.sun.java.swing.plaf.motif.MotifBorders.MenuBarBorder
Annotations
@SuppressWarnings:serial

Field Summary

Modifier and TypeField and Description
protected Color
protected Color
protected Color
protected Color

Constructor Summary

AccessConstructor and Description
public
ButtonBorder(Color shadow, Color highlight, Color darkShadow, Color focus)

Method Summary

Modifier and TypeMethod and Description
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 w, int h)

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

darkShadowback to summary
protected Color darkShadow
focusback to summary
protected Color focus
highlightback to summary
protected Color highlight
shadowback to summary
protected Color shadow

Constructor Detail

ButtonBorderback to summary
public ButtonBorder(Color shadow, Color highlight, Color darkShadow, Color focus)

Method Detail

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.

Annotations
@Override
paintBorderback to summary
public void paintBorder(Component c, Graphics g, int x, int y, int w, int h)

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.

Annotations
@Override
com.sun.java.swing.plaf.motif back to summary

public Class MotifBorders.FocusBorder

extends AbstractBorder
implements UIResource
Class Inheritance
All Implemented Interfaces
javax.swing.plaf.UIResource
Annotations
@SuppressWarnings:serial

Field Summary

Modifier and TypeField and Description
private Color
private Color

Constructor Summary

AccessConstructor and Description
public
FocusBorder(Color control, Color focus)

Method Summary

Modifier and TypeMethod and Description
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 w, int h)

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

controlback to summary
private Color control
focusback to summary
private Color focus

Constructor Detail

FocusBorderback to summary
public FocusBorder(Color control, Color focus)

Method Detail

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.

Annotations
@Override
paintBorderback to summary
public void paintBorder(Component c, Graphics g, int x, int y, int w, int h)

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.

Annotations
@Override
com.sun.java.swing.plaf.motif back to summary

public Class MotifBorders.FrameBorder

extends AbstractBorder
implements UIResource
Class Inheritance
All Implemented Interfaces
javax.swing.plaf.UIResource
Known Direct Subclasses
com.sun.java.swing.plaf.motif.MotifBorders.InternalFrameBorder
Annotations
@SuppressWarnings:serial

Field Summary

Modifier and TypeField and Description
public static final int
pack-priv Color
pack-priv Color
pack-priv Color
pack-priv JComponent

Constructor Summary

AccessConstructor and Description
public
FrameBorder(JComponent comp)

Constructs an FrameBorder for the JComponent comp.

Method Summary

Modifier and TypeMethod and Description
public JComponent
component()

Returns the FrameBorder's JComponent.

protected boolean
drawBottomBorder(Component c, Graphics g, int x, int y, int width, int height)

Draws the FrameBorder's bottom border.

protected boolean
drawLeftBorder(Component c, Graphics g, int x, int y, int width, int height)

Draws the FrameBorder's left border.

protected boolean
drawRightBorder(Component c, Graphics g, int x, int y, int width, int height)

Draws the FrameBorder's right border.

protected boolean
drawTopBorder(Component c, Graphics g, int x, int y, int width, int height)

Draws the FrameBorder's top border.

public Insets
getBorderInsets(Component c, Insets newInsets)

Overrides javax.swing.border.AbstractBorder.getBorderInsets.

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

protected Color
protected Color
protected Color
protected boolean
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.

Draws the FrameBorder in the given Rect.

public void
setComponent(JComponent comp)

Sets the FrameBorder's JComponent.

Inherited from javax.swing.border.AbstractBorder:
getBaselinegetBaselineResizeBehaviorgetBorderInsetsgetInteriorRectanglegetInteriorRectangleisBorderOpaque

Field Detail

BORDER_SIZEback to summary
public static final int BORDER_SIZE
frameColorback to summary
pack-priv Color frameColor
frameHighlightback to summary
pack-priv Color frameHighlight
frameShadowback to summary
pack-priv Color frameShadow
jcompback to summary
pack-priv JComponent jcomp

Constructor Detail

FrameBorderback to summary
public FrameBorder(JComponent comp)

Constructs an FrameBorder for the JComponent comp.

Method Detail

componentback to summary
public JComponent component()

Returns the FrameBorder's JComponent.

See Also
setComponent
drawBottomBorderback to summary
protected boolean drawBottomBorder(Component c, Graphics g, int x, int y, int width, int height)

Draws the FrameBorder's bottom border.

drawLeftBorderback to summary
protected boolean drawLeftBorder(Component c, Graphics g, int x, int y, int width, int height)

Draws the FrameBorder's left border.

drawRightBorderback to summary
protected boolean drawRightBorder(Component c, Graphics g, int x, int y, int width, int height)

Draws the FrameBorder's right border.

drawTopBorderback to summary
protected boolean drawTopBorder(Component c, Graphics g, int x, int y, int width, int height)

Draws the FrameBorder's top border.

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

Overrides javax.swing.border.AbstractBorder.getBorderInsets.

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

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

Annotations
@Override
getFrameColorback to summary
protected Color getFrameColor()
getFrameHighlightback to summary
protected Color getFrameHighlight()
getFrameShadowback to summary
protected Color getFrameShadow()
isActiveFrameback to summary
protected boolean isActiveFrame()
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.

Draws the FrameBorder in the given Rect. Calls drawTitleBar, drawLeftBorder, drawRightBorder and drawBottomBorder.

Annotations
@Override
setComponentback to summary
public void setComponent(JComponent comp)

Sets the FrameBorder's JComponent.

com.sun.java.swing.plaf.motif back to summary

public Class MotifBorders.InternalFrameBorder

extends FrameBorder
Class Inheritance
Annotations
@SuppressWarnings:serial

Field Summary

Modifier and TypeField and Description
public static final int
pack-priv JInternalFrame
Inherited from com.sun.java.swing.plaf.motif.MotifBorders.FrameBorder:
BORDER_SIZEframeColorframeHighlightframeShadowjcomp

Constructor Summary

AccessConstructor and Description
public
InternalFrameBorder(JInternalFrame aFrame)

Constructs an InternalFrameBorder for the InternalFrame aFrame.

Method Summary

Modifier and TypeMethod and Description
protected boolean
drawBottomBorder(Component c, Graphics g, int x, int y, int width, int height)

Overrides com.sun.java.swing.plaf.motif.MotifBorders.FrameBorder.drawBottomBorder.

Draws the InternalFrameBorder's bottom border.

protected boolean
drawLeftBorder(Component c, Graphics g, int x, int y, int width, int height)

Overrides com.sun.java.swing.plaf.motif.MotifBorders.FrameBorder.drawLeftBorder.

Draws the InternalFrameBorder's left border.

protected boolean
drawRightBorder(Component c, Graphics g, int x, int y, int width, int height)

Overrides com.sun.java.swing.plaf.motif.MotifBorders.FrameBorder.drawRightBorder.

Draws the InternalFrameBorder's right border.

protected boolean
drawTopBorder(Component c, Graphics g, int x, int y, int width, int height)

Overrides com.sun.java.swing.plaf.motif.MotifBorders.FrameBorder.drawTopBorder.

Draws the InternalFrameBorder's top border.

public JInternalFrame
frame()

Returns the InternalFrameBorder's InternalFrame.

protected boolean
public int
resizePartWidth()

Returns the width of the InternalFrameBorder's resize controls, appearing along the InternalFrameBorder's bottom border.

public void
setFrame(JInternalFrame aFrame)

Sets the InternalFrameBorder's InternalFrame.

Inherited from com.sun.java.swing.plaf.motif.MotifBorders.FrameBorder:
componentgetBorderInsetsgetFrameColorgetFrameHighlightgetFrameShadowpaintBordersetComponent

Field Detail

CORNER_SIZEback to summary
public static final int CORNER_SIZE
frameback to summary
pack-priv JInternalFrame frame

Constructor Detail

InternalFrameBorderback to summary
public InternalFrameBorder(JInternalFrame aFrame)

Constructs an InternalFrameBorder for the InternalFrame aFrame.

Method Detail

drawBottomBorderback to summary
protected boolean drawBottomBorder(Component c, Graphics g, int x, int y, int width, int height)

Overrides com.sun.java.swing.plaf.motif.MotifBorders.FrameBorder.drawBottomBorder.

Draws the InternalFrameBorder's bottom border.

Annotations
@Override
drawLeftBorderback to summary
protected boolean drawLeftBorder(Component c, Graphics g, int x, int y, int width, int height)

Overrides com.sun.java.swing.plaf.motif.MotifBorders.FrameBorder.drawLeftBorder.

Draws the InternalFrameBorder's left border.

Annotations
@Override
drawRightBorderback to summary
protected boolean drawRightBorder(Component c, Graphics g, int x, int y, int width, int height)

Overrides com.sun.java.swing.plaf.motif.MotifBorders.FrameBorder.drawRightBorder.

Draws the InternalFrameBorder's right border.

Annotations
@Override
drawTopBorderback to summary
protected boolean drawTopBorder(Component c, Graphics g, int x, int y, int width, int height)

Overrides com.sun.java.swing.plaf.motif.MotifBorders.FrameBorder.drawTopBorder.

Draws the InternalFrameBorder's top border.

Annotations
@Override
frameback to summary
public JInternalFrame frame()

Returns the InternalFrameBorder's InternalFrame.

See Also
setFrame
isActiveFrameback to summary
protected boolean isActiveFrame()

Overrides com.sun.java.swing.plaf.motif.MotifBorders.FrameBorder.isActiveFrame.

Annotations
@Override
resizePartWidthback to summary
public int resizePartWidth()

Returns the width of the InternalFrameBorder's resize controls, appearing along the InternalFrameBorder's bottom border. Clicking and dragging within these controls lets the user change both the InternalFrame's width and height, while dragging between the controls constrains resizing to just the vertical dimension. Override this method if you implement your own bottom border painting and use a resize control with a different size.

setFrameback to summary
public void setFrame(JInternalFrame aFrame)

Sets the InternalFrameBorder's InternalFrame.

com.sun.java.swing.plaf.motif back to summary

public Class MotifBorders.MotifPopupMenuBorder

extends AbstractBorder
implements UIResource
Class Inheritance
All Implemented Interfaces
javax.swing.plaf.UIResource
Annotations
@SuppressWarnings:serial

Field Summary

Modifier and TypeField and Description
protected Color
protected Font
protected Color
protected static final int
protected Color
protected Color
protected static final int

Constructor Summary

AccessConstructor and Description
public
MotifPopupMenuBorder(Font titleFont, Color bgColor, Color fgColor, Color shadow, Color highlight)

Creates a MotifPopupMenuBorder instance

Method Summary

Modifier and TypeMethod and Description
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.AbstractBorder.getBorderInsets.

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

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.AbstractBorder.paintBorder.

Implements javax.swing.border.Border.paintBorder.

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

Inherited from javax.swing.border.AbstractBorder:
getBaselinegetBaselineResizeBehaviorgetBorderInsetsgetInteriorRectanglegetInteriorRectangleisBorderOpaque

Field Detail

backgroundback to summary
protected Color background
fontback to summary
protected Font font
foregroundback to summary
protected Color foreground
GROOVE_HEIGHTback to summary
protected static final int GROOVE_HEIGHT
highlightColorback to summary
protected Color highlightColor
shadowColorback to summary
protected Color shadowColor
TEXT_SPACINGback to summary
protected static final int TEXT_SPACING

Constructor Detail

MotifPopupMenuBorderback to summary
public MotifPopupMenuBorder(Font titleFont, Color bgColor, Color fgColor, Color shadow, Color highlight)

Creates a MotifPopupMenuBorder instance

Method Detail

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

Overrides javax.swing.border.AbstractBorder.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

Annotations
@Override
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.

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

Annotations
@Override
com.sun.java.swing.plaf.motif back to summary

public Class MotifBorders.ToggleButtonBorder

extends ButtonBorder
Class Inheritance
Annotations
@SuppressWarnings:serial

Field Summary

Inherited from com.sun.java.swing.plaf.motif.MotifBorders.ButtonBorder:
darkShadowfocushighlightshadow

Constructor Summary

AccessConstructor and Description
public
ToggleButtonBorder(Color shadow, Color highlight, Color darkShadow, Color focus)

Method Summary

Modifier and TypeMethod and Description
public Insets
getBorderInsets(Component c, Insets insets)

Overrides com.sun.java.swing.plaf.motif.MotifBorders.ButtonBorder.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 com.sun.java.swing.plaf.motif.MotifBorders.ButtonBorder.paintBorder.

Implements javax.swing.border.Border.paintBorder.

This default implementation does no painting.

Constructor Detail

ToggleButtonBorderback to summary
public ToggleButtonBorder(Color shadow, Color highlight, Color darkShadow, Color focus)

Method Detail

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

Overrides com.sun.java.swing.plaf.motif.MotifBorders.ButtonBorder.getBorderInsets.

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

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

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

Overrides com.sun.java.swing.plaf.motif.MotifBorders.ButtonBorder.paintBorder.

Implements javax.swing.border.Border.paintBorder.

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

This default implementation does no painting.

Annotations
@Override