Package com.explodingpixels.macwidgets
Class TriAreaComponent
java.lang.Object
com.explodingpixels.macwidgets.TriAreaComponent
- Direct Known Subclasses:
ComponentBottomBar
,ComponentTopBar
A component that has three areas in which it widgets can be added.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates aTriAreaComponent
that uses a padding of 0 pixels between components and forcing ends to have the same widthsTriAreaComponent
(int spacer_pixels) Creates aTriAreaComponent
that uses the given padding between components and forcing ends to have the same widths.TriAreaComponent
(int spacer_pixels, boolean forceSameWidth) Creates aTriAreaComponent
that uses the given padding between components. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addComponentToCenter
(JComponent toolToAdd) Adds the given component to the center of thisTriAreaComponent
.void
addComponentToCenter
(JComponent toolToAdd, int spacer_pixels) Adds the given component to the center of thisTriAreaComponent
.void
addComponentToLeft
(JComponent toolToAdd) Adds the given component to the left side of thisTriAreaComponent
.void
addComponentToLeft
(JComponent toolToAdd, int spacer_pixels) Adds the given component to the left side of thisTriAreaComponent
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 thisTriAreaComponent
.void
addComponentToRight
(JComponent toolToAdd, int spacer_pixels) Adds the given component to the right side of thisTriAreaComponent
.protected final int
Gets the user interface component representing thisSourceList
.protected final int
protected final int
void
installWindowDraggerOnWindow
(Window window) Installs aWindowDragger
on the givenWindow
.void
setBackgroundPainter
(MacWidgetsPainter<Component> backgroundPainter) Set's the backgroundMacWidgetsPainter
that thisTriAreaComponent
uses.
-
Constructor Details
-
TriAreaComponent
public TriAreaComponent()Creates aTriAreaComponent
that uses a padding of 0 pixels between components and forcing ends to have the same widths -
TriAreaComponent
public TriAreaComponent(int spacer_pixels) Creates aTriAreaComponent
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 aTriAreaComponent
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 Details
-
getComponent
Gets the user interface component representing thisSourceList
. The returnedJComponent
should be added to a container that will be displayed.- Returns:
- the user interface component representing this
SourceList
.
-
installWindowDraggerOnWindow
Installs aWindowDragger
on the givenWindow
.- Parameters:
window
- theWindow
to install theWindowDragger
on.
-
addComponentToLeft
Adds the given component to the left side of thisTriAreaComponent
.- Parameters:
toolToAdd
- the tool to add to thisTriAreaComponent
.
-
addComponentToLeft
Adds the given component to the left side of thisTriAreaComponent
followed by the given an empty space of the given pixel width.- Parameters:
toolToAdd
- the tool to add to thisTriAreaComponent
.spacer_pixels
- the amount of space to post-pend the added component with.
-
addComponentToCenter
Adds the given component to the center of thisTriAreaComponent
.- Parameters:
toolToAdd
- the tool to add to thisTriAreaComponent
.
-
addComponentToCenter
Adds the given component to the center of thisTriAreaComponent
. 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 thisTriAreaComponent
.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
Adds the given component to the right side of thisTriAreaComponent
.- Parameters:
toolToAdd
- the tool to add to thisTriAreaComponent
.
-
addComponentToRight
Adds the given component to the right side of thisTriAreaComponent
. 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 thisTriAreaComponent
.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
Set's the backgroundMacWidgetsPainter
that thisTriAreaComponent
uses.- Parameters:
backgroundPainter
- the backgroundMacWidgetsPainter
that thisTriAreaComponent
uses.
-
getLeftComponentCount
protected final int getLeftComponentCount() -
getCenterComponentCount
protected final int getCenterComponentCount() -
getRightComponentCount
protected final int getRightComponentCount()
-