|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Dockable
Interface describing a component (AWT/Swing) that can be managed by the DockingDesktop.
Objects implementing this interface are usually wrappers around user components, or user components themselves.
DockablePanel
is a Dockable, and is used to display a
single user Component.
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 | |
---|---|
java.awt.Component |
getComponent()
returns the component wrapped. |
DockKey |
getDockKey()
returns the unique key identifying the docked element |
Method Detail |
---|
DockKey getDockKey()
java.awt.Component getComponent()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |