com.explodingpixels.macwidgets

## Class BottomBar

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

-     public class BottomBar
      extends Object

  A Mac style Bottom Bar. For a full descrption of what a Bottom Bar is, see the Bottom Bars section of Apple's Human Interface Guidelines. Here's an example of what this method cretes:
  Here's a simple example that creates a Bottom Bar:

       BottomBar bottomBar = BottomBar(BottomBarSize.LARGE);
       bottomBar.addComponentToCenter(MacWidgetFactory.createEmphasizedLabel("My Label"));

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected static Color` | `ACTIVE_BOTTOM_COLOR`
    `protected static Color` | `ACTIVE_TOP_COLOR`
    `protected static Color` | `BORDER_HIGHLIGHT_COLOR`
    `protected TriAreaComponent` | `fBottomBar`
    `protected com.explodingpixels.macwidgets.BottomBar.SplitterHandleMouseMovementHandler` | `fMouseListener`
    `protected JSplitPane` | `fSplitPane`
    `protected static Color` | `INACTIVE_BOTTOM_COLOR`
    `protected static Color` | `INACTIVE_TOP_COLOR`
    `protected static Color` | `LEOPARD_ACTIVE_BOTTOM_COLOR`
    `protected static Color` | `LEOPARD_ACTIVE_TOP_COLOR`
    `protected static Color` | `LEOPARD_BORDER_HIGHLIGHT_COLOR`
    `protected static Color` | `LEOPARD_INACTIVE_BOTTOM_COLOR`
    `protected static Color` | `LEOPARD_INACTIVE_TOP_COLOR`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `BottomBar(BottomBarSize size)` Creates a `BottomBar` of the given size.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addComponentToCenter(JComponent toolToAdd)` Adds the given component to the side of this `BottomBar`.
    `void` | `addComponentToCenter(JComponent toolToAdd, int spacer_pixels)` Adds the given component to the center of this `BottomBar`.
    `void` | `addComponentToLeft(JComponent toolToAdd)` Adds the given component to the left side of this `BottomBar`.
    `void` | `addComponentToLeft(JComponent toolToAdd, int spacer_pixels)` Adds the given component to the left side of this `BottomBar` followed by the given an empty space of the given pixel width.
    `void` | `addComponentToRight(JComponent toolToAdd)` Adds the given component to the right side of this `BottomBar`.
    `void` | `addComponentToRight(JComponent toolToAdd, int spacer_pixels)` Adds the given component to the right side of this `BottomBar`.
    `void` | `forceAreasToHaveTheSameWidth()`
    `void` | `forceOuterAreasToHaveTheSameWidth()`
    `JComponent` | `getComponent()` Gets the user interface component representing this `BottomBar`.
    `void` | `installDraggableWidgetOnSplitPane(JSplitPane splitPane)` Connects the draggable widget in this `BottomBar` to the divider of the given `JSplitPane`.
    `void` | `installWindowDraggerOnWindow(Window window)` Installs a drag listener on this `BottomBar` such that if it is dragged, it will move the given `Window`.

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

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

- - ### Field Detail

    - #### fBottomBar

          protected final TriAreaComponent fBottomBar

    - #### fSplitPane

          protected JSplitPane fSplitPane

    - #### fMouseListener

          protected final com.explodingpixels.macwidgets.BottomBar.SplitterHandleMouseMovementHandler fMouseListener

    - #### ACTIVE_TOP_COLOR

          protected static final Color ACTIVE_TOP_COLOR

    - #### ACTIVE_BOTTOM_COLOR

          protected static final Color ACTIVE_BOTTOM_COLOR

    - #### INACTIVE_TOP_COLOR

          protected static final Color INACTIVE_TOP_COLOR

    - #### INACTIVE_BOTTOM_COLOR

          protected static final Color INACTIVE_BOTTOM_COLOR

    - #### BORDER_HIGHLIGHT_COLOR

          protected static final Color BORDER_HIGHLIGHT_COLOR

    - #### LEOPARD_ACTIVE_TOP_COLOR

          protected static final Color LEOPARD_ACTIVE_TOP_COLOR

    - #### LEOPARD_ACTIVE_BOTTOM_COLOR

          protected static final Color LEOPARD_ACTIVE_BOTTOM_COLOR

    - #### LEOPARD_INACTIVE_TOP_COLOR

          protected static final Color LEOPARD_INACTIVE_TOP_COLOR

    - #### LEOPARD_INACTIVE_BOTTOM_COLOR

          protected static final Color LEOPARD_INACTIVE_BOTTOM_COLOR

    - #### LEOPARD_BORDER_HIGHLIGHT_COLOR

          protected static final Color LEOPARD_BORDER_HIGHLIGHT_COLOR

  - ### Constructor Detail

    - #### BottomBar

          public BottomBar(BottomBarSize size)

      Creates a `BottomBar` of the given size.
      Parameters:
        `size` - the height of the `BottomBar`.

  - ### Method Detail

    - #### addComponentToLeft

          public void addComponentToLeft(JComponent toolToAdd)

      Adds the given component to the left side of this `BottomBar`.
      Parameters:
        `toolToAdd` - the tool to add to this `BottomBar`.

    - #### addComponentToLeft

          public void addComponentToLeft(JComponent toolToAdd,
                                int spacer_pixels)

      Adds the given component to the left side of this `BottomBar` followed by the given an empty space of the given pixel width.
      Parameters:
        `toolToAdd` - the tool to add to this `BottomBar`.
        `spacer_pixels` - the amount of space to post-pend the added component with.

    - #### addComponentToCenter

          public void addComponentToCenter(JComponent toolToAdd)

      Adds the given component to the side of this `BottomBar`.
      Parameters:
        `toolToAdd` - the tool to add to this `BottomBar`.

    - #### addComponentToCenter

          public void addComponentToCenter(JComponent toolToAdd,
                                  int spacer_pixels)

      Adds the given component to the center of this `BottomBar`. 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 `BottomBar`.
        `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(JComponent toolToAdd)

      Adds the given component to the right side of this `BottomBar`.
      Parameters:
        `toolToAdd` - the tool to add to this `BottomBar`.

    - #### addComponentToRight

          public void addComponentToRight(JComponent toolToAdd,
                                 int spacer_pixels)

      Adds the given component to the right side of this `BottomBar`. 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 `BottomBar`.
        `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.

    - #### installWindowDraggerOnWindow

          public void installWindowDraggerOnWindow(Window window)

      Installs a drag listener on this `BottomBar` such that if it is dragged, it will move the given `Window`.
      Parameters:
        `window` - the `Window` to move when the this `BottomBar` is dragged.

    - #### getComponent

          public JComponent getComponent()

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

    - #### forceAreasToHaveTheSameWidth

          public void forceAreasToHaveTheSameWidth()

    - #### forceOuterAreasToHaveTheSameWidth

          public void forceOuterAreasToHaveTheSameWidth()

    - #### installDraggableWidgetOnSplitPane

          public void installDraggableWidgetOnSplitPane(JSplitPane splitPane)

      Connects the draggable widget in this `BottomBar` to the divider of the given `JSplitPane`. Thus when the user drags the `BottomBar` draggable widget, the given `JSplitPane`s divider location will be adjusted.
      Parameters:
        `splitPane` - the `JSplitPane` to connect the draggable widget to.