com.vlsolutions.swing.docking
public class DockableStoreButton extends JButton implements DockDropReceiver, DockableDragSource
The button is able to display the Icon, text and toolip of a dockable key, and can be used as a drag source (to initiate a drop into a desktop).
Constructor Summary | |
---|---|
DockableStoreButton(String emptyText) | |
DockableStoreButton() |
Method Summary | |
---|---|
void | endDragComponent(boolean dropped) |
Dockable | getDockable() Return the dockable currently stored (may be null) |
Container | getDockableContainer() |
Icon | getEmptyIcon() Returns the Icon used with this button when no dockable is selected |
String | getEmptyText() Returns the text used for this button when no dockable is stored |
String | getEmptyTooltip() Returns the text used as tooltip for this button when no dockable is stored |
String | getFullText() Returns the text used for this button when a dockable is stored |
String | getFullTooltip() Returns the text used for as tooltip this button when a dockable is stored |
void | processDockableDrag(DockDragEvent event) when a dockable is dragged above this button, the button stores it as its new
target dockable. |
void | processDockableDrop(DockDropEvent event) Rejects the drop as this action isn't possible on this component |
void | setDockable(Dockable dockable) |
void | setEmptyIcon(Icon emptyIcon) Updates the icon used for this button when no dockable is stored |
void | setEmptyText(String emptyText) updates the text used for this button when no dockable is stored |
void | setEmptyTooltip(String emptyTooltip) Updates the text used as tooltip for this button when no dockable is stored |
void | setFullText(String fullText) Returns the text used for this button when a dockable is stored |
void | setFullTooltip(String fullTooltip) Updates the text used as tooltip for this button when no dockable is stored.
|
boolean | startDragComponent(Point p) |
void | updateButtonText() Override this method if you want to change the display (text and icon) of this button and
the default settings don't suit your needs. |
See Also: getDockable
For example "&1 stored" could be replaced by "MyDockable stored"