|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ContentManager
This manager manages the main window. You can add several contents to be displayed
in the main window. The user can switch between displayed contents.
Contents are added to the ContentManager by using the
addContent method.
Content| Method Summary | |
|---|---|
Content |
addContent(Dockable dockable)
Adds a dockable. |
Content |
addContent(String id,
String title,
Icon icon,
Component component)
Adds a component represented by a unique identifier id
with a title and/or icon, either of which can be null. |
Content |
addContent(String id,
String title,
Icon icon,
Component component,
String tip)
Adds a component represented by a unique identifier id
with a title and/or icon, either of which can be null. |
Content |
addContent(String id,
String title,
Icon icon,
Component component,
String tip,
Object... constraints)
Adds a component represented by a unique identifier id
with a title and/or icon, either of which can be null. |
void |
addContentManagerListener(ContentManagerListener listener)
Registers listener so that it will receive events when
contents are registered or removed.. |
Content |
getContent(int index)
Returns the content at the specified position in this manager. |
Content |
getContent(Object key)
Returns the content to which this manager maps the specified key (the key could be the id or an alias). |
Content |
getContentByComponent(Component component)
Returns the content that wraps the passed component |
int |
getContentCount()
Returns the number of contents in this manager. |
ContentManagerListener[] |
getContentManagerListeners()
Returns an array of all the content manager listeners registered on this manager. |
ContentManagerUI |
getContentManagerUI()
Returns the content manager ui. |
Content[] |
getContents()
Returns an array containing all of the contents in this manager in proper sequence. |
Content |
getNextContent()
Returns in order the next enabled content related to the selected content, or null if no
contents are registered or no content is enabled. |
JPopupMenu |
getPopupMenu()
Returns the default popup menu for the contents. |
Content |
getPreviousContent()
Returns in order the previous enabled content related to the selected content, or null if no
contents are registered or no content is enabled. |
Content |
getSelectedContent()
Returns the selected content, or null if the
selection is empty. |
ToolWindowManager |
getToolWindowManager()
Returns the related tool window manager. |
boolean |
isEnabled()
Returns if the content manager is enabled. |
void |
removeAllContents()
Removes all of the contents from this manager. |
boolean |
removeContent(Content content)
Removes the content content. |
boolean |
removeContent(int index)
Removes the content at the specified position in this manager |
void |
removeContentManagerListener(ContentManagerListener listener)
Unregisters listener so that it will no longer receive
events. |
void |
setContentManagerUI(ContentManagerUI contentManagerUI)
Sets the content manager ui to contentManagerUI. |
void |
setEnabled(boolean enabled)
Enables or disables the content manager. |
void |
setPopupMenu(JPopupMenu popupMenu)
Sets the default popup menu for the contents. |
| Methods inherited from interface org.noos.xing.mydoggy.DockableManager |
|---|
addAlias, addDockableManagerListener, getAliases, getDockableById, getDockableManagerListeners, getDockables, removeAlias, removeDockableManagerListener |
| Methods inherited from interface org.noos.xing.mydoggy.Observable |
|---|
addPropertyChangeListener, addPropertyChangeListener, getPropertyChangeListeners, getPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListener |
| Method Detail |
|---|
ToolWindowManager getToolWindowManager()
void setContentManagerUI(ContentManagerUI contentManagerUI)
contentManagerUI.
contentManagerUI - the content manager ui.getContentManagerUI(),
ContentManagerUIContentManagerUI getContentManagerUI()
ContentManagerUIint getContentCount()
Content addContent(String id,
String title,
Icon icon,
Component component)
component represented by a unique identifier id
with a title and/or icon, either of which can be null.
id - the content id. It must be unique.title - the title to be displayed in this contenticon - the icon to be displayed in this contentcomponent - the component to be displayed when this content is selected. @return the a Content object rapresents the content added. @see #removeContent(Content)
Content instance that rapresents the componentContent
Content addContent(String id,
String title,
Icon icon,
Component component,
String tip)
component represented by a unique identifier id
with a title and/or icon, either of which can be null.
id - the content id. It must be unique.title - the title to be displayed in this contenticon - the icon to be displayed in this contentcomponent - the component to be displayed when this content is selected.tip - the tool tip text @return the a Content object rapresents the content added. @see #removeContent(Content)
Content instance that rapresents the component
Content addContent(String id,
String title,
Icon icon,
Component component,
String tip,
Object... constraints)
component represented by a unique identifier id
with a title and/or icon, either of which can be null.
id - the content id. It must be unique.title - the title to be displayed in this contenticon - the icon to be displayed in this contentcomponent - the component to be displayed when this content is selected.tip - the tool tip text @return the a Content object rapresents the content added. @see #removeContent(Content)constraints - a constraints used by the underlining ContentManagerUI. For example a location for the DesktopContentManagerUI.
Content instance that rapresents the componentContent addContent(Dockable dockable)
dockable. A content is created to accommodate the dockable.
dockable - the dockable to be accommodated.
Content instance that represents the accommodated dockable.boolean removeContent(Content content)
content.
content - content to be removed from this manager, if present.
addContent(String, String,javax.swing.Icon,java.awt.Component),
addContent(String, String,javax.swing.Icon,java.awt.Component, String)boolean removeContent(int index)
index - the index of the element to removed.
IndexOutOfBoundsException - if the index is out of range (index < 0 || index >= getContentCount()).void removeAllContents()
Content getContent(int index)
index - index of content to return.
IndexOutOfBoundsException - if the index is out of range (index
< 0 || index >= getContentCount()).Content[] getContents()
getContent(int)Content getContent(Object key)
key - key whose associated content is to be returned.
NullPointerException - if the key is null.Content getContentByComponent(Component component)
component
component - the component wrapped by a content.
componentContent getSelectedContent()
null if the
selection is empty.
Content getNextContent()
null if no
contents are registered or no content is enabled.
Content getPreviousContent()
null if no
contents are registered or no content is enabled.
void setPopupMenu(JPopupMenu popupMenu)
popupMenu.
popupMenu - the default popup menu for the contents.JPopupMenu getPopupMenu()
PopupMenu for the contents.setPopupMenu(javax.swing.JPopupMenu)void setEnabled(boolean enabled)
enabled - true to enable the content manager, false otherwise.boolean isEnabled()
void addContentManagerListener(ContentManagerListener listener)
listener so that it will receive events when
contents are registered or removed..
If listener listener is null,
no exception is thrown and no action is performed.
listener - the ContentManagerListener to register.ContentManagerListenervoid removeContentManagerListener(ContentManagerListener listener)
listener so that it will no longer receive
events. This method performs no function, nor does it throw an exception, if the listener
specified by the argument was not previously added to this group.
If listener listener is null,
no exception is thrown and no action is performed.
listener - the ContentManagerListener to be removedaddContentManagerListener(ContentManagerListener)ContentManagerListener[] getContentManagerListeners()
ContentManagerListeners
or an empty array if no tool window manager listeners are currently registered.addContentManagerListener(ContentManagerListener),
removeContentManagerListener(ContentManagerListener)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||