com.tensegrity.gui.swt.control.panels
Class PreferencesPanel

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.gui.swt.control.panels.PreferencesPanel
All Implemented Interfaces:
org.eclipse.swt.graphics.Drawable, Evaluable

public class PreferencesPanel
extends org.eclipse.swt.widgets.Composite
implements Evaluable

This panel is for displaying and editing preference attributes.

Each registered PreferenceListener is notified on preferences change.

Requires an instance of PreferenceDialogProvider to obtain a list of all preference attributes.

Version:
$Id: PreferencesPanel.java,v 1.16 2006/03/14 14:44:27 MichaelKegel Exp $
Author:
Arnd Houben

Field Summary
 
Fields inherited from class org.eclipse.swt.widgets.Control
handle
 
Constructor Summary
PreferencesPanel(org.eclipse.swt.widgets.Composite parent, UIManager uiManager, PreferenceDialogProvider prefProvider, AttributeEditorTranslator translator)
          Constructor which requires a PreferenceDialogProvider
 
Method Summary
 void addPreferenceListener(PreferenceListener listener)
          Adds the specified PreferenceListener to the list of all listeners
 void applyEvList()
          Tells the component to apply its UIItemEvaluationList.
 java.lang.String getCurrentAttributeSetName()
           This method returns the AttributeSet name corresponding to the data displayed on the visible TabItem.
 SwtPreferenceTree getCurrentPreferenceTable()
           This method returns the currently visible SwtPreferenceTable
 void installEvList()
          Tells the component to setup its internal state.
 void removePreferenceListener(PreferenceListener listener)
          Removes the specified PreferenceListener from the list of all listeners
 void restoreDefaults()
          Sets the default values for the currently used tab item
 
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, dispose, 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
 

Constructor Detail

PreferencesPanel

public PreferencesPanel(org.eclipse.swt.widgets.Composite parent,
                        UIManager uiManager,
                        PreferenceDialogProvider prefProvider,
                        AttributeEditorTranslator translator)
Constructor which requires a PreferenceDialogProvider

Parameters:
parent - the composite to add this PreferencePanel to
uiManager - the UIManager to use for initernationalization
prefProvider - the PreferenceDialogProvider for obtaininf the attributes
Method Detail

getCurrentAttributeSetName

public final java.lang.String getCurrentAttributeSetName()

This method returns the AttributeSet name corresponding to the data displayed on the visible TabItem.

Returns:
the AttributeSet name corresponding to the data displayed on the visible TabItem

getCurrentPreferenceTable

public final SwtPreferenceTree getCurrentPreferenceTable()

This method returns the currently visible SwtPreferenceTable

Returns:
the currently displayed SwtPreferenceTable

restoreDefaults

public final void restoreDefaults()
Sets the default values for the currently used tab item


installEvList

public void installEvList()
Description copied from interface: Evaluable
Tells the component to setup its internal state.

Specified by:
installEvList in interface Evaluable

applyEvList

public void applyEvList()
Description copied from interface: Evaluable
Tells the component to apply its UIItemEvaluationList.

Specified by:
applyEvList in interface Evaluable

addPreferenceListener

public final void addPreferenceListener(PreferenceListener listener)
Adds the specified PreferenceListener to the list of all listeners

Parameters:
listener - an arbitrary PreferenceListener

removePreferenceListener

public final void removePreferenceListener(PreferenceListener listener)
Removes the specified PreferenceListener from the list of all listeners

Parameters:
listener - a PreferenceListener


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