|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectartofillusion.ui.ToolButton
public abstract class ToolButton
A ToolButton provides the user interface for an EditingTool
in a ToolPalette
.
This is an abstract class. Subclasses implement paint()
to
determine the appearance of the button. DefaultToolButton
is the standard implementation
which is used by default, but themes may define their own subclasses to customize the appearance
and behavior of buttons.
A ToolButton is not a widget. Most often it is used inside a ToolPalette, which handles events,
layout, and so on for the ToolButtons it contains. If you want to display a ToolButton as an
independent widget, you can do that with the ToolButtonWidget
class.
Field Summary | |
---|---|
static int |
HIGHLIGHTED_STATE
|
static int |
NORMAL_STATE
|
static int |
SELECTED_STATE
|
Constructor Summary | |
---|---|
ToolButton(java.lang.Object owner)
Constructor for the ToolButton class. |
Method Summary | |
---|---|
int |
getHeight()
Returns the button height |
java.awt.Point |
getPosition()
Returns the button position |
java.awt.Dimension |
getSize()
returns the button size |
int |
getState()
Returns the button state. |
int |
getWidth()
Returns the button width |
boolean |
isHighlighted()
|
boolean |
isSelected()
|
abstract void |
paint(java.awt.Graphics2D g)
|
void |
setHighlighted(boolean highlighted)
Sets the button as highlighted. |
void |
setPosition(int x,
int y)
|
void |
setSelected(boolean selected)
Sets the button as selected. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int NORMAL_STATE
public static final int SELECTED_STATE
public static final int HIGHLIGHTED_STATE
Constructor Detail |
---|
public ToolButton(java.lang.Object owner)
owner
- The owner of the button. This allows for specific button behavior depending on the class
of the owner.Method Detail |
---|
public int getHeight()
public int getWidth()
public java.awt.Dimension getSize()
public int getState()
public void setSelected(boolean selected)
public void setHighlighted(boolean highlighted)
public boolean isSelected()
public boolean isHighlighted()
public abstract void paint(java.awt.Graphics2D g)
public void setPosition(int x, int y)
public java.awt.Point getPosition()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |