com.tensegrity.skeleton.container.swt
Class SwtNavigatorContainer

java.lang.Object
  extended byorg.eclipse.swt.widgets.Widget
      extended byorg.eclipse.swt.widgets.Control
          extended byorg.eclipse.swt.widgets.Scrollable
              extended byorg.eclipse.swt.widgets.Composite
                  extended bycom.tensegrity.skeleton.swt.container.AbstractSwtToolContainer
                      extended bycom.tensegrity.skeleton.container.swt.SwtNavigatorContainer
All Implemented Interfaces:
Container, org.eclipse.swt.graphics.Drawable, NavigatorContainer, Observer, ToolContainer

public class SwtNavigatorContainer
extends AbstractSwtToolContainer
implements NavigatorContainer, Observer

Class SwtNavigatorContainer represents the default SWT implementation of the NavigatorContainer interface.

After creating a new instance, you are required to call its init() method before calling any others. Furthermore, no assumption can be made as to which type of Layout is set in the parent AbstractSwtToolContainer class. It is therefore the caller's responsibility to set this layout data.

The managed SwtNavigator instance can be accessed by calling the getNavigator() method.

Call the dispose() method to release the resources associated with an object so that it may be properly garbage collected.

This class uses a Label in order to display the container title (see setTitle(String)) as well as a SwtNavigator instance.

Version:
$Id: SwtNavigatorContainer.java,v 1.12 2005/10/27 14:52:10 KevinCVS Exp $
Author:
S�bastien Guyon

Field Summary
 
Fields inherited from class com.tensegrity.skeleton.swt.container.AbstractSwtToolContainer
isSelected
 
Fields inherited from class org.eclipse.swt.widgets.Control
handle
 
Constructor Summary
SwtNavigatorContainer(ApplicationFrame applicationFrame, org.eclipse.swt.widgets.Composite parent, int style)
          This constructor simply forwards its call to the constructor of the parent class.
 
Method Summary
 void dispose()
           
 CompositeNavigator getCompositeNavigator()
          At this point of time a NavigatorContainer must be based on the CompositeNavigator interface.
 java.lang.String getName()
          If no specific name is set then this method returns the localized value for GUIItem.SLIDEPANEL_NAVIGATOR_TITLE_IDS
 SwtNavigator getNavigator()
          Returns the internal SwtNavigator.
 void init()
          Subclasses implement this method to start their initialization code.
 void setName(java.lang.String s)
          Sets the name of this container.
 void setTitle(java.lang.String title)
           Sets a title to this container.
 void update(Observable observable, java.lang.Object arg)
          The callback method of an observer that is invoked by the Observable each time the state has changed.
 
Methods inherited from class com.tensegrity.skeleton.swt.container.AbstractSwtToolContainer
getApplicationFrame, getHeight, getUiManager, getWidth, repaint, setSelected, setUiManager
 
Methods inherited from class org.eclipse.swt.widgets.Composite
checkSubclass, computeSize, getChildren, getLayout, getTabList, layout, layout, setFocus, setLayout, setTabList
 
Methods inherited from class org.eclipse.swt.widgets.Scrollable
computeTrim, getClientArea, getHorizontalBar, getVerticalBar
 
Methods inherited from class org.eclipse.swt.widgets.Control
addControlListener, addFocusListener, addHelpListener, addKeyListener, addMouseListener, addMouseMoveListener, addMouseTrackListener, addPaintListener, addTraverseListener, computeSize, forceFocus, getAccessible, getBackground, getBorderWidth, getBounds, getEnabled, getFont, getForeground, getLayoutData, getLocation, getMenu, getMonitor, getParent, getShell, getSize, getToolTipText, getVisible, internal_dispose_GC, internal_new_GC, isEnabled, isFocusControl, isReparentable, isVisible, moveAbove, moveBelow, pack, pack, redraw, redraw, removeControlListener, removeFocusListener, removeHelpListener, removeKeyListener, removeMouseListener, removeMouseMoveListener, removeMouseTrackListener, removePaintListener, removeTraverseListener, setBackground, setBounds, setBounds, setCapture, setCursor, setEnabled, setFont, setForeground, setLayoutData, setLocation, setLocation, setMenu, setParent, setRedraw, setSize, setSize, setToolTipText, setVisible, toControl, toControl, toDisplay, toDisplay, traverse, update
 
Methods inherited from class org.eclipse.swt.widgets.Widget
addDisposeListener, addListener, checkWidget, getData, getData, getDisplay, getStyle, isDisposed, isListening, notifyListeners, removeDisposeListener, removeListener, removeListener, setData, setData, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.tensegrity.gui.container.Container
getApplicationFrame, setSelected
 

Constructor Detail

SwtNavigatorContainer

public SwtNavigatorContainer(ApplicationFrame applicationFrame,
                             org.eclipse.swt.widgets.Composite parent,
                             int style)
This constructor simply forwards its call to the constructor of the parent class.

Parameters:
applicationFrame - Enclosing ApplicationFrame
parent - a widget which will be the parent of the new instance (cannot be null)
style - the style of widget to construct
Method Detail

init

public void init()
Description copied from class: AbstractSwtToolContainer
Subclasses implement this method to start their initialization code. This method is called from within the constructor of this class.

Specified by:
init in class AbstractSwtToolContainer

setName

public void setName(java.lang.String s)
Description copied from interface: Container
Sets the name of this container.

Specified by:
setName in interface Container
Specified by:
setName in class AbstractSwtToolContainer
Parameters:
s - the new name for this container.

getName

public java.lang.String getName()
If no specific name is set then this method returns the localized value for GUIItem.SLIDEPANEL_NAVIGATOR_TITLE_IDS

Specified by:
getName in interface Container
Returns:
the name of the container.
See Also:
Container.getName()

getCompositeNavigator

public CompositeNavigator getCompositeNavigator()
Description copied from interface: NavigatorContainer
At this point of time a NavigatorContainer must be based on the CompositeNavigator interface. Thus each NavigatorContainer must give access to its instance.

Specified by:
getCompositeNavigator in interface NavigatorContainer
Returns:
The CompositeNavigator of this container.

getNavigator

public final SwtNavigator getNavigator()
Returns the internal SwtNavigator.

Returns:
the internal SwtNavigator.

setTitle

public void setTitle(java.lang.String title)

Sets a title to this container.

Parameters:
title - a title for this container.

update

public void update(Observable observable,
                   java.lang.Object arg)
Description copied from interface: Observer
The callback method of an observer that is invoked by the Observable each time the state has changed.

Specified by:
update in interface Observer
Parameters:
observable - the observable that triggered the call.
arg - an object carrying additional information.

dispose

public void dispose()


Copyright © 2005 Tensegrity Software GmbH. All Rights Reserved. Date of creation: 09.06.2006.