Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1.6.0)

E13403-07

oracle.ide.docking
Class DockableWindow

java.lang.Object
  extended by oracle.ide.view.View
      extended by oracle.ide.view.ViewDecorator
          extended by oracle.ide.docking.DockableView
              extended by oracle.ide.docking.DockableWindow
All Implemented Interfaces:
ControllerProvider, Dockable, Helpable
Direct Known Subclasses:
AbstractPinnable, BookmarkDockable, ChangeListWindow, DrawerDockableWindow, DrawerWindow, LogWindow, NavigatorWindow, PaletteWindow, PaletteWindow

public abstract class DockableWindow
extends 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.docking.DockableView
CLOSED, HIDDEN, SHOWN
 
Fields inherited from class oracle.ide.view.View
EMPTY_SELECTION, PROJECT_PROP, VISIBLE_PROP, WORKSPACE_PROP
 
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
 
Constructor Summary
protected DockableWindow()
           
protected DockableWindow(IdeMainWindow owner, java.lang.String viewId)
          Don't use this constructor.
protected DockableWindow(java.lang.String viewId)
          Constructor.
protected DockableWindow(View decorated)
          Only for decorator pattern.
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)
          This method is called when the window is hidden or closed.
protected  void dockableShown(DockableEvent e)
          This method is called when the window is shown.
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.
 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()
           
 void removeTitleChangeListener(TitleChangeListener l)
          Removes the specified title change listener from the 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.docking.DockableView
afterAutoExpanding, afterRestoringFromAutoExpansion, beforeAutoExpanding, getAutoExpansionPreferredSize, getAutoExpansionSize, isAutoExpandable, isAutoExpandableEnabled, setAutoExpandable, setAutoExpandableEnabled
 
Methods inherited from class oracle.ide.view.ViewDecorator
activate, deactivate, getContext, getContextMenu, getController, getGUI, getHelpInfo, getSelectionFromUI, getToolbar, getViewWithoutDecoration, loadLayout, newId, saveLayout, setOwner, setToolbarVisible, updateVisibleActions
 
Methods inherited from class oracle.ide.view.View
addViewListener, addViewSelectionListener, addViewStateListener, fireViewCollapsed, fireViewExpanded, fireViewSelectionChanged, getContext, getId, getSelection, getTabName, loadManifestToolbar, loadManifestToolbar, owner, removeViewListener, removeViewSelectionListener, removeViewStateListener, scheduleUpdateSelection, setId, toString, updateSelection, updateSelectionImpl, updateToolbarActions, updateVisibleActions
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface oracle.ide.docking.Dockable
getTabName, getTitleName, loadLayout, saveLayout
 

Constructor Detail

DockableWindow

protected DockableWindow()

DockableWindow

protected DockableWindow(View decorated)
Only for decorator pattern.

Parameters:
decorated -

DockableWindow

protected DockableWindow(java.lang.String viewId)
Constructor.


DockableWindow

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


DockableWindow

protected DockableWindow(IdeMainWindow owner,
                         java.lang.String viewId)
Don't use this constructor. Use DockableWindow(String) instead.

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.

Overrides:
close in class ViewDecorator

show

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

Overrides:
show in class ViewDecorator

isVisible

public boolean isVisible()
Overrides:
isVisible in class ViewDecorator

setDockableVisible

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

Specified by:
setDockableVisible in class DockableView

updateTitle

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

Overrides:
updateTitle in class ViewDecorator
Parameters:
object - the specified object.

getTabIcon

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

Returns:
the the icon to display in a tab.
See Also:
View.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.

Returns:
the type accepted by this dockable implementation.

setType

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

Specified by:
setType in class DockableView

getUniqueName

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

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.

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.

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.

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.

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.

Returns:
the string to display in the menu

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.


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.

Parameters:
l - a TitleChangeListener instance.

removeTitleChangeListener

public void removeTitleChangeListener(TitleChangeListener l)
Removes the specified title change listener from the 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)
This method is called when the window is hidden or closed. It is equivalent to stateChange(DockableView.HIDDEN).


dockableShown

protected void dockableShown(DockableEvent e)
This method is called when the window is shown. It is equivalent to stateChange(DockableView.SHOWN).


Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1.6.0)

E13403-07

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