|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
bibliothek.gui.dock.themes.basic.action.buttons.MiniButton<M>
M - the type of model used to describe the state of this buttonpublic class MiniButton<M extends BasicButtonModel>
A small Component used as view of a BasicButtonModel.
A MiniButton just changes its border when the states of its model changes.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class javax.swing.JComponent |
|---|
JComponent.AccessibleJComponent |
| Nested classes/interfaces inherited from class java.awt.Container |
|---|
Container.AccessibleAWTContainer |
| Nested classes/interfaces inherited from class java.awt.Component |
|---|
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy |
| 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 java.awt.image.ImageObserver |
|---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
|---|---|
MiniButton(M model)
Creates a new button |
|
| Method Summary | |
|---|---|
protected Insets |
getMaxBorderInsets()
Gets the maximal insets of this button |
M |
getModel()
Gets the model which is used to store the properties of this button. |
Border |
getMouseOverBorder()
Gets the border which is used when the mouse is over this button, but not pressed. |
Border |
getMouseOverSelectedBorder()
Gets the border which is used when the mouse is over this button and this button is selected. |
Border |
getMousePressedBorder()
Gets the border which is shown when the mouse is pressed and over this button. |
Border |
getMousePressedSelectedBorder()
Gets the border which is used when the mouse is pressed and this button is selected. |
Border |
getNormalBorder()
Gets the default-border. |
Border |
getNormalSelectedBorder()
Gets the border which is used when this button is selected. |
Dimension |
getPreferredSize()
|
void |
paint(Graphics g)
|
protected void |
paintFocus(Graphics g)
Paints markings on this button when this button is the focus owner. |
protected void |
paintIcon(Icon icon,
Graphics g)
Paints the icon in the center of this button. |
protected void |
setModel(M model)
Sets the model of this button. |
void |
setMouseOverBorder(Border mouseOverBorder)
Sets the border which is shown when the mouse is over this button, but not pressed. |
void |
setMouseOverSelectedBorder(Border mouseOverSelectedBorder)
Sets the border which is used when the mouse is over this button and this button is selected. |
void |
setMousePressedBorder(Border mousePressedBorder)
Sets the border which is shown when the mouse is pressed and over this button. |
void |
setMousePressedSelectedBorder(Border mousePressedSelectedBorder)
Sets the border which is used when the mouse is pressed and this button is selected. |
void |
setNormalBorder(Border normalBorder)
Sets the default-border. |
void |
setNormalSelectedBorder(Border normalSelectedBorder)
Sets the border which is used when this button is selected. |
protected void |
updateBorder()
Changes the current border. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public MiniButton(M model)
model - the model for this button| Method Detail |
|---|
protected void setModel(M model)
model - the modelpublic M getModel()
public Border getMouseOverBorder()
nullpublic void setMouseOverBorder(Border mouseOverBorder)
mouseOverBorder - the border, can be nullpublic Border getMousePressedBorder()
nullsetMousePressedBorder(Border)public void setMousePressedBorder(Border mousePressedBorder)
mousePressedBorder - the border, can be nullpublic Border getNormalBorder()
nullpublic void setNormalBorder(Border normalBorder)
normalBorder - the border, can be nullpublic Border getNormalSelectedBorder()
public void setNormalSelectedBorder(Border normalSelectedBorder)
normalSelectedBorder - the selected borderpublic Border getMouseOverSelectedBorder()
public void setMouseOverSelectedBorder(Border mouseOverSelectedBorder)
mouseOverSelectedBorder - the new borderpublic Border getMousePressedSelectedBorder()
public void setMousePressedSelectedBorder(Border mousePressedSelectedBorder)
mousePressedSelectedBorder - the new borderpublic void paint(Graphics g)
paint in class JComponent
protected void paintIcon(Icon icon,
Graphics g)
icon in the center of this button.
icon - the icon to paintg - the graphics contextprotected void paintFocus(Graphics g)
g - the graphics context
@Todo(compatibility=BREAK_MINOR,
priority=ENHANCEMENT,
target=VERSION_1_1_0,
description="dont hardcode the minimum size")
public Dimension getPreferredSize()
getPreferredSize in class JComponentprotected Insets getMaxBorderInsets()
protected void updateBorder()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||