net.sourceforge.geeboss.view.properties
Class PropertyPage

java.lang.Object
  extended by net.sourceforge.geeboss.view.properties.PropertyPage
Direct Known Subclasses:
HotkeysProperties, LanguageProperties, MidiProperties, SystemTrayProperties, ViewProperties, WorkbenchProperties

public abstract class PropertyPage
extends java.lang.Object

A property page holds components to set properties in Geeboss. It holds an apply button to save the made changes and a restore defaults button to restore the default settings.


Field Summary
protected  org.eclipse.swt.widgets.Button mApply
          Apply button
protected  org.eclipse.swt.widgets.Composite mComposite
          Holds the Property Page
protected  org.eclipse.swt.graphics.Font mDialogFont
          Font to use for the components
protected  org.eclipse.swt.custom.CLabel mErrorMessageLabel
          Label to display a warning or warning
protected  MainView mGeebossGui
          GUI to access some methods
protected  org.eclipse.swt.widgets.Composite mParent
          Parent of the composite
protected static PropertyChangeManager mPropertyChangeManager
          The PropertyChangeManager holds a temp state of the made settings
protected  org.eclipse.swt.widgets.Button mRestore
          Restore button
 
Constructor Summary
protected PropertyPage(org.eclipse.swt.widgets.Composite parent, GeebossContainer container)
          Instantiates a new PropertyPage
protected PropertyPage(org.eclipse.swt.widgets.Composite parent, MainView geebossGui)
          Instantiates a new PropertyPage
 
Method Summary
abstract  void applyButtonPressed()
          The apply button has been pressed
protected  void createButtons()
          Create "Apply" and "Restore Defaults" button
protected  void createComposite()
          Create the composite that holds the PropertyPage
 void dispose()
          Dispose the composite that holds the property page
 GeebossContainer getContainer()
          Getter for container
static PropertyChangeManager getPropertyChangeManager()
           
protected abstract  void initComponents()
          Init all components
static void initPropertyChangeManager(MainView geebossGui)
          Init the PropertyChangeManager's settings with the ones from GlobalSettings
protected abstract  void restoreButtonPressed()
          The restore button has been pressed
protected  void setApplyButtonState(boolean enabled)
          Enable / Disable the "Apply"-Button
protected  void setButtonLayoutData(org.eclipse.swt.widgets.Button button)
          Set the layout data of the button to a GridData with appropriate heights and widths.
protected  void setButtonLayoutData(org.eclipse.swt.widgets.Button button, org.eclipse.swt.layout.GridData data)
          Set the layout data of the button to a GridData with appropriate heights and widths.
protected  void setErrorMessage(java.lang.String errorMessage)
          Set / unset the warning message on the dialog
protected  void setRestoreButtonState(boolean enabled)
          Enable / Disable the "Restore"-Button
protected  void setWarningMessage(java.lang.String warningMessage)
          Set / unset the warning message on the dialog
abstract  void updatePropertiesChangeManager()
          Update the temporary settings holder PropertiesChangeManager
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mPropertyChangeManager

protected static PropertyChangeManager mPropertyChangeManager
The PropertyChangeManager holds a temp state of the made settings


mApply

protected org.eclipse.swt.widgets.Button mApply
Apply button


mComposite

protected org.eclipse.swt.widgets.Composite mComposite
Holds the Property Page


mDialogFont

protected org.eclipse.swt.graphics.Font mDialogFont
Font to use for the components


mErrorMessageLabel

protected org.eclipse.swt.custom.CLabel mErrorMessageLabel
Label to display a warning or warning


mParent

protected org.eclipse.swt.widgets.Composite mParent
Parent of the composite


mRestore

protected org.eclipse.swt.widgets.Button mRestore
Restore button


mGeebossGui

protected MainView mGeebossGui
GUI to access some methods

Constructor Detail

PropertyPage

protected PropertyPage(org.eclipse.swt.widgets.Composite parent,
                       GeebossContainer container)
Instantiates a new PropertyPage

Parameters:
parent - Composite's parent
container - the geeboss container

PropertyPage

protected PropertyPage(org.eclipse.swt.widgets.Composite parent,
                       MainView geebossGui)
Instantiates a new PropertyPage

Parameters:
parent - Composite's parent
geebossGui - To access some methods
Method Detail

getContainer

public GeebossContainer getContainer()
Getter for container

Returns:
the container

getPropertyChangeManager

public static PropertyChangeManager getPropertyChangeManager()
Returns:
Returns the propertyChangeManager.

initPropertyChangeManager

public static void initPropertyChangeManager(MainView geebossGui)
Init the PropertyChangeManager's settings with the ones from GlobalSettings

Parameters:
geebossGui - The MainController

applyButtonPressed

public abstract void applyButtonPressed()
The apply button has been pressed


dispose

public void dispose()
Dispose the composite that holds the property page


updatePropertiesChangeManager

public abstract void updatePropertiesChangeManager()
Update the temporary settings holder PropertiesChangeManager


createButtons

protected void createButtons()
Create "Apply" and "Restore Defaults" button


createComposite

protected void createComposite()
Create the composite that holds the PropertyPage


initComponents

protected abstract void initComponents()
Init all components


restoreButtonPressed

protected abstract void restoreButtonPressed()
The restore button has been pressed


setApplyButtonState

protected void setApplyButtonState(boolean enabled)
Enable / Disable the "Apply"-Button

Parameters:
enabled - true for enabled

setButtonLayoutData

protected void setButtonLayoutData(org.eclipse.swt.widgets.Button button)
Set the layout data of the button to a GridData with appropriate heights and widths.

Parameters:
button - The button to set the layoutdata

setButtonLayoutData

protected void setButtonLayoutData(org.eclipse.swt.widgets.Button button,
                                   org.eclipse.swt.layout.GridData data)
Set the layout data of the button to a GridData with appropriate heights and widths.

Parameters:
button - The button to set the layoutdata
data - The GridData to use

setErrorMessage

protected void setErrorMessage(java.lang.String errorMessage)
Set / unset the warning message on the dialog

Parameters:
errorMessage - The warning message or NULL for no warning

setRestoreButtonState

protected void setRestoreButtonState(boolean enabled)
Enable / Disable the "Restore"-Button

Parameters:
enabled - true for enabled

setWarningMessage

protected void setWarningMessage(java.lang.String warningMessage)
Set / unset the warning message on the dialog

Parameters:
warningMessage - The warning message or NULL for no warning


Copyright (c) 2005 The Geeboss team (http://geeboss.sourceforge.net). All Rights Reserved.