Extension SDK 10.1.2

oracle.ide.docking
Class DockableWindow

java.lang.Object
  extended byoracle.ide.addin.AbstractView
      extended byoracle.ide.docking.DockableWindow
All Implemented Interfaces:
ControllerProvider, Dockable, DockableView, Helpable, View
Direct Known Subclasses:
AbstractPinnable

public abstract class DockableWindow
extends AbstractView
implements DockableView

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 or DockableView directly.

See Also:
Docking Package Summary

Field Summary
 
Fields inherited from class oracle.ide.addin.AbstractView
owner, SEPARATOR, viewListeners, viewSelectionListeners
 
Fields inherited from interface oracle.ide.docking.DockableView
CLOSED, HIDDEN, SHOWN
 
Fields inherited from interface oracle.ide.docking.Dockable
DEFAULT_VISIBILITY_MINIMIZED, DEFAULT_VISIBILITY_RAISED, DEFAULT_VISIBILITY_VISIBLE, TYPE_DISCARDABLE, TYPE_GLOBAL_VISIBLE, 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.
 int getDefaultVisibility(Layout layout)
          The first time a Dockable is exposed to a layout, if the dockable is not of type Dockable.TYPE_GLOBAL_VISIBLE, it will be asked if it wants to be shown in that layout.
 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()
          Determine whether the View 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)
          Set the dockable 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, setToolbarVisible, updateToolbarActions, updateVisibleActions, updateVisibleActions
 
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
activate, addViewListener, addViewSelectionListener, deactivate, getContext, getContext, getContextMenu, getGUI, getId, getSelection, getToolbar, owner, removeViewListener, removeViewSelectionListener, setToolbarVisible, updateVisibleActions
 
Methods inherited from interface oracle.ide.addin.ControllerProvider
getController
 
Methods inherited from interface oracle.ide.help.Helpable
getHelpInfo
 

Constructor Detail

DockableWindow

protected DockableWindow(View owner,
                         java.lang.String viewId)
Constructor.

Method Detail

getCachedDockable

protected Dockable getCachedDockable()
This method returns the Dockable as know by the docking system based on the view ID. The returned value != this if a proxy was used.

Returns:
this if no proxy has been used, the Dockable proxy known by the docking system or null if this has never been docked.

close

public void close()
Closes the view.

Specified by:
close in interface View
Overrides:
close in class AbstractView

show

public void show()
Shows the view if hidden. Raises the view to the top if covered by other windows.

Specified by:
show in interface View
Overrides:
show in class AbstractView

isVisible

public boolean isVisible()
Description copied from interface: View
Determine whether the View is visible.

Specified by:
isVisible in interface View
Overrides:
isVisible in class AbstractView

setDockableVisible

public void setDockableVisible(boolean bVisible)
Shows/hides the dockable. This should be called in place of setVisible

Specified by:
setDockableVisible in interface DockableView

updateTitle

public void updateTitle(java.lang.Object object)
Called when the view needs to update its title based on the specified object.

Specified by:
updateTitle in interface View
Overrides:
updateTitle in class AbstractView

getTabIcon

public javax.swing.Icon getTabIcon()
Gets the icon to display in a tab along side the name.

Specified by:
getTabIcon in interface Dockable
Returns:
the the icon to display in a tab.
See Also:
Dockable.getTabName()

getType

public int getType()
Gets the types of dockable accepted by a specific dockable implementation. The constants above define some standard types. These types can be OR(ed) together.

Specified by:
getType in interface Dockable
Returns:
the type accepted by this dockable implementation.

setType

public void setType(int type)
Description copied from interface: DockableView
Set the dockable type.

Specified by:
setType in interface DockableView

getUniqueName

public java.lang.String getUniqueName()
Gets a unique name used for persistence. The default is the ViewId

Specified by:
getUniqueName in interface Dockable
Returns:
a unique name used for registration purposes.

getSite

public Site getSite()
Gets a storage object for docking information. Implementors just need to provide a data member to hold the incoming site.

Specified by:
getSite in interface Dockable
Returns:
the current site.
See Also:
setSite(oracle.ide.docking.Site)

setSite

public void setSite(Site site)
Sets the current site where this dockable is docked or floated. Implementors just need to provide a data member to hold the incoming site.

Specified by:
setSite in interface Dockable
Parameters:
site - the site to set.
See Also:
getSite()

getHostedComponent

public javax.swing.JComponent getHostedComponent()
Gets the root component of the user interface to be docked or floated.

Specified by:
getHostedComponent in interface Dockable
Returns:
the root component.

getTabDropListener

public java.awt.dnd.DropTargetListener getTabDropListener()
Gets the drop target listener for drop events on the tab. The TitledPanel will forward drop events to the appropriate listener for each tab.

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.

Specified by:
getTabDropListener in interface Dockable
Returns:
the drop target listener

getMenuTitle

public java.lang.String getMenuTitle()
Gets the text to display in the menus of the docking for showing/hiding the dockable.

Specified by:
getMenuTitle in interface Dockable
Returns:
the string to display in the menu

getMenuPreferredMnemonic

public int getMenuPreferredMnemonic()
Gets mnemonic used in the menus of the docking for showing/hiding the dockable.

Specified by:
getMenuPreferredMnemonic in interface Dockable
Returns:
the mnemonic

getDefaultVisibility

public int getDefaultVisibility(Layout layout)
Description copied from interface: Dockable
The first time a Dockable is exposed to a layout, if the dockable is not of type Dockable.TYPE_GLOBAL_VISIBLE, it will be asked if it wants to be shown in that layout.

Specified by:
getDefaultVisibility in interface Dockable
Parameters:
layout -

saveLayout

public void saveLayout(PropertyAccess p)
Saves the layout information of this dockable.

Specified by:
saveLayout in interface Dockable
Parameters:
p - the storage object

loadLayout

public void loadLayout(PropertyAccess p)
reloads the layout information of this dockable.

Specified by:
loadLayout in interface Dockable
Parameters:
p - the storage object

addTitleChangeListener

public void addTitleChangeListener(TitleChangeListener l)
Adds a title change listener to a dockable. TitleChangeEvents should be trigger by a dockable whenever their title information changes.

Specified by:
addTitleChangeListener in interface Dockable
Parameters:
l - a TitleChangeListener instance.

removeTitleChangeListener

public void removeTitleChangeListener(TitleChangeListener l)
Removes the specified title change listener from the dockable.

Specified by:
removeTitleChangeListener in interface Dockable
Parameters:
l - a TitleChangeListener instance.

stateChange

public void stateChange(int newState)
This method gets called when a panel is shown, hidden, or closed. The value passed in indicates precisely what happened. This method is really only intended as a convenience method for implementations of DockableListener which need to communicate to their dockable a state change.

Parameters:
newState - The new state indicating whether the panel was shown, hidden or closed.

fireTitleChangeListener

protected void fireTitleChangeListener()

dockableHidden

protected void dockableHidden(DockableEvent e)

dockableShown

protected void dockableShown(DockableEvent e)

Extension SDK

 

Copyright © 1997, 2004, Oracle. All rights reserved.