EchoPoint
2.1.0rc5

echopointng
Class TitleBar

java.lang.Object
  extended by nextapp.echo2.app.Component
      extended by echopointng.ComponentEx
          extended by echopointng.AbleComponent
              extended by echopointng.TitleBar
All Implemented Interfaces:
AccessKeyable, Attributeable, Borderable, Delegateable, Expandable, Heightable, Insetable, MouseCursorable, Sizeable, ToolTipable, Widthable, Serializable, RenderIdSupport

public class TitleBar
extends AbleComponent
implements Expandable

TitleBar is a component that usually acts as a "title" of component, much like the titlebar area in a windowing environment like Windows.

TitleBar has a concept of "expanding and contracing" other content and as such implements Expandable and has a ExpansionModel to track whether the titlebar is expanded or not.

TitleBar has a left and right icon that can be "expanded". It can also have an optional 'application', 'help' and 'close' component, which will allow buttons, imageicons and other components to be used on the TitleBar.

A TitleBar is always drawn as :

 |--------------------------------------------------------------------------|
 |                                                                          |
 | [application] [left icon] Title text           [right icon][help][close] |
 |                                                                          |
 |--------------------------------------------------------------------------|
 

See Also:
Serialized Form

Field Summary
static ImageReference DEFAULT_LEFT_EXPANDED_ICON
          The default image used as the left expanded icon
static ImageReference DEFAULT_LEFT_ICON
          The default image used as the left icon
static Style DEFAULT_STYLE
           
static Alignment DEFAULT_TITLE_ALIGNMENT
          the default alignment of the title text is left/center
static String PROPERTY_APPLICATION_COMPONENT
           
static String PROPERTY_BACKGROUND_IMAGE
           
static String PROPERTY_CLOSE_COMPONENT
           
static String PROPERTY_EXPANDED_TITLE
           
static String PROPERTY_EXPANDED_TITLE_BACKGROUND_IMAGE
           
static String PROPERTY_HELP_COMPONENT
           
static String PROPERTY_LEFT_EXPANDED_ICON
           
static String PROPERTY_LEFT_ICON
           
static String PROPERTY_RIGHT_EXPANDED_ICON
           
static String PROPERTY_RIGHT_ICON
           
static String PROPERTY_ROLLOVER_BACKGROUND
           
static String PROPERTY_ROLLOVER_BACKGROUND_IMAGE
           
static String PROPERTY_ROLLOVER_BORDER
           
static String PROPERTY_ROLLOVER_ENABLED
           
static String PROPERTY_ROLLOVER_FONT
           
static String PROPERTY_ROLLOVER_FOREGROUND
           
static String PROPERTY_TITLE
           
static String PROPERTY_TITLE_ALIGNMENT
           
static String PROPERTY_TITLE_BACKGROUND_IMAGE
           
 
Fields inherited from class echopointng.ComponentEx
PROPERTY_HIDDEN
 
Fields inherited from class nextapp.echo2.app.Component
CHILDREN_CHANGED_PROPERTY, ENABLED_CHANGED_PROPERTY, FOCUS_TRAVERSAL_INDEX_CHANGED_PROPERTY, FOCUS_TRAVERSAL_PARTICIPANT_CHANGED_PROPERTY, LAYOUT_DIRECTION_CHANGED_PROPERTY, LOCALE_CHANGED_PROPERTY, PROPERTY_BACKGROUND, PROPERTY_FONT, PROPERTY_FOREGROUND, PROPERTY_LAYOUT_DATA, STYLE_CHANGED_PROPERTY, STYLE_NAME_CHANGED_PROPERTY, VISIBLE_CHANGED_PROPERTY
 
Fields inherited from interface echopointng.able.Expandable
EXPANDED_CHANGED_PROPERTY, PROPERTY_EXPANSION_GROUP, PROPERTY_EXPANSION_MODEL
 
Fields inherited from interface echopointng.able.AccessKeyable
PROPERTY_ACCESS_KEY
 
Fields inherited from interface echopointng.able.Borderable
PROPERTY_BORDER
 
Fields inherited from interface echopointng.able.MouseCursorable
CURSOR_AUTO, CURSOR_CROSSHAIR, CURSOR_CUSTOM_URI, CURSOR_DEFAULT, CURSOR_E_RESIZE, CURSOR_HELP, CURSOR_MOVE, CURSOR_N_RESIZE, CURSOR_NE_RESIZE, CURSOR_NW_RESIZE, CURSOR_POINTER, CURSOR_S_RESIZE, CURSOR_SE_RESIZE, CURSOR_SW_RESIZE, CURSOR_TEXT, CURSOR_W_RESIZE, CURSOR_WAIT, PROPERTY_MOUSE_CURSOR, PROPERTY_MOUSE_CURSOR_URI
 
Fields inherited from interface echopointng.able.Insetable
DEFAULT_INSETS, DEFAULT_OUTSETS, PROPERTY_INSETS, PROPERTY_OUTSETS
 
Fields inherited from interface echopointng.able.Widthable
PROPERTY_WIDTH
 
Fields inherited from interface echopointng.able.Heightable
PROPERTY_HEIGHT
 
Fields inherited from interface echopointng.able.ToolTipable
PROPERTY_TOOL_TIP_TEXT
 
Constructor Summary
TitleBar()
           
TitleBar(String title)
           
TitleBar(String title, boolean isExpanded)
           
 
Method Summary
 Component getApplicationComponent()
           
 FillImage getBackgroundImage()
          Returns the background image of the TitleBar.
 Component getCloseComponent()
           
 ImageReference getExpandedLeftIcon()
           
 ImageReference getExpandedRightIcon()
           
 String getExpandedTitle()
           
 FillImage getExpandedTitleBackgroundImage()
           
 ExpansionGroup getExpansionGroup()
           
 ExpansionModel getExpansionModel()
           
 Component getHelpComponent()
           
 ImageReference getLeftIcon()
           
 ImageReference getRightIcon()
           
 Color getRolloverBackground()
          Returns the background color of the TitleBar when the mouse cursor is inside its bounds.
 FillImage getRolloverBackgroundImage()
          Returns the background image displayed when the mouse cursor is inside the TitleBar's bounds.
 Border getRolloverBorder()
          Returns the border displayed around the TitleBar when the mouse cursor is inside its bounds.
 Font getRolloverFont()
          Returns the font of the TitleBar when the mouse cursor is inside its bounds.
 Color getRolloverForeground()
          Returns the foreground color of the TitleBar when the mouse cursor is inside its bounds.
 String getTitle()
           
 Alignment getTitleAlignment()
           
 FillImage getTitleBackgroundImage()
           
 boolean isExpanded()
           
 boolean isRolloverEnabled()
          Determines if rollover effects are enabled.
 void processInput(String inputName, Object inputValue)
           
 void setApplicationComponent(Component newValue)
           
 void setBackgroundImage(FillImage newValue)
          Sets the background image of the TitleBar.
 void setCloseComponent(Component newValue)
           
 void setExpanded(boolean isExpanded)
          Sets whether the Expandable is expanded or not
 void setExpandedTitle(String newValue)
          Sets the expanded title of the TitleBar.
 void setExpandedTitleBackgroundImage(FillImage fillImage)
          Sets the background of the TitleBar when it is in expanded mode.
 void setExpansionGroup(ExpansionGroup newExpansionGroup)
          This setExpansionGroup method is not supported on TitleBars.
 void setExpansionModel(ExpansionModel newExpansionModel)
          Sets the ExpansionModel model used by the Expandable.
 void setHelpComponent(Component newValue)
           
 void setLeftExpandedIcon(ImageReference newValue)
           
 void setLeftIcon(ImageReference newValue)
           
 void setRightExpandedIcon(ImageReference newValue)
           
 void setRightIcon(ImageReference newValue)
           
 void setRolloverBackground(Color newValue)
          Sets the background color of the TitleBar when the mouse cursor is inside its bounds.
 void setRolloverBackgroundImage(FillImage newValue)
          Sets the background image displayed when the mouse cursor is inside the TitleBar's bounds
 void setRolloverBorder(Border newValue)
          Sets the border displayed around the TitleBar when the mouse cursor is inside its bounds.
 void setRolloverEnabled(boolean newValue)
          Sets whether rollover effects are enabled when the mouse cursor is inside the TitleBar's bounds.
 void setRolloverFont(Font newValue)
          Sets the font of the TitleBar when the mouse cursor is inside its bounds.
 void setRolloverForeground(Color newValue)
          Sets the foreground color of the TitleBar when the mouse cursor is inside its bounds.
 void setTitle(String newValue)
          Sets the title of the TitleBar
 void setTitleAlignment(Alignment newValue)
          Sets the alignment of the title of the TitleBar
 void setTitleBackgroundImage(FillImage fillImage)
          Sets the background of the TitleBar.
 String toString()
           
 void validate()
           
 
Methods inherited from class echopointng.AbleComponent
getAccessKey, getBorder, getHeight, getInsets, getMouseCursor, getMouseCursorUri, getOutsets, getToolTipText, getWidth, setAccessKey, setBorder, setHeight, setInsets, setMouseCursor, setMouseCursorUri, setOutsets, setToolTipText, setWidth
 
Methods inherited from class echopointng.ComponentEx
getAttribute, getAttributeNames, getProperty, getProperty, getProperty, getProperty, getProperty, getProperty, getProperty, getProperty, getProperty, getProperty, getProperty, getProperty, getProperty, getProperty, getProperty, getProperty, getProperty, getRenderProperty, getRenderProperty, getRenderProperty, getRenderProperty, getRenderProperty, getRenderProperty, getRenderProperty, getRenderProperty, getRenderProperty, getRenderProperty, getRenderProperty, getRenderProperty, getRenderProperty, getRenderProperty, getRenderProperty, getRenderProperty, getRenderProperty, getRenderProperty, isHidden, setAttribute, setHidden, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty
 
Methods inherited from class nextapp.echo2.app.Component
add, add, addPropertyChangeListener, dispose, firePropertyChange, getApplicationInstance, getBackground, getComponent, getComponent, getComponentCount, getComponents, getEventListenerList, getFocusTraversalIndex, getFont, getForeground, getId, getIndexedProperty, getLayoutData, getLayoutDirection, getLocale, getParent, getProperty, getRenderId, getRenderIndexedProperty, getRenderIndexedProperty, getRenderLayoutDirection, getRenderLocale, getRenderProperty, getRenderProperty, getStyle, getStyleName, getVisibleComponent, getVisibleComponentCount, getVisibleComponents, hasEventListenerList, indexOf, init, isAncestorOf, isEnabled, isFocusTraversalParticipant, isRegistered, isRenderEnabled, isRenderVisible, isValidChild, isValidParent, isVisible, remove, remove, removeAll, removePropertyChangeListener, setBackground, setEnabled, setFocusTraversalIndex, setFocusTraversalParticipant, setFont, setForeground, setId, setIndexedProperty, setLayoutData, setLayoutDirection, setLocale, setProperty, setRenderId, setStyle, setStyleName, setVisible, verifyInput, visibleIndexOf
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface echopointng.able.Delegateable
getRenderProperty, getRenderProperty
 
Methods inherited from interface echopointng.able.Delegateable
getRenderProperty, getRenderProperty
 
Methods inherited from interface echopointng.able.Delegateable
getRenderProperty, getRenderProperty
 
Methods inherited from interface echopointng.able.Delegateable
getRenderProperty, getRenderProperty
 
Methods inherited from interface echopointng.able.Delegateable
getRenderProperty, getRenderProperty
 
Methods inherited from interface echopointng.able.Delegateable
getRenderProperty, getRenderProperty
 

Field Detail

DEFAULT_LEFT_EXPANDED_ICON

public static final ImageReference DEFAULT_LEFT_EXPANDED_ICON
The default image used as the left expanded icon


DEFAULT_LEFT_ICON

public static final ImageReference DEFAULT_LEFT_ICON
The default image used as the left icon


DEFAULT_STYLE

public static final Style DEFAULT_STYLE

DEFAULT_TITLE_ALIGNMENT

public static final Alignment DEFAULT_TITLE_ALIGNMENT
the default alignment of the title text is left/center


PROPERTY_APPLICATION_COMPONENT

public static final String PROPERTY_APPLICATION_COMPONENT
See Also:
Constant Field Values

PROPERTY_BACKGROUND_IMAGE

public static final String PROPERTY_BACKGROUND_IMAGE
See Also:
Constant Field Values

PROPERTY_CLOSE_COMPONENT

public static final String PROPERTY_CLOSE_COMPONENT
See Also:
Constant Field Values

PROPERTY_EXPANDED_TITLE

public static final String PROPERTY_EXPANDED_TITLE
See Also:
Constant Field Values

PROPERTY_EXPANDED_TITLE_BACKGROUND_IMAGE

public static final String PROPERTY_EXPANDED_TITLE_BACKGROUND_IMAGE
See Also:
Constant Field Values

PROPERTY_HELP_COMPONENT

public static final String PROPERTY_HELP_COMPONENT
See Also:
Constant Field Values

PROPERTY_LEFT_EXPANDED_ICON

public static final String PROPERTY_LEFT_EXPANDED_ICON
See Also:
Constant Field Values

PROPERTY_LEFT_ICON

public static final String PROPERTY_LEFT_ICON
See Also:
Constant Field Values

PROPERTY_RIGHT_EXPANDED_ICON

public static final String PROPERTY_RIGHT_EXPANDED_ICON
See Also:
Constant Field Values

PROPERTY_RIGHT_ICON

public static final String PROPERTY_RIGHT_ICON
See Also:
Constant Field Values

PROPERTY_ROLLOVER_BACKGROUND

public static final String PROPERTY_ROLLOVER_BACKGROUND
See Also:
Constant Field Values

PROPERTY_ROLLOVER_BACKGROUND_IMAGE

public static final String PROPERTY_ROLLOVER_BACKGROUND_IMAGE
See Also:
Constant Field Values

PROPERTY_ROLLOVER_BORDER

public static final String PROPERTY_ROLLOVER_BORDER
See Also:
Constant Field Values

PROPERTY_ROLLOVER_ENABLED

public static final String PROPERTY_ROLLOVER_ENABLED
See Also:
Constant Field Values

PROPERTY_ROLLOVER_FONT

public static final String PROPERTY_ROLLOVER_FONT
See Also:
Constant Field Values

PROPERTY_ROLLOVER_FOREGROUND

public static final String PROPERTY_ROLLOVER_FOREGROUND
See Also:
Constant Field Values

PROPERTY_TITLE

public static final String PROPERTY_TITLE
See Also:
Constant Field Values

PROPERTY_TITLE_ALIGNMENT

public static final String PROPERTY_TITLE_ALIGNMENT
See Also:
Constant Field Values

PROPERTY_TITLE_BACKGROUND_IMAGE

public static final String PROPERTY_TITLE_BACKGROUND_IMAGE
See Also:
Constant Field Values
Constructor Detail

TitleBar

public TitleBar()

TitleBar

public TitleBar(String title)

TitleBar

public TitleBar(String title,
                boolean isExpanded)
Method Detail

getApplicationComponent

public Component getApplicationComponent()

getBackgroundImage

public FillImage getBackgroundImage()
Returns the background image of the TitleBar.

Returns:
the background image

getCloseComponent

public Component getCloseComponent()

getExpandedLeftIcon

public ImageReference getExpandedLeftIcon()
Returns:
the icon used on the left if the TitleBar is expanded

getExpandedRightIcon

public ImageReference getExpandedRightIcon()
Returns:
the icon used on the right if the TitleBar is expanded

getExpandedTitle

public String getExpandedTitle()
Returns:
the expanded title of the TitleBar

getExpandedTitleBackgroundImage

public FillImage getExpandedTitleBackgroundImage()
Returns:
the background image of the TitleBar when it is in expanded mode.

getExpansionGroup

public ExpansionGroup getExpansionGroup()
Specified by:
getExpansionGroup in interface Expandable
Returns:
the ExpansionGroup of the Expandable.
See Also:
Expandable.getExpansionGroup()

getExpansionModel

public ExpansionModel getExpansionModel()
Specified by:
getExpansionModel in interface Expandable
Returns:
the ExpansionModel model of the Expandable.
See Also:
Expandable.getExpansionModel()

getHelpComponent

public Component getHelpComponent()

getLeftIcon

public ImageReference getLeftIcon()
Returns:
the icon used on the left of the TitleBar

getRightIcon

public ImageReference getRightIcon()
Returns:
the icon used on the right of the TitleBar

getRolloverBackground

public Color getRolloverBackground()
Returns the background color of the TitleBar when the mouse cursor is inside its bounds.

Returns:
the color

getRolloverBackgroundImage

public FillImage getRolloverBackgroundImage()
Returns the background image displayed when the mouse cursor is inside the TitleBar's bounds.

Returns:
the background image

getRolloverBorder

public Border getRolloverBorder()
Returns the border displayed around the TitleBar when the mouse cursor is inside its bounds.

Returns:
the border

getRolloverFont

public Font getRolloverFont()
Returns the font of the TitleBar when the mouse cursor is inside its bounds.

Returns:
the font

getRolloverForeground

public Color getRolloverForeground()
Returns the foreground color of the TitleBar when the mouse cursor is inside its bounds.

Returns:
the color

getTitle

public String getTitle()
Returns:
the title of the TitleBar

getTitleAlignment

public Alignment getTitleAlignment()
Returns:
the alignment of the title of the TitleBar

getTitleBackgroundImage

public FillImage getTitleBackgroundImage()
Returns:
the background image of the TitleBar.

isExpanded

public boolean isExpanded()
Specified by:
isExpanded in interface Expandable
Returns:
whether Expandable is expanded or not
See Also:
Expandable.isExpanded()

isRolloverEnabled

public boolean isRolloverEnabled()
Determines if rollover effects are enabled.

Returns:
true if rollover effects are enabled
See Also:
setRolloverEnabled(boolean)

processInput

public void processInput(String inputName,
                         Object inputValue)
Overrides:
processInput in class Component
See Also:
Component.processInput(java.lang.String, java.lang.Object)

setApplicationComponent

public void setApplicationComponent(Component newValue)

setBackgroundImage

public void setBackgroundImage(FillImage newValue)
Sets the background image of the TitleBar.

Parameters:
newValue - the new background image

setCloseComponent

public void setCloseComponent(Component newValue)

setExpanded

public void setExpanded(boolean isExpanded)
Description copied from interface: Expandable
Sets whether the Expandable is expanded or not

Specified by:
setExpanded in interface Expandable
See Also:
Expandable.setExpanded(boolean)

setExpandedTitle

public void setExpandedTitle(String newValue)
Sets the expanded title of the TitleBar. If this is null, then the general title will be used


setExpandedTitleBackgroundImage

public void setExpandedTitleBackgroundImage(FillImage fillImage)
Sets the background of the TitleBar when it is in expanded mode.

Parameters:
fillImage - The FillImage to use as background.

setExpansionGroup

public void setExpansionGroup(ExpansionGroup newExpansionGroup)
This setExpansionGroup method is not supported on TitleBars.

Specified by:
setExpansionGroup in interface Expandable
See Also:
Expandable.setExpansionGroup(echopointng.model.ExpansionGroup)

setExpansionModel

public void setExpansionModel(ExpansionModel newExpansionModel)
Description copied from interface: Expandable
Sets the ExpansionModel model used by the Expandable.

Specified by:
setExpansionModel in interface Expandable
See Also:
Expandable.setExpansionModel(echopointng.model.ExpansionModel)

setHelpComponent

public void setHelpComponent(Component newValue)

setLeftExpandedIcon

public void setLeftExpandedIcon(ImageReference newValue)

setLeftIcon

public void setLeftIcon(ImageReference newValue)

setRightExpandedIcon

public void setRightExpandedIcon(ImageReference newValue)

setRightIcon

public void setRightIcon(ImageReference newValue)

setRolloverBackground

public void setRolloverBackground(Color newValue)
Sets the background color of the TitleBar when the mouse cursor is inside its bounds.

Parameters:
newValue - the new Color

setRolloverBackgroundImage

public void setRolloverBackgroundImage(FillImage newValue)
Sets the background image displayed when the mouse cursor is inside the TitleBar's bounds

Parameters:
newValue - the new background image

setRolloverBorder

public void setRolloverBorder(Border newValue)
Sets the border displayed around the TitleBar when the mouse cursor is inside its bounds.

Parameters:
newValue - the new border

setRolloverEnabled

public void setRolloverEnabled(boolean newValue)
Sets whether rollover effects are enabled when the mouse cursor is inside the TitleBar's bounds. Rollover properties have no effect unless this property is set to true. The default value is false.

Parameters:
newValue - true if rollover effects should be enabled

setRolloverFont

public void setRolloverFont(Font newValue)
Sets the font of the TitleBar when the mouse cursor is inside its bounds.

Parameters:
newValue - the new Font

setRolloverForeground

public void setRolloverForeground(Color newValue)
Sets the foreground color of the TitleBar when the mouse cursor is inside its bounds.

Parameters:
newValue - the new Color

setTitle

public void setTitle(String newValue)
Sets the title of the TitleBar


setTitleAlignment

public void setTitleAlignment(Alignment newValue)
Sets the alignment of the title of the TitleBar


setTitleBackgroundImage

public void setTitleBackgroundImage(FillImage fillImage)
Sets the background of the TitleBar.

Parameters:
fillImage - The FillImage to use as background.

validate

public void validate()
Overrides:
validate in class Component
See Also:
Component.validate()

toString

public String toString()
Overrides:
toString in class Object
See Also:
Object.toString()

EchoPoint
2.1.0rc5