|
Extension SDK | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectoracle.ide.addin.AbstractView
oracle.ide.docking.DockableWindow
This class is the bridge between the Dockable
interface
docking system and the View
interface.
Addin writers should extend this class and not implement Dockable
directly.
Field Summary | |
static int |
CLOSED
stateChange constant. |
static int |
HIDDEN
stateChange constant. |
static int |
SHOWN
stateChange constant. |
Fields inherited from class oracle.ide.addin.AbstractView |
owner, SEPARATOR, viewListeners, viewSelectionListeners |
Fields inherited from interface oracle.ide.docking.Dockable |
TYPE_DISCARDABLE, TYPE_NO_BUTTONS, TYPE_NORMAL, TYPE_NOT_TABBED, TYPE_RECYCLABLE, TYPE_TRUNCATE_TITLE |
Fields inherited from interface oracle.ide.addin.View |
PROJECT_PROP, VISIBLE_PROP, WORKSPACE_PROP |
Constructor Summary | |
protected |
DockableWindow(View owner,
java.lang.String viewId)
Constructor. |
Method Summary | |
void |
addTitleChangeListener(TitleChangeListener l)
Adds a title change listener to a dockable. |
void |
close()
Closes the view. |
protected void |
dockableHidden(DockableEvent e)
|
protected void |
dockableShown(DockableEvent e)
|
protected void |
fireTitleChangeListener()
|
protected Dockable |
getCachedDockable()
This method returns the Dockable as know by the docking system based on the view ID. |
javax.swing.JComponent |
getHostedComponent()
Gets the root component of the user interface to be docked or floated. |
int |
getMenuPreferredMnemonic()
Gets mnemonic used in the menus of the docking for showing/hiding the dockable. |
java.lang.String |
getMenuTitle()
Gets the text to display in the menus of the docking for showing/hiding the dockable. |
Site |
getSite()
Gets a storage object for docking information. |
java.awt.dnd.DropTargetListener |
getTabDropListener()
Gets the drop target listener for drop events on the tab. |
javax.swing.Icon |
getTabIcon()
Gets the icon to display in a tab along side the name. |
int |
getType()
Gets the types of dockable accepted by a specific dockable implementation. |
java.lang.String |
getUniqueName()
Gets a unique name used for persistence. |
boolean |
isVisible()
Returns true if the subview is visible. |
void |
loadLayout(PropertyAccess p)
reloads the layout information of this dockable. |
void |
removeTitleChangeListener(TitleChangeListener l)
Removes the specified title change listener from the dockable. |
void |
saveLayout(PropertyAccess p)
Saves the layout information of this dockable. |
void |
setDockableVisible(boolean bVisible)
Shows/hides the dockable. |
void |
setSite(Site site)
Sets the current site where this dockable is docked or floated. |
void |
setType(int type)
|
void |
show()
Shows the view if hidden. |
void |
stateChange(int newState)
This method gets called when a panel is shown, hidden, or closed. |
void |
updateTitle(java.lang.Object object)
Called when the view needs to update its title based on the specified object. |
Methods inherited from class oracle.ide.addin.AbstractView |
activate, addViewListener, addViewSelectionListener, deactivate, fireViewActivated, fireViewClosed, fireViewDeactivated, fireViewSelectionChanged, getContext, getContextMenu, getController, getHelpInfo, getId, getSelection, getToolbar, loadToolbar, loadToolbar, newId, owner, removeViewListener, removeViewSelectionListener, setId, setOwner |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface oracle.ide.docking.Dockable |
getTabName, getTitleName |
Methods inherited from interface oracle.ide.addin.View |
getContext |
Methods inherited from interface oracle.ide.addin.Subview |
getGUI |
Field Detail |
public static final int SHOWN
Used when the UI is made visible or accessible.
Accessible means it is tabbed with other dockable windows. In this case,
the SHOWN stateChange will be sent although the
JComponent.isVisible==false.
SHOWN will be used when a layout is loaded as well as when the API is used.
public static final int HIDDEN
HIDDEN is the counterpart of SHOWN
It will be called when the user pressed the 'X' button, and when the layout
changes (even if the dockable is visible in both layouts)
public static final int CLOSED
CLOSED is sent to Dockable that return TYPE_DISCARDABLE on
getType().
CLOSED is sent when the close button is pressed after HIDDEN only if the
dockable is alone in a window or tabbed only with other discardable
windows.
Constructor Detail |
protected DockableWindow(View owner, java.lang.String viewId)
Method Detail |
protected Dockable getCachedDockable()
public void close()
close
in interface Subview
close
in class AbstractView
public void show()
show
in interface Subview
show
in class AbstractView
public boolean isVisible()
Subview
isVisible
in interface Subview
isVisible
in class AbstractView
public void setDockableVisible(boolean bVisible)
public void updateTitle(java.lang.Object object)
updateTitle
in interface View
updateTitle
in class AbstractView
public javax.swing.Icon getTabIcon()
getTabIcon
in interface Dockable
Dockable.getTabName()
public int getType()
getType
in interface Dockable
public void setType(int type)
public java.lang.String getUniqueName()
getUniqueName
in interface Dockable
public Site getSite()
getSite
in interface Dockable
setSite(oracle.ide.docking.Site)
public void setSite(Site site)
setSite
in interface Dockable
site
- the site to set.getSite()
public javax.swing.JComponent getHostedComponent()
getHostedComponent
in interface Dockable
public java.awt.dnd.DropTargetListener getTabDropListener()
If handling drop events on the tab is not necessary, the implementation of this method should return null.
Note that this method may called repeatedly during a drag and drop operation, so it should be fast.
getTabDropListener
in interface Dockable
public java.lang.String getMenuTitle()
getMenuTitle
in interface Dockable
public int getMenuPreferredMnemonic()
getMenuPreferredMnemonic
in interface Dockable
public void saveLayout(PropertyAccess p)
saveLayout
in interface Dockable
p
- the storage objectpublic void loadLayout(PropertyAccess p)
loadLayout
in interface Dockable
p
- the storage objectpublic void addTitleChangeListener(TitleChangeListener l)
addTitleChangeListener
in interface Dockable
l
- a TitleChangeListener instance.public void removeTitleChangeListener(TitleChangeListener l)
removeTitleChangeListener
in interface Dockable
l
- a TitleChangeListener instance.public void stateChange(int newState)
newState
- The new state indicating whether the panel was shown,
hidden or closed.protected void fireTitleChangeListener()
protected void dockableHidden(DockableEvent e)
protected void dockableShown(DockableEvent e)
|
Extension SDK | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright ©1997, 2003, Oracle. All rights reserved.