@ColorCodes(value="action.dropdown.arrow") public class DropDownIcon extends Object implements Icon
Icon is painted on buttons for DropDownActions. Usually this icon
looks like a small arrow pointing down, and clicking onto this icon should open a
drop down menu.| Constructor and Description |
|---|
DropDownIcon()
Creates a new icon.
|
| Modifier and Type | Method and Description |
|---|---|
DropDownAction |
getAction()
Gets the action for which this icon is used.
|
Icon |
getDisabledIcon()
Gets a disabled version of this icon.
|
int |
getIconHeight() |
int |
getIconWidth() |
JComponent |
getParent()
Gets the
Component on which this icon is painted. |
void |
init(Dockable dockable,
DropDownAction action,
ViewItem<? extends JComponent> parent)
Initializes this icon by setting missing properties.
|
boolean |
isInitialized()
Tells whether
init(Dockable, DropDownAction, ViewItem) has already been called. |
void |
paintIcon(Component c,
Graphics g,
int x,
int y) |
protected void |
resetIcon()
Recalculates what icon should be shown
|
void |
setController(DockController controller)
Links this icon with
controller, this icon may change is appearance
due to the properties stored in controller. |
public static final String ICON_KEY
public DropDownIcon()
init(Dockable, DropDownAction, ViewItem) to fully
utilize this icon.public void init(Dockable dockable, DropDownAction action, ViewItem<? extends JComponent> parent)
dockable - the owner of action, not nullaction - the action for which this icon is used, must not be nullparent - the JComponent on which this icon is painted, not null. Please
note that this component must not be cast into a subclass.public boolean isInitialized()
init(Dockable, DropDownAction, ViewItem) has already been called.true if this icon is initializedpublic DropDownAction getAction()
nullpublic JComponent getParent()
Component on which this icon is painted.nullpublic void setController(DockController controller)
controller, this icon may change is appearance
due to the properties stored in controller.controller - the properties to use or nullpublic Icon getDisabledIcon()
null, has always the same size as this iconpublic int getIconHeight()
getIconHeight in interface Iconpublic int getIconWidth()
getIconWidth in interface Iconprotected void resetIcon()
Copyright © 2017 Docking Frames. All rights reserved.