com.explodingpixels.macwidgets
Class TriAreaComponent

java.lang.Object
  extended by com.explodingpixels.macwidgets.TriAreaComponent
Direct Known Subclasses:
ComponentBottomBar, ComponentTopBar

public class TriAreaComponent
extends Object

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


Method Summary
 void addComponentToCenter(JComponent toolToAdd)
          Adds the given component to the center of this TriAreaComponent.
 void addComponentToCenter(JComponent toolToAdd, int spacer_pixels)
          Adds the given component to the center of this TriAreaComponent.
 void addComponentToLeft(JComponent toolToAdd)
          Adds the given component to the left side of this TriAreaComponent.
 void addComponentToLeft(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(JComponent toolToAdd)
          Adds the given component to the right side of this TriAreaComponent.
 void addComponentToRight(JComponent toolToAdd, int spacer_pixels)
          Adds the given component to the right side of this TriAreaComponent.
protected  int getCenterComponentCount()
           
 JComponent getComponent()
           
protected  int getLeftComponentCount()
           
protected  int getRightComponentCount()
           
 void installWindowDraggerOnWindow(Window window)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getComponent

public JComponent getComponent()

installWindowDraggerOnWindow

public void installWindowDraggerOnWindow(Window window)

addComponentToLeft

public void addComponentToLeft(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(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(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(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(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(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.

getLeftComponentCount

protected final int getLeftComponentCount()

getCenterComponentCount

protected final int getCenterComponentCount()

getRightComponentCount

protected final int getRightComponentCount()