com.vlsolutions.swing.docking
public interface Dockable
Objects implementing this interface are usually wrappers around user components, or user components themselves.
class MyComponent extends JPanel implements Dockable { // unique key for the docking desktop DockKey key = new DockKey("MyComponent"); public MyComponent(){ // build your user component here add(new JButton("Button")); add(new JTextField("Field")); // initialize docking properties key.setName("My Component"); key.setIcon(...); key.setCloseEnabled(false); } public DockKey getDockKey(){ return key; } public Component getComponent(){ // this component is the dockable return this; } }
Method Summary | |
---|---|
Component | getComponent() returns the component wrapped.
|
DockKey | getDockKey() returns the unique key identifying the docked element |