com.bbn.swede.editor.visualeditors.restriction
Class RestrictionEditorTableTree

java.lang.Object
  extended bycom.bbn.swede.editor.visualeditors.restriction.RestrictionEditorTableTree

public class RestrictionEditorTableTree
extends Object

The class that manages the graphical component of the Restriction Editor which contains the section heading, associated text, table tree viewer and buttons. This class also manages the configurations of the various cell editors associated with the table tree viewer.

Author:
aperezlo

Constructor Summary
RestrictionEditorTableTree()
           
 
Method Summary
 void configureCellEditors()
          Configures the property cell editors.
protected  void createButtons(FormToolkit toolkit, Composite client)
          Convenience method to create the Add and Remove buttons seen in the restriction editor.
 void createCellEditors()
          Creates the cell editors used by this component.
 void createComponent(ScrolledForm form, Composite parent, FormToolkit toolkit, RestrictionEditorInspector inspector, IOWLAbstractSyntaxTree oast)
          Creates and initializes the table tree viewer used by the restriction editor.
protected  void deleteRestriction(Restriction toDelete)
          Uses an IOASTRunnable to delete the given restriction from the OAST that contains it.
 Object getInput()
          Delegate method, passed on to this component's table tree viewer.
 void refresh()
          Delegate method, passes this call through to the table tree viewer.
 void selectionChanged(SelectionChangedEvent event)
           
 void setInput(Object oast)
          Delegate method, passed on to this component's table tree viewer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RestrictionEditorTableTree

public RestrictionEditorTableTree()
Method Detail

createComponent

public void createComponent(ScrolledForm form,
                            Composite parent,
                            FormToolkit toolkit,
                            RestrictionEditorInspector inspector,
                            IOWLAbstractSyntaxTree oast)
Creates and initializes the table tree viewer used by the restriction editor. This is the main interface between this class and other classes.

Parameters:
form - the from in which this component exists
parent - the parent in which this component should exist
toolkit - the form toolkit used by the restriction editor
inspector - the inspector used to populate this component
oast - the OAST of the document being edited

createButtons

protected void createButtons(FormToolkit toolkit,
                             Composite client)
Convenience method to create the Add and Remove buttons seen in the restriction editor.

Parameters:
toolkit - the toolkit to use to create the buttons
client - the parent composite of the buttons

refresh

public void refresh()
Delegate method, passes this call through to the table tree viewer.


createCellEditors

public void createCellEditors()
Creates the cell editors used by this component.


getInput

public Object getInput()
Delegate method, passed on to this component's table tree viewer.

Returns:
the input used by this component's table tree viewer

setInput

public void setInput(Object oast)
Delegate method, passed on to this component's table tree viewer.

Parameters:
oast - an OWL Abstract Syntax Tree to be used to populate this component

configureCellEditors

public void configureCellEditors()
Configures the property cell editors.


deleteRestriction

protected void deleteRestriction(Restriction toDelete)
Uses an IOASTRunnable to delete the given restriction from the OAST that contains it.

Parameters:
toDelete - the Restriction node to be removed

selectionChanged

public void selectionChanged(SelectionChangedEvent event)


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