|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.Component | +--java.awt.Container | +--javax.swing.JComponent | +--javax.swing.JToolBar | +--org.jscroll.components.ResizableToolBar
Generic self-contained resizable toolbar class. When a button addition exceeds the width of the toolbar container, all buttons within the container are automatically resized to compensate, down to the minimum button width defined upon creation of the ResizableToolbar instance.
Field Summary |
Fields inherited from class javax.swing.JComponent |
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface javax.swing.SwingConstants |
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST |
Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
ResizableToolBar(int minButtonWidth,
int maxButtonWidth)
creates the ResizableToolbar object |
Method Summary | |
void |
add(AbstractButton button)
adds a button to the ResizableToolbar |
void |
componentHidden(ComponentEvent e)
interface placeholder |
void |
componentMoved(ComponentEvent e)
interface placeholder |
void |
componentResized(ComponentEvent e)
resize the buttons when the ResizableToolbar itself is resized |
void |
componentShown(ComponentEvent e)
interface placeholder |
int |
getButtonCount()
returns the number of buttons stored within the ResizableToolbar |
Enumeration |
getElements()
returns the ResizableToolbar elements |
void |
remove(AbstractButton button)
removes a button from the ResizableToolbar |
Methods inherited from class javax.swing.JToolBar |
add, addImpl, addSeparator, addSeparator, createActionChangeListener, createActionComponent, getAccessibleContext, getComponentAtIndex, getComponentIndex, getMargin, getOrientation, getUI, getUIClassID, isBorderPainted, isFloatable, isRollover, paintBorder, paramString, setBorderPainted, setFloatable, setLayout, setMargin, setOrientation, setRollover, setUI, updateUI |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public ResizableToolBar(int minButtonWidth, int maxButtonWidth)
minButtonWidth
- the minimum button width allowedmaxButtonWidth
- the maximum button width allowedMethod Detail |
public void add(AbstractButton button)
button
- the button to addpublic void remove(AbstractButton button)
button
- the button to removepublic Enumeration getElements()
public int getButtonCount()
public void componentResized(ComponentEvent e)
componentResized
in interface ComponentListener
e
- the ComponentEventpublic void componentShown(ComponentEvent e)
componentShown
in interface ComponentListener
e
- the ComponentEventpublic void componentMoved(ComponentEvent e)
componentMoved
in interface ComponentListener
e
- the ComponentEventpublic void componentHidden(ComponentEvent e)
componentHidden
in interface ComponentListener
e
- the ComponentEvent
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |