Package com.explodingpixels.macwidgets

## Class TriAreaComponent

- java.lang.Object
- - com.explodingpixels.macwidgets.TriAreaComponent

Direct Known Subclasses:
  `ComponentBottomBar`, `ComponentTopBar`

    public class TriAreaComponent
    extends java.lang.Object

A component that has three areas in which it widgets can be added.

### Constructor Summary

Constructors
`TriAreaComponent()` Creates a `TriAreaComponent` that uses a padding of 0 pixels between components and forcing ends to have the same widths
`TriAreaComponent​(int spacer_pixels)` Creates a `TriAreaComponent` that uses the given padding between components and forcing ends to have the same widths.
`TriAreaComponent​(int spacer_pixels, boolean forceSameWidth)` Creates a `TriAreaComponent` that uses the given padding between components.

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `addComponentToCenter​(javax.swing.JComponent toolToAdd)` Adds the given component to the center of this `TriAreaComponent`.
`void` `addComponentToCenter​(javax.swing.JComponent toolToAdd, int spacer_pixels)` Adds the given component to the center of this `TriAreaComponent`.
`void` `addComponentToLeft​(javax.swing.JComponent toolToAdd)` Adds the given component to the left side of this `TriAreaComponent`.
`void` `addComponentToLeft​(javax.swing.JComponent toolToAdd, int spacer_pixels)` Adds the given component to the left side of this `TriAreaComponent` followed by the given an empty space of the given pixel width.
`void` `addComponentToRight​(javax.swing.JComponent toolToAdd)` Adds the given component to the right side of this `TriAreaComponent`.
`void` `addComponentToRight​(javax.swing.JComponent toolToAdd, int spacer_pixels)` Adds the given component to the right side of this `TriAreaComponent`.
`protected int` `getCenterComponentCount()`
`javax.swing.JComponent` `getComponent()` Gets the user interface component representing this `SourceList`.
`protected int` `getLeftComponentCount()`
`protected int` `getRightComponentCount()`
`void` `installWindowDraggerOnWindow​(java.awt.Window window)` Installs a `WindowDragger` on the given `Window`.
`void` `setBackgroundPainter​(MacWidgetsPainter<java.awt.Component> backgroundPainter)` Set's the background `MacWidgetsPainter` that this `TriAreaComponent` uses.

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

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

### Constructor Detail

#### TriAreaComponent

    public TriAreaComponent()

Creates a `TriAreaComponent` that uses a padding of 0 pixels between components and forcing ends to have the same widths

#### TriAreaComponent

    public TriAreaComponent​(int spacer_pixels)

Creates a `TriAreaComponent` that uses the given padding between components and forcing ends to have the same widths.

Parameters:
  `spacer_pixels` - the space in pixels to add between components.

#### TriAreaComponent

    public TriAreaComponent​(int spacer_pixels,
                            boolean forceSameWidth)

Creates a `TriAreaComponent` that uses the given padding between components.

Parameters:
  `spacer_pixels` - the space in pixels to add between components.
  `forceSameWidth` - whether the two ends should have the same width to keep the component balanced.

### Method Detail

#### getComponent

    public javax.swing.JComponent getComponent()

Gets the user interface component representing this `SourceList`. The returned `JComponent` should be added to a container that will be displayed.

Returns:
  the user interface component representing this `SourceList` .

#### installWindowDraggerOnWindow

    public void installWindowDraggerOnWindow​(java.awt.Window window)

Installs a `WindowDragger` on the given `Window`.

Parameters:
  `window` - the `Window` to install the `WindowDragger` on.

#### addComponentToLeft

    public void addComponentToLeft​(javax.swing.JComponent toolToAdd)

Adds the given component to the left side of this `TriAreaComponent`.

Parameters:
  `toolToAdd` - the tool to add to this `TriAreaComponent`.

#### addComponentToLeft

    public void addComponentToLeft​(javax.swing.JComponent toolToAdd,
                                   int spacer_pixels)

Adds the given component to the left side of this `TriAreaComponent` followed by the given an empty space of the given pixel width.

Parameters:
  `toolToAdd` - the tool to add to this `TriAreaComponent`.
  `spacer_pixels` - the amount of space to post-pend the added component with.

#### addComponentToCenter

    public void addComponentToCenter​(javax.swing.JComponent toolToAdd)

Adds the given component to the center of this `TriAreaComponent`.

Parameters:
  `toolToAdd` - the tool to add to this `TriAreaComponent`.

#### addComponentToCenter

    public void addComponentToCenter​(javax.swing.JComponent toolToAdd,
                                     int spacer_pixels)

Adds the given component to the center of this `TriAreaComponent`. If this is not the first component to be added to the center, then the given component will be preceeded by a space of the given width.

Parameters:
  `toolToAdd` - the tool to add to this `TriAreaComponent`.
  `spacer_pixels` - the amount of space to pre-pend the added component with *if* the given component is *not* the first component to be added to the center.

#### addComponentToRight

    public void addComponentToRight​(javax.swing.JComponent toolToAdd)

Adds the given component to the right side of this `TriAreaComponent`.

Parameters:
  `toolToAdd` - the tool to add to this `TriAreaComponent`.

#### addComponentToRight

    public void addComponentToRight​(javax.swing.JComponent toolToAdd,
                                    int spacer_pixels)

Adds the given component to the right side of this `TriAreaComponent`. If this is not the first component to be added to the right, then the given component will be followed by a space of the given width.

Parameters:
  `toolToAdd` - the tool to add to this `TriAreaComponent`.
  `spacer_pixels` - the amount of space to post-pend the added component with *if* the given component is *not* the first component to be added to the center.

#### setBackgroundPainter

    public void setBackgroundPainter​(MacWidgetsPainter<java.awt.Component> backgroundPainter)

Set's the background `MacWidgetsPainter` that this `TriAreaComponent` uses.

Parameters:
  `backgroundPainter` - the background `MacWidgetsPainter` that this `TriAreaComponent` uses.

#### getLeftComponentCount

    protected final int getLeftComponentCount()

#### getCenterComponentCount

    protected final int getCenterComponentCount()

#### getRightComponentCount

    protected final int getRightComponentCount()