org.topbraidcomposer.widgets.row.editors
Class AbstractTextRowEditor

java.lang.Object
  extended by org.topbraidcomposer.widgets.row.editors.AbstractTextRowEditor
All Implemented Interfaces:
IStatementProvider, ITextRowEditor, IAssignableRowEditor, IRowEditor
Direct Known Subclasses:
ClassEditor, InstanceEditor, LiteralEditor, RDFListEditor, StringEditor

public abstract class AbstractTextRowEditor
extends java.lang.Object
implements ITextRowEditor


Constructor Summary
AbstractTextRowEditor(org.eclipse.swt.widgets.Composite parent, org.eclipse.ui.forms.widgets.FormToolkit toolkit, com.hp.hpl.jena.rdf.model.Statement statement, IRowEditorCallback callback)
           
 
Method Summary
 void addDropDownMenuActions(org.eclipse.jface.action.IMenuManager menuManager)
           
 void assign()
           
protected abstract  AbstractEditorText createEditorText(org.eclipse.swt.widgets.Composite parent, org.eclipse.ui.forms.widgets.FormToolkit toolkit, com.hp.hpl.jena.rdf.model.Statement statement)
           
 org.eclipse.swt.widgets.Control getControl()
           
 com.hp.hpl.jena.rdf.model.Statement getStatement()
           
 com.hp.hpl.jena.rdf.model.Statement[] getStatements()
          Gets the selected statements that can be copied or moved.
 java.lang.String getText()
          Gets the currently edited value as text (for drag-and-drop).
 boolean isAssignable()
           
 boolean isDirty()
           
 boolean isReadOnly()
          Checks if the statements are meant to be read-only.
 void setText(java.lang.String value)
           
 void updateState()
          Advises the editor to update its display state, e.g.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractTextRowEditor

public AbstractTextRowEditor(org.eclipse.swt.widgets.Composite parent,
                             org.eclipse.ui.forms.widgets.FormToolkit toolkit,
                             com.hp.hpl.jena.rdf.model.Statement statement,
                             IRowEditorCallback callback)
Method Detail

addDropDownMenuActions

public void addDropDownMenuActions(org.eclipse.jface.action.IMenuManager menuManager)
Specified by:
addDropDownMenuActions in interface IRowEditor

assign

public void assign()
Specified by:
assign in interface IAssignableRowEditor

createEditorText

protected abstract AbstractEditorText createEditorText(org.eclipse.swt.widgets.Composite parent,
                                                       org.eclipse.ui.forms.widgets.FormToolkit toolkit,
                                                       com.hp.hpl.jena.rdf.model.Statement statement)

getControl

public org.eclipse.swt.widgets.Control getControl()
Specified by:
getControl in interface IRowEditor

getStatement

public com.hp.hpl.jena.rdf.model.Statement getStatement()

getStatements

public com.hp.hpl.jena.rdf.model.Statement[] getStatements()
Description copied from interface: IStatementProvider
Gets the selected statements that can be copied or moved.

Specified by:
getStatements in interface IStatementProvider
Returns:
the Statements

getText

public java.lang.String getText()
Description copied from interface: IRowEditor
Gets the currently edited value as text (for drag-and-drop).

Specified by:
getText in interface IRowEditor
Returns:
a textual representation or null if there is no suitable text

isAssignable

public boolean isAssignable()
Specified by:
isAssignable in interface IAssignableRowEditor

isDirty

public boolean isDirty()
Specified by:
isDirty in interface IAssignableRowEditor

isReadOnly

public boolean isReadOnly()
Description copied from interface: IStatementProvider
Checks if the statements are meant to be read-only. If a statement provider is read-only, then the drag target should only perform a copy operation instead of a move operation.

Specified by:
isReadOnly in interface IStatementProvider
Returns:
true if this is read-only (such as the basket)

setText

public void setText(java.lang.String value)
Specified by:
setText in interface ITextRowEditor

updateState

public void updateState()
Description copied from interface: IRowEditor
Advises the editor to update its display state, e.g. to change the background color or icon.

Specified by:
updateState in interface IRowEditor