Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.jgoodies.clearlook
Class NetBeansClearLookPolicy

    java.lang.Object
      com.jgoodies.clearlook.DefaultClearLookPolicy
          com.jgoodies.clearlook.NetBeansClearLookPolicy

All Implemented Interfaces:
  ClearLookPolicy

public final class NetBeansClearLookPolicy
extends DefaultClearLookPolicy

An implementation of `ClearLookPolicy` for use in NetBeans based environments. In addition to its superclass, it detects special contexts that appear in NetBeand, and it replaces some NetBeans borders:

1. `JLabel` used as status bar cell
2. `JPanel` with obsolete border
3. `JTabbedPane` with obsolete border

Author:
  Karsten Lentzsch
See Also:
  `ClearLookManager`, `DefaultClearLookPolicy`

Field Summary
`static String` | `NB_MULTITABBED_CONT`
`static String` | `NB_PERIMETER_PANE`
`protected static Border` | `ORANGE1_BORDER`
`protected static Border` | `ORANGE2_BORDER`

Fields inherited from class com.jgoodies.clearlook.DefaultClearLookPolicy
`EMPTY_BORDER, MARKER_BORDER, PINK1_BORDER, PINK2_BORDER, RED1_BORDER, RED2_BORDER`

Constructor Summary
`NetBeansClearLookPolicy()` Constructs a `NetBeansClearLookPolicy`.

Method Summary
`Border` | `analyse(JComponent component)` Detects borders situations that are considered to be visual clutter.
`Border` | `analyse(JLabel label)` Detects NetBeans status cells.
`Border` | `analyse(JPanel panel)` Detects special NetBeans panels. and conditionally replaces the `Border` of the specified `JPanel`.
`Border` | `analyse(JScrollPane scrollPane)` Detects and conditionally replaces the `Border` of the specified `JScrollPane`.
`String` | `getName()` Returns the policy's name.
`protected boolean` | `isDecoratedChild(Component c)` Returns if the specified compoent is decorated.
`protected boolean` | `isDecoratingParent(Component c)` Returns if the specified `JComponent` is decorated.
`protected boolean` | `isInstanceOf(Object object, String className)` Checks and answers if the given object is an instance of the specified class name.
`protected boolean` | `isKindOfSplitPane(Component component)` Answers if the specified is kind-of `SplitPane`.
`Border` | `replaceBorder(JComponent component)` Detects and conditionally replaces the `Border` of the specified `JComponent`.

Methods inherited from class com.jgoodies.clearlook.DefaultClearLookPolicy
`analyse, analyse, assignBorder, getDoubleDecorationBorder, getScrollPaneReplacementBorder, getSplitPaneReplacementBorder, getThinBevelBorder, getThinLoweredBevelBorder, getThinRaisedBevelBorder, hasEmptyBorder, isChildDecoration, isDebug, isDecoratedSplitPane, isDecoration, isDoubleDecorated, isEmptyBorder, isInternalFrameContent, isParentDecoration, log`

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

Field Detail

### ORANGE1_BORDER

    protected static final Border ORANGE1_BORDER

### ORANGE2_BORDER

    protected static final Border ORANGE2_BORDER

### NB_PERIMETER_PANE

    public static final String NB_PERIMETER_PANE

See Also:
  Constant Field Values

### NB_MULTITABBED_CONT

    public static final String NB_MULTITABBED_CONT

See Also:
  Constant Field Values

Constructor Detail

### NetBeansClearLookPolicy

    public NetBeansClearLookPolicy()

  Constructs a `NetBeansClearLookPolicy`.

Method Detail

### getName

    public String getName()

  Description copied from interface: `ClearLookPolicy`
  Returns the policy's name.

  Specified by:
    `getName` in interface `ClearLookPolicy`
  Overrides:
    `getName` in class `DefaultClearLookPolicy`

### replaceBorder

    public Border replaceBorder(JComponent component)

  Description copied from class: `DefaultClearLookPolicy`
  Detects and conditionally replaces the `Border` of the specified `JComponent`. Returns the original `Border`, or `null` if we did not replace it.

  Specified by:
    `replaceBorder` in interface `ClearLookPolicy`
  Overrides:
    `replaceBorder` in class `DefaultClearLookPolicy`
  Parameters:
    `component` - the component to be inspected
  Returns:
    the original border in case of a replacement, `null` otherwise

### analyse

    public Border analyse(JComponent component)

  Detects borders situations that are considered to be visual clutter.

  Overrides:
    `analyse` in class `DefaultClearLookPolicy`
  Parameters:
    `component` - the component to analyze
  Returns:
    the suggested replacement border

### analyse

    public Border analyse(JLabel label)

  Detects NetBeans status cells. Returns a status cell replacement border.

### analyse

    public Border analyse(JPanel panel)

  Detects special NetBeans panels. and conditionally replaces the `Border` of the specified `JPanel`. Answers the original `Border`, or `null` if we did not replace it.

### analyse

    public Border analyse(JScrollPane scrollPane)

  Detects and conditionally replaces the `Border` of the specified `JScrollPane`. Answers the original `Border`, or `null` if we did not replace it.

  Overrides:
    `analyse` in class `DefaultClearLookPolicy`
  Parameters:
    `scrollPane` - the component to analyze
  Returns:
    the suggested replacement border

### isDecoratedChild

    protected boolean isDecoratedChild(Component c)

  Returns if the specified compoent is decorated.

  Overrides:
    `isDecoratedChild` in class `DefaultClearLookPolicy`
  Parameters:
    `c` - the component to analyse
  Returns:
    true if the child is decorated

### isDecoratingParent

    protected boolean isDecoratingParent(Component c)

  Description copied from class: `DefaultClearLookPolicy`
  Returns if the specified `JComponent` is decorated. This default implementation checks, if the component's border is decorated.

  Subclasses may check for special decorators.

  Overrides:
    `isDecoratingParent` in class `DefaultClearLookPolicy`
  Parameters:
    `c` - the parent component to analyse
  Returns:
    true if the parent is decorating its child(ren)

### isKindOfSplitPane

    protected boolean isKindOfSplitPane(Component component)

  Answers if the specified is kind-of `SplitPane`. Subclasses may override to widen the set of panels, that is considered as candidates to remove child borders.

  Overrides:
    `isKindOfSplitPane` in class `DefaultClearLookPolicy`
  Parameters:
    `component` - the component to be analysed
  Returns:
    true if the component is to be treated like a split pane

### isInstanceOf

    protected final boolean isInstanceOf(Object object,
                                         String className)

  Checks and answers if the given object is an instance of the specified class name.

  Parameters:
    `object` - the instance to check
    `className` - the name of the class
  Returns:
    true if object is an instance of the specified class

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2001-2004 JGoodies Karsten Lentzsch. All Rights Reserved.