Overview | Package | Class | Tree | Deprecated | Index | Help
| Copyright 2012-04-26 Werner Randelshofer
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.monte.media.gui.border
Class ButtonStateBorder

    java.lang.Object
      org.monte.media.gui.border.ButtonStateBorder

All Implemented Interfaces:
  javax.swing.border.Border

    public class ButtonStateBorder

extends java.lang.Object
implements javax.swing.border.Border

ButtonStateBorder.

Version:
  1.2 2009-11-20 Added more constructors.
  1.1 2005-11-30 Method getBorderInsets() returns border insets from variable borderInsets, if it is not null. This allows to defer image loading until the border needs to be painted.
  1.0.4 2005-10-03 Draw default state only, if button is not pressed.
  1.0.3 2005-09-30 Draw pressed state only, if button state "isPressed" _and_ "isArmed" are true.
  1.0.2 2005-06-25 Return a new instance of insets in method getBorderInsets.
  1.0.1 2005-04-17 Blinking default button needs to be drawn on all window types, and not just on JDialog's.
  1.0 18 March 2005 Created.
Author:
  Werner Randelshofer

Field Summary
`static int` | `D`
`static int` | `DEFAULT`
`static int` | `DI`
`static int` | `DIS`
`static int` | `DS`
`static int` | `E`
`static int` | `EP`
`static int` | `EPS`
`static int` | `ES`
`static int` | `I`
`static int` | `IS`

Constructor Summary
`ButtonStateBorder(javax.swing.border.Border[] borders)` Creates a new instance.
`ButtonStateBorder(javax.swing.border.Border e, javax.swing.border.Border es)` Creates a new instance.
`ButtonStateBorder(javax.swing.border.Border e, javax.swing.border.Border ep, javax.swing.border.Border es, javax.swing.border.Border eps, javax.swing.border.Border d, javax.swing.border.Border ds, javax.swing.border.Border i, javax.swing.border.Border is, javax.swing.border.Border di, javax.swing.border.Border dis)` Creates a new instance.
`ButtonStateBorder(java.awt.Image tiledImage, int tileCount, boolean isTiledHorizontaly, java.awt.Insets imageInsets, java.awt.Insets borderInsets, boolean fill)` Creates a new instance.

Method Summary
`protected javax.swing.border.Border` | `getBorder(java.awt.Component c)`
`java.awt.Insets` | `getBorderInsets(java.awt.Component c)`
`boolean` | `isBorderOpaque()`
`void` | `paintBorder(java.awt.Component c, java.awt.Graphics g, int x, int y, int width, int height)`
`void` | `setBorder(int key, javax.swing.border.Border b)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### E

    public static final int E

See Also:
  Constant Field Values

### EP

    public static final int EP

See Also:
  Constant Field Values

### ES

    public static final int ES

See Also:
  Constant Field Values

### EPS

    public static final int EPS

See Also:
  Constant Field Values

### D

    public static final int D

See Also:
  Constant Field Values

### DS

    public static final int DS

See Also:
  Constant Field Values

### I

    public static final int I

See Also:
  Constant Field Values

### IS

    public static final int IS

See Also:
  Constant Field Values

### DI

    public static final int DI

See Also:
  Constant Field Values

### DIS

    public static final int DIS

See Also:
  Constant Field Values

### DEFAULT

    public static final int DEFAULT

See Also:
  Constant Field Values

Constructor Detail

### ButtonStateBorder

    public ButtonStateBorder(javax.swing.border.Border e,
                             javax.swing.border.Border es)

  Creates a new instance. All borders must have the same insets. If a border is null, nothing is drawn for this state.

### ButtonStateBorder

    public ButtonStateBorder(javax.swing.border.Border e,
                             javax.swing.border.Border ep,
                             javax.swing.border.Border es,
                             javax.swing.border.Border eps,
                             javax.swing.border.Border d,
                             javax.swing.border.Border ds,
                             javax.swing.border.Border i,
                             javax.swing.border.Border is,
                             javax.swing.border.Border di,
                             javax.swing.border.Border dis)

  Creates a new instance. All borders must have the same insets. If a border is null, nothing is drawn for this state.

### ButtonStateBorder

    public ButtonStateBorder(javax.swing.border.Border[] borders)

  Creates a new instance. All borders must have the same insets.

### ButtonStateBorder

    public ButtonStateBorder(java.awt.Image tiledImage,
                             int tileCount,
                             boolean isTiledHorizontaly,
                             java.awt.Insets imageInsets,
                             java.awt.Insets borderInsets,
                             boolean fill)

  Creates a new instance. All borders must have the same dimensions.

Method Detail

### setBorder

    public void setBorder(int key,
                          javax.swing.border.Border b)

### getBorderInsets

    public java.awt.Insets getBorderInsets(java.awt.Component c)

  Specified by:
    `getBorderInsets` in interface `javax.swing.border.Border`

### isBorderOpaque

    public boolean isBorderOpaque()

  Specified by:
    `isBorderOpaque` in interface `javax.swing.border.Border`

### paintBorder

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

  Specified by:
    `paintBorder` in interface `javax.swing.border.Border`

### getBorder

    protected javax.swing.border.Border getBorder(java.awt.Component c)

Overview | Package | Class | Tree | Deprecated | Index | Help
| Copyright 2012-04-26 Werner Randelshofer
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD