org.tigris.swidgets
Class PopupToolBoxButton
JButtonorg.tigris.swidgets.PopupToolBoxButton
public class PopupToolBoxButton
extends JButton
An extension of JButton to which alternative actions can be added.
The button to trigger these actions become available when a
dropdown icon is pressed on this button.
PopupToolBoxButton(Action a, int rows, int cols)- Creates a new instance of PopupToolboxButton
|
JButton | add(Action a)- Add a new action to appear as a button on the
popup toolbox
|
void | paint(Graphics g)
|
void | setAction(Action a)- Provide a new default action for this button
|
void | showSplitter(Color c, Graphics g, int x, int y, int height)
|
void | showSplitter(boolean show)
|
PopupToolBoxButton
public PopupToolBoxButton(Action a,
int rows,
int cols)Creates a new instance of PopupToolboxButton
a - The default action when pressing this buttonrows - The number of rows of buttons to display in the
popup toolboxcols - The number of columns of buttons to display in the
popup toolbox
add
public JButton add(Action a)
Add a new action to appear as a button on the
popup toolbox
a - The action to be added
- The button generated to trigger the action
paint
public void paint(Graphics g)
java.awt.Component.paint(java.awt.Graphics)
setAction
public void setAction(Action a)
Provide a new default action for this button
a - The new default action
showSplitter
public void showSplitter(Color c,
Graphics g,
int x,
int y,
int height)c - the colorg - the graphicsx - the x-coordinate of the vertical line that
represents the splittery - the y-coordinate of the bottom of the splitter lineheight - the height of the splitter line
showSplitter
public void showSplitter(boolean show)
show - to show or not to show