org.noos.xing.mydoggy
Interface Content

All Superinterfaces:
Dockable<ContentManager>, Observable

public interface Content
extends Dockable<ContentManager>

A content is a wrapper of a component decorated with some properties like a title, an icon, etc. The visualization of a content depends on specific platform implementation. A platform implementation can use a JTabbedPane or a JDesktopPane for example. A PropertyChangeEvent is fired for the following properties:

Since:
1.0.0
Author:
Angelo De Caro (angelo.decaro@gmail.com)

Method Summary
 void detach(Content onContent, AggregationPosition onPosition)
          Detach this content aggregating it on the passed content using the passed position.
 void detach(Content onContent, int onIndex, AggregationPosition onPosition)
          Detach this content aggregating it on the passed content using the passed position.
 void detachByReference(Content refContent, AggregationPosition onPosition)
          Detach this content aggregating it using the passed position into the content window that contains the refContent.
 ContentUI getContentUI()
          Returns the content ui for this content based on the current installed ContentManagerUI.
 Icon getDisabledIcon()
          Returns the content disabled icon.
 Dockable getDockableDelegator()
          Returns the dockable that this tab is accomodating, null if no dockable is accomodated.
 Color getForeground()
          Returns the content foreground color.
 int getMnemonic()
          Returns the keyboard mnemonic for accessing this content.
 JPopupMenu getPopupMenu()
          Returns the popup menu.
 RepresentativeAnchorDescriptor<Content> getRepresentativeAnchorDescriptor()
          Returns the representative anchor descriptor used to modify the behaviours of that object.
 String getToolTipText()
          Returns the content tooltip text.
 boolean isEnabled()
          Returns whether or not the content is currently enabled.
 void reattach(Object... constraints)
          Reattach a detached content using tha passed constraints.
 void setComponent(Component component)
          Sets the component to component.
 void setDisabledIcon(Icon disabledIcon)
          Sets the disabled icon to icon which can be null.
 void setEnabled(boolean enabled)
          Sets whether or not the content is enabled.
 void setForeground(Color foreground)
          Sets the foreground color foreground which can be null, in which case the content's foreground color will default to the foreground color of this Content.
 void setMnemonic(int mnemonic)
          Sets the keyboard mnemonic for accessing this content.
 void setPopupMenu(JPopupMenu popupMenu)
          Sets the popup menu to popupMenu.
 void setToolTipText(String toolTipText)
          Sets the tool tip text to toolTipText which can be null.
 
Methods inherited from interface org.noos.xing.mydoggy.Dockable
ensureVisible, getComponent, getDockableManager, getIcon, getId, getTitle, isDetached, isFlashing, isMaximized, isMinimized, isSelected, isVisible, setDetached, setFlashing, setFlashing, setIcon, setMaximized, setMinimized, setSelected, setTitle
 
Methods inherited from interface org.noos.xing.mydoggy.Observable
addPropertyChangeListener, addPropertyChangeListener, getPropertyChangeListeners, getPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListener
 

Method Detail

setForeground

void setForeground(Color foreground)
Sets the foreground color foreground which can be null, in which case the content's foreground color will default to the foreground color of this Content.

Parameters:
foreground - the color to be displayed as the content's foreground
Since:
1.0.0
See Also:
getForeground()

getForeground

Color getForeground()
Returns the content foreground color.

Returns:
the Color of the content foreground.
Since:
1.0.0
See Also:
setForeground(java.awt.Color)

setDisabledIcon

void setDisabledIcon(Icon disabledIcon)
Sets the disabled icon to icon which can be null.

Parameters:
disabledIcon - the icon to be displayed in the content when disabled.
Since:
1.0.0
See Also:
getDisabledIcon()

getDisabledIcon

Icon getDisabledIcon()
Returns the content disabled icon.

Returns:
the disabled icon.
Since:
1.0.0
See Also:
setDisabledIcon(javax.swing.Icon)

setToolTipText

void setToolTipText(String toolTipText)
Sets the tool tip text to toolTipText which can be null.

Parameters:
toolTipText - the tool tip text to be displayed for the content.
Since:
1.0.0
See Also:
getToolTipText()

getToolTipText

String getToolTipText()
Returns the content tooltip text.

Returns:
a string containing the tool tip text.
Since:
1.0.0
See Also:
setToolTipText(String)

setEnabled

void setEnabled(boolean enabled)
Sets whether or not the content is enabled. You cannot disable a selected content.

Parameters:
enabled - whether or not the content should be enabled.
Since:
1.0.0
See Also:
isEnabled()

isEnabled

boolean isEnabled()
Returns whether or not the content is currently enabled.

Returns:
true if the content is enabled; false otherwise
Since:
1.0.0
See Also:
setEnabled(boolean)

setComponent

void setComponent(Component component)
Sets the component to component.

Parameters:
component - the component for the content
Since:
1.0.0
See Also:
Dockable.getComponent()

setPopupMenu

void setPopupMenu(JPopupMenu popupMenu)
Sets the popup menu to popupMenu.

Parameters:
popupMenu - the popup menu for the content.
Since:
1.0.0
See Also:
getPopupMenu()

getPopupMenu

JPopupMenu getPopupMenu()
Returns the popup menu.

Returns:
the popup menu.
Since:
1.0.0
See Also:
setPopupMenu(javax.swing.JPopupMenu)

setMnemonic

void setMnemonic(int mnemonic)
Sets the keyboard mnemonic for accessing this content. The mnemonic is the key which when combined with the look and feel's mouseless modifier (usually Alt) will activate this content by selecting it.

A mnemonic must correspond to a single key on the keyboard and should be specified using one of the VK_XXX keycodes defined in java.awt.event.KeyEvent. Mnemonics are case-insensitive, therefore a key event with the corresponding keycode would cause the button to be activated whether or not the Shift modifier was pressed.

Parameters:
mnemonic - the key code which represents the mnemonic
Since:
1.3.1
See Also:
getMnemonic()

getMnemonic

int getMnemonic()
Returns the keyboard mnemonic for accessing this content.

Returns:
the key code which represents the mnemonic; -1 if a mnemonic is not specified for this content.
Since:
1.3.1

getContentUI

ContentUI getContentUI()
Returns the content ui for this content based on the current installed ContentManagerUI.

Returns:
the content ui instance for this content.
Since:
1.4.0

getDockableDelegator

Dockable getDockableDelegator()
Returns the dockable that this tab is accomodating, null if no dockable is accomodated.

Returns:
the dockable that this tab is accomodating, null if no dockable is accomodated.
Since:
1.4.0
See Also:
ContentManager.addContent(Dockable)

detach

void detach(Content onContent,
            int onIndex,
            AggregationPosition onPosition)
Detach this content aggregating it on the passed content using the passed position.

Parameters:
onContent - the content used as relative position. It must be already visible.
onIndex - the relative index used if onPosition == DEFAULT.
onPosition - the position used to detach the content.
Throws:
IllegalArgumentException - if onContent is null.
Since:
1.5.0

detach

void detach(Content onContent,
            AggregationPosition onPosition)
Detach this content aggregating it on the passed content using the passed position.

Parameters:
onContent - the content used as relative position. It must be already visible.
onPosition - the position used to detach the content.
Throws:
IllegalArgumentException - if onContent is null.
Since:
1.5.0

detachByReference

void detachByReference(Content refContent,
                       AggregationPosition onPosition)
Detach this content aggregating it using the passed position into the content window that contains the refContent.

Parameters:
refContent - the refContent used to identify a content window.
onPosition - the position used to detach the content.
Since:
1.5.0

reattach

void reattach(Object... constraints)
Reattach a detached content using tha passed constraints.

Parameters:
constraints - the constraints used to reattach the content.
Since:
1.5.0

getRepresentativeAnchorDescriptor

RepresentativeAnchorDescriptor<Content> getRepresentativeAnchorDescriptor()
Returns the representative anchor descriptor used to modify the behaviours of that object.

Returns:
the representative anchor descriptor used to modify the behaviours of that object.
Since:
1.5.0


Copyright © 2012. All Rights Reserved.