com.javapathfinder.vjp.config.editors
Class ModePropertyEditorComposite

java.lang.Object
  extended by org.eclipse.swt.widgets.Widget
      extended by org.eclipse.swt.widgets.Control
          extended by org.eclipse.swt.widgets.Scrollable
              extended by org.eclipse.swt.widgets.Composite
                  extended by com.javapathfinder.vjp.config.editors.ModePropertyEditorComposite
All Implemented Interfaces:
PropertyChangeListener, java.util.EventListener, org.eclipse.swt.events.SelectionListener, org.eclipse.swt.graphics.Drawable, org.eclipse.swt.internal.SWTEventListener

public class ModePropertyEditorComposite
extends org.eclipse.swt.widgets.Composite
implements org.eclipse.swt.events.SelectionListener, PropertyChangeListener

This composite holds all of the modeproperty editors.

Author:
Sandro Badame

Field Summary
 
Fields inherited from class org.eclipse.swt.widgets.Composite
embeddedHandle
 
Fields inherited from class org.eclipse.swt.widgets.Widget
handle
 
Constructor Summary
ModePropertyEditorComposite(org.eclipse.swt.widgets.Composite parent, org.eclipse.jdt.core.IJavaProject project, org.eclipse.core.resources.IFile configFile)
          Constructs this composite to hold all of the modeproperty editors.
ModePropertyEditorComposite(org.eclipse.swt.widgets.Composite parent, ModePropertyConfiguration properties)
          Constructs this composite to hold all of the modeproperty editors.
 
Method Summary
 void changeOccurred()
          To be called when a change occurs to the property
 ModePropertyConfiguration getModePropertyConfiguraton()
          returns the mode property configuration this editor is modifying.
 boolean isDirty()
           
 void revertProperties()
          Reverts this editor show the properties contained in the file.
 void saveProperties()
          Saves the properties being modified to the configuration file
 void widgetDefaultSelected(org.eclipse.swt.events.SelectionEvent e)
           
 void widgetSelected(org.eclipse.swt.events.SelectionEvent e)
          Executed when save or revert is clicked on.
 
Methods inherited from class org.eclipse.swt.widgets.Composite
changed, computeSize, getBackgroundMode, getChildren, getClientArea, getLayout, getLayoutDeferred, getTabList, isLayoutDeferred, layout, layout, layout, layout, setBackgroundMode, setFocus, setLayout, setLayoutDeferred, setTabList
 
Methods inherited from class org.eclipse.swt.widgets.Scrollable
computeTrim, getBorderWidth, getHorizontalBar, getVerticalBar
 
Methods inherited from class org.eclipse.swt.widgets.Control
addControlListener, addFocusListener, addHelpListener, addKeyListener, addMouseListener, addMouseMoveListener, addMouseTrackListener, addPaintListener, addTraverseListener, computeSize, forceFocus, getAccessible, getBackground, getBackgroundImage, 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, setBackgroundImage, 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, dispose, getData, getData, getDisplay, getStyle, isDisposed, isListening, notifyListeners, removeDisposeListener, removeListener, setData, setData, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ModePropertyEditorComposite

public ModePropertyEditorComposite(org.eclipse.swt.widgets.Composite parent,
                                   ModePropertyConfiguration properties)
Constructs this composite to hold all of the modeproperty editors.

Parameters:
parent - the parent for this composite
project - the java project associated to the modepropertyconfiguration
properties - the modepropertyconfiguration being modified.

ModePropertyEditorComposite

public ModePropertyEditorComposite(org.eclipse.swt.widgets.Composite parent,
                                   org.eclipse.jdt.core.IJavaProject project,
                                   org.eclipse.core.resources.IFile configFile)
Constructs this composite to hold all of the modeproperty editors.

Parameters:
parent - the parent for this composite
project - the java project associated to the modepropertyconfiguration
file - the modepropertyfile being modified.
Method Detail

widgetSelected

public void widgetSelected(org.eclipse.swt.events.SelectionEvent e)
Executed when save or revert is clicked on.

Specified by:
widgetSelected in interface org.eclipse.swt.events.SelectionListener

widgetDefaultSelected

public void widgetDefaultSelected(org.eclipse.swt.events.SelectionEvent e)
Specified by:
widgetDefaultSelected in interface org.eclipse.swt.events.SelectionListener

saveProperties

public void saveProperties()
Saves the properties being modified to the configuration file


revertProperties

public void revertProperties()
Reverts this editor show the properties contained in the file.


changeOccurred

public void changeOccurred()
Description copied from interface: PropertyChangeListener
To be called when a change occurs to the property

Specified by:
changeOccurred in interface PropertyChangeListener

isDirty

public boolean isDirty()

getModePropertyConfiguraton

public ModePropertyConfiguration getModePropertyConfiguraton()
returns the mode property configuration this editor is modifying.

Returns:
modepropertyconfiguration