com.sdm.quasar.client.swing.embedding.services
Class AbstractTitleService

java.lang.Object
  extended bycom.sdm.quasar.client.core.dialog.AbstractPerChildService
      extended bycom.sdm.quasar.client.swing.embedding.services.AbstractTitleService
All Implemented Interfaces:
Disposable, Service, SystemInfoProvider, TitleService

public abstract class AbstractTitleService
extends AbstractPerChildService
implements TitleService, SystemInfoProvider

An abstract TitleService implementation.

Version:
1.$Revision$
Author:
Thomas Wolf

Constructor Summary
AbstractTitleService(DialogControl dialogControl, SubDialogControl subDialogControl, java.lang.String registrationContext)
          Creates a new AbstractTitleService.
 
Method Summary
 void collectSystemInfo(SystemInfoNode root, SystemInfoOptions options)
          Builds the system information tree upon local information of the implementor.
 void dispose()
          Disposes the component.
 java.awt.Color getBackgroundColor()
           
 javax.swing.Icon getDisabledIcon()
           
 java.awt.Color getForegroundColor()
           
 javax.swing.Icon getIcon()
           
 int getMnemonic()
           
 java.lang.String getTitle()
           
 java.lang.String getToolTipText()
           
 void setBackgroundColor(java.awt.Color color)
          Sets the background color to the given value.
 void setDisabledIcon(javax.swing.Icon icon)
          Sets the disabled icon.
 void setForegroundColor(java.awt.Color color)
          Sets the foreground color to the given value.
 void setIcon(javax.swing.Icon icon)
          Sets the icon.
 void setMnemonic(int mnemonic)
          Sets the mnemonic.
 void setTitle(java.lang.String title)
          Sets the title.
 void setToolTipText(java.lang.String tooltip)
          Sets the tooltip.
protected  void update()
          Subclasses may implement this method, if they like to update everything when a property changes.
 
Methods inherited from class com.sdm.quasar.client.core.dialog.AbstractPerChildService
getDialogControl, getSubDialogControl
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractTitleService

public AbstractTitleService(DialogControl dialogControl,
                            SubDialogControl subDialogControl,
                            java.lang.String registrationContext)
Creates a new AbstractTitleService.

Method Detail

dispose

public void dispose()
             throws DisposeException
Description copied from interface: Disposable
Disposes the component.

Important:
This method is called by an administrating component and must never be called directly.

The implementation should release any resources or objects allocated and any services registered. Furthermore, this method should be developed carefully to free a maximum of resources even when the system may have become unstable. In case of one or multiple errors, you should collect them in a DisposeException, continue with the execution, and throw it at the end of the method.

Note: The implementation must not return before the component is disposed. Any threads or asynchronous calls started must be completed before this method returns.

Specified by:
dispose in interface Disposable
Throws:
DisposeException - if there was one or more errors while disposing the component.
See Also:
Disposable.dispose()

getBackgroundColor

public java.awt.Color getBackgroundColor()
Specified by:
getBackgroundColor in interface TitleService
Returns:
the background color.
See Also:
TitleService.getBackgroundColor()

getDisabledIcon

public javax.swing.Icon getDisabledIcon()
Specified by:
getDisabledIcon in interface TitleService
Returns:
the disabled icon.
See Also:
TitleService.getDisabledIcon()

getForegroundColor

public java.awt.Color getForegroundColor()
Specified by:
getForegroundColor in interface TitleService
Returns:
the foreground color.
See Also:
TitleService.getForegroundColor()

getIcon

public javax.swing.Icon getIcon()
Specified by:
getIcon in interface TitleService
Returns:
the icon.
See Also:
TitleService.getIcon()

getMnemonic

public int getMnemonic()
Specified by:
getMnemonic in interface TitleService
Returns:
the mnemonic.
See Also:
TitleService.getMnemonic()

getTitle

public java.lang.String getTitle()
Specified by:
getTitle in interface TitleService
Returns:
the title.
See Also:
TitleService.getTitle()

getToolTipText

public java.lang.String getToolTipText()
Specified by:
getToolTipText in interface TitleService
Returns:
the tooltip.
See Also:
TitleService.getToolTipText()

setBackgroundColor

public void setBackgroundColor(java.awt.Color color)
Description copied from interface: TitleService
Sets the background color to the given value.

Specified by:
setBackgroundColor in interface TitleService
Parameters:
color - the new background color
See Also:
TitleService.setBackgroundColor(java.awt.Color)

setDisabledIcon

public void setDisabledIcon(javax.swing.Icon icon)
Description copied from interface: TitleService
Sets the disabled icon.

Specified by:
setDisabledIcon in interface TitleService
Parameters:
icon - the disabled icon to set
See Also:
TitleService.setDisabledIcon(javax.swing.Icon)

setForegroundColor

public void setForegroundColor(java.awt.Color color)
Description copied from interface: TitleService
Sets the foreground color to the given value.

Specified by:
setForegroundColor in interface TitleService
Parameters:
color - the new foreground color
See Also:
TitleService.setForegroundColor(java.awt.Color)

setIcon

public void setIcon(javax.swing.Icon icon)
Description copied from interface: TitleService
Sets the icon.

Specified by:
setIcon in interface TitleService
Parameters:
icon - the icon to set
See Also:
TitleService.setIcon(javax.swing.Icon)

setMnemonic

public void setMnemonic(int mnemonic)
Description copied from interface: TitleService
Sets the mnemonic.

Specified by:
setMnemonic in interface TitleService
Parameters:
mnemonic - the mnemonic to set
See Also:
TitleService.setMnemonic(int)

setTitle

public void setTitle(java.lang.String title)
Description copied from interface: TitleService
Sets the title.

Specified by:
setTitle in interface TitleService
Parameters:
title - the new title
See Also:
TitleService.setTitle(java.lang.String)

setToolTipText

public void setToolTipText(java.lang.String tooltip)
Description copied from interface: TitleService
Sets the tooltip.

Specified by:
setToolTipText in interface TitleService
Parameters:
tooltip - the new tooltip
See Also:
TitleService.setToolTipText(java.lang.String)

update

protected void update()
Subclasses may implement this method, if they like to update everything when a property changes.


collectSystemInfo

public void collectSystemInfo(SystemInfoNode root,
                              SystemInfoOptions options)
Description copied from interface: SystemInfoProvider
Builds the system information tree upon local information of the implementor. The system information tree can be used within development by inspecting the system; so implementors should append their internal state (depending on the details settings within SystemInfoOptions). The information can be appended to the tree by adding new child SystemInformationNodes to the root node given using the SystemInfoNode.createChild(String) method and by setting information attributes the these nodes or the given root node.

Specified by:
collectSystemInfo in interface SystemInfoProvider
Parameters:
root - the SystemInfoNode to add information to (guaranteed to be not null)
options - contains additional options, that might influence the amount of information added to the tree (guaranteed to be not null)
See Also:
SystemInfoProvider.collectSystemInfo(com.sdm.quasar.client.core.common.sysinfo.SystemInfoNode, com.sdm.quasar.client.core.common.sysinfo.SystemInfoOptions)