com.bbn.swede.ui.wizards
Class PropertyEditor

java.lang.Object
  extended bycom.bbn.swede.ui.wizards.PropertyEditor

public class PropertyEditor
extends Object

A widget used to populate Properties objects. It consists of a checkbox table with two buttons - add metadata and remove metadata as well as associated cell editors. It also supports read-only properties, which are not editable.

Author:
aperezlo

Nested Class Summary
protected  class PropertyEditor.InternalCellModifier
           
protected  class PropertyEditor.InternalContentProvider
           
protected  class PropertyEditor.InternalLabelProvider
           
protected  class PropertyEditor.InternalSelectionListener
           
 
Field Summary
protected static int NAME_COLUMN_INDEX
          The index of the name column.
protected static String NAME_COLUMN_STR
          Label for the name column.
protected static int VALUE_COLUMN_INDEX
          The index of the value column.
protected static String VALUE_COLUMN_STR
          Label for the value column.
 
Constructor Summary
PropertyEditor(Properties props)
          Constructor.
 
Method Summary
 void addDoubleClickListener(IDoubleClickListener listener)
          Delegate method.
 void addFilter(ViewerFilter filter)
          Delegate method.
 void addHelpListener(HelpListener listener)
          Delegate method.
 void addOpenListener(IOpenListener listener)
          Delegate method.
 void addPostSelectionChangedListener(ISelectionChangedListener listener)
          Delegate method.
 void addSelectionChangedListener(ISelectionChangedListener listener)
          Delegate method.
 void createControl(Composite parent, int style)
          Creates a GUI control and configures it.
 Control getControl()
          Accessor.
 boolean getEnabled()
          Accessor.
 ViewerFilter[] getFilters()
          Delegate method.
 Properties getProperties()
          Accessor.
 void removeDoubleClickListener(IDoubleClickListener listener)
          Delegate method.
 void removeFilter(ViewerFilter filter)
          Delegate method.
 void removeHelpListener(HelpListener listener)
          Delegate method.
 void removeOpenListener(IOpenListener listener)
          Delegate method.
 void removePostSelectionChangedListener(ISelectionChangedListener listener)
          Delegate method.
 void removeSelectionChangedListener(ISelectionChangedListener listener)
          Delegate method.
 void resetFilters()
          Delegate method.
 void setEnabled(boolean enabled)
          Mutator.
 void setProperties(Properties newProps)
          Mutator.
 void setReadOnly(String property, boolean isReadOnly)
          Mutator.
 void setSelection(ISelection selection)
          Delegate method.
 void setSelection(ISelection selection, boolean reveal)
          Delegate method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NAME_COLUMN_STR

protected static final String NAME_COLUMN_STR
Label for the name column.

See Also:
Constant Field Values

VALUE_COLUMN_STR

protected static final String VALUE_COLUMN_STR
Label for the value column.

See Also:
Constant Field Values

NAME_COLUMN_INDEX

protected static final int NAME_COLUMN_INDEX
The index of the name column.

See Also:
Constant Field Values

VALUE_COLUMN_INDEX

protected static final int VALUE_COLUMN_INDEX
The index of the value column.

See Also:
Constant Field Values
Constructor Detail

PropertyEditor

public PropertyEditor(Properties props)
Constructor.

Parameters:
props - the properties object to edit
Method Detail

setReadOnly

public void setReadOnly(String property,
                        boolean isReadOnly)
Mutator. Configure a particular property to be read only (or not).

Parameters:
property - name of the property
isReadOnly - true if it should be read-only, false otherwise

createControl

public void createControl(Composite parent,
                          int style)
Creates a GUI control and configures it.

Parameters:
parent - the parent component
style - the default style informationds

getControl

public Control getControl()
Accessor.

Returns:
the table control used by this PropertyEditor object

getEnabled

public boolean getEnabled()
Accessor.

Returns:
true if this component is enabled, false otherwise

setEnabled

public void setEnabled(boolean enabled)
Mutator. Sets the enabled status of this control.

Parameters:
enabled - true if this component should be enabled, false otherwise

setProperties

public void setProperties(Properties newProps)
Mutator. Set the properties object to be edited by this 'Editor.

Parameters:
newProps - the java.util.Properties object to be edited

getProperties

public Properties getProperties()
Accessor.

Returns:
the Properties object being edited by this 'Editor

addDoubleClickListener

public void addDoubleClickListener(IDoubleClickListener listener)
Delegate method.

Parameters:
listener -

addFilter

public void addFilter(ViewerFilter filter)
Delegate method.

Parameters:
filter -

addHelpListener

public void addHelpListener(HelpListener listener)
Delegate method.

Parameters:
listener -

addOpenListener

public void addOpenListener(IOpenListener listener)
Delegate method.

Parameters:
listener -

addPostSelectionChangedListener

public void addPostSelectionChangedListener(ISelectionChangedListener listener)
Delegate method.

Parameters:
listener -

addSelectionChangedListener

public void addSelectionChangedListener(ISelectionChangedListener listener)
Delegate method.

Parameters:
listener -

getFilters

public ViewerFilter[] getFilters()
Delegate method.

Returns:
filters

removeDoubleClickListener

public void removeDoubleClickListener(IDoubleClickListener listener)
Delegate method.

Parameters:
listener -

removeFilter

public void removeFilter(ViewerFilter filter)
Delegate method.

Parameters:
filter -

removeHelpListener

public void removeHelpListener(HelpListener listener)
Delegate method.

Parameters:
listener -

removeOpenListener

public void removeOpenListener(IOpenListener listener)
Delegate method.

Parameters:
listener -

removePostSelectionChangedListener

public void removePostSelectionChangedListener(ISelectionChangedListener listener)
Delegate method.

Parameters:
listener -

removeSelectionChangedListener

public void removeSelectionChangedListener(ISelectionChangedListener listener)
Delegate method.

Parameters:
listener -

resetFilters

public void resetFilters()
Delegate method.


setSelection

public void setSelection(ISelection selection)
Delegate method.

Parameters:
selection -

setSelection

public void setSelection(ISelection selection,
                         boolean reveal)
Delegate method.

Parameters:
selection -
reveal -


Copyright © 2004-2005 BBN Technologies. All Rights Reserved.