com.dlsc.flexgantt.swing.util

## Class Simple3DBorder

- java.lang.Object
- - com.dlsc.flexgantt.swing.util.Simple3DBorder

- All Implemented Interfaces:
    Border

      public class Simple3DBorder
      extends Object
      implements Border

  A simple 3D border with a line thickness of 1 pixel.
  Since:
    1.0
  Version:
    $Revision: 1.3 $
  Author:
    Dirk Lemmermann

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `Simple3DBorder()` Constructs a new (raised) border.
    `Simple3DBorder(boolean raised)` Constructs a new border.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Insets` | `getBorderInsets(Component comp)` Returns insets;
    `boolean` | `isBorderOpaque()` Always returns TRUE.
    `boolean` | `isRaised()` Returns TRUE if the border is drawn raised.
    `void` | `paintBorder(Component c, Graphics g, int x, int y, int width, int height)` Paints the 3D rectangle around the given component.
    `void` | `setBorderInsets(Insets insets)` Changes the insets of the border.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### Simple3DBorder

          public Simple3DBorder(boolean raised)

      Constructs a new border.
      Parameters:
        `raised` - if TRUE the 3D border will be drawn raised instead of sunken.
      Since:
        1.0

    - #### Simple3DBorder

          public Simple3DBorder()

      Constructs a new (raised) border.
      Since:
        1.0

  - ### Method Detail

    - #### isRaised

          public boolean isRaised()

      Returns TRUE if the border is drawn raised.
      Returns:
        TRUE if the border gets drawn raised.
      Since:
        1.0

    - #### isBorderOpaque

          public boolean isBorderOpaque()

      Always returns TRUE. This method is part of the Swing Border interface and indicates whether or not the border will be opaque or not. In this case the border is always opaque.
      Specified by:
        `isBorderOpaque` in interface `Border`
      Returns:
        always TRUE
      Since:
        1.0
      See Also:
        `Border.isBorderOpaque()`

    - #### getBorderInsets

          public Insets getBorderInsets(Component comp)

      Returns insets;
      Specified by:
        `getBorderInsets` in interface `Border`
      Parameters:
        `comp` - the component for which to draw the border
      Returns:
        the border's insets
      Since:
        1.0
      See Also:
        `Border.getBorderInsets(Component)`

    - #### setBorderInsets

          public void setBorderInsets(Insets insets)

      Changes the insets of the border.
      Parameters:
        `insets` - the border's insets
      Since:
        1.0

    - #### paintBorder

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

      Paints the 3D rectangle around the given component.
      Specified by:
        `paintBorder` in interface `Border`
      Parameters:
        `c` - the component for which to draw a border
        `g` - the graphics context to use for rendering operations
        `x` - the x-coordinate for the border
        `y` - the y-coordinate for the border
        `width` - the width of the border
        `height` - the height of the border
      Since:
        1.0
      See Also:
        `Border.paintBorder(Component, Graphics, int, int, int, int)`

Copyright © 2006–2020 Dirk Lemmermann Software & Consulting. All rights reserved.