|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.refractions.udig.ui.FeatureTypeEditor
public class FeatureTypeEditor
A composite editor based on a JFace TreeViewer for creating and editing feature types.
Nested Class Summary | |
---|---|
class |
FeatureTypeEditor.AttributeCellModifier
|
static class |
FeatureTypeEditor.FeatureTypeContentProvider
A Tree Content Provider that serves up attributeTypes from a FeatureType as a parent. |
static class |
FeatureTypeEditor.FeatureTypeLabelProvider
Label provider for labelling AttributeTypes |
Constructor Summary | |
---|---|
FeatureTypeEditor()
|
Method Summary | |
---|---|
void |
builderChanged()
Updates the viewer so it matches the state of the builder. |
MenuManager |
createContextMenu()
Creates a ContextMenu (the menu is created using the Table's composite as a parent) and returns the contextMenu. |
FeatureTypeBuilder |
createDefaultFeatureType()
Creates a default FeatureTypeBuilder. |
void |
createFeatureTypeNameText(Composite parent,
java.lang.Object layoutData)
Creates a Text input object that for modify the feature type name. |
void |
createTable(Composite parent,
java.lang.Object layoutData)
Create the table control and set the input. |
void |
createTable(Composite parent,
java.lang.Object layoutData,
FeatureType type)
Create the table control and set the input. |
void |
createTable(Composite parent,
java.lang.Object layoutData,
FeatureTypeBuilder builder,
boolean editable)
Create the table control and set the input. |
Control |
getControl()
Returns the control that is the FeatureTypeEditor |
IAction |
getCreateAttributeAction()
Returns an action that will add a new attribute to the FeatureType. |
IAction |
getDeleteAction()
Returns an action that will delete the selected attributes from the FeatureType. |
FeatureType |
getFeatureType()
Retrieves the new FeatureType. |
FeatureTypeBuilder |
getFeatureTypeBuilder()
Returns the FeatureTypeBuilder that is used for editing the feature type. |
java.util.List<LegalAttributeTypes> |
getLegalTypes()
|
void |
setDefaultCRS(CoordinateReferenceSystem crs)
|
void |
setEditable(boolean editable)
Sets whether the table is editable or just a viewer. |
void |
setFeatureType(FeatureType type)
Sets the FeatureType being edited. |
void |
setFeatureTypeBuilder(FeatureTypeBuilder newBuilder)
Sets the FeatureTypeBuilder used for creating the feature type. |
void |
setGlobalActions(IActionBars actionBars)
Sets the Global actions that apply. |
void |
setLegalTypes(java.util.List<LegalAttributeTypes> legalTypes)
Declares what types are permitted as attributes. |
Text |
testingGetNameText()
|
static java.util.List<LegalAttributeTypes> |
testingGetTYPES()
PUBLIC ONLY so tests can verify the correct behaviour. |
TreeViewer |
testingGetViewer()
PUBLIC ONLY so tests can verify the correct behaviour. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FeatureTypeEditor()
Method Detail |
---|
public void createTable(Composite parent, java.lang.Object layoutData)
parent
- the composite that will be used as the TreeViewer's parent.layoutData
- the layout data to use to layout the editor. If null GridData(Fill_Both)public void createTable(Composite parent, java.lang.Object layoutData, FeatureType type)
parent
- the composite that will be used as the TreeViewer's parent.layoutData
- the layout data to use to layout the editor. If null GridData(Fill_Both)public void createTable(Composite parent, java.lang.Object layoutData, FeatureTypeBuilder builder, boolean editable)
parent
- the composite that will be used as the TreeViewer's parent.layoutData
- the layout data to use to layout the editor. If null GridData(Fill_Both)public void setLegalTypes(java.util.List<LegalAttributeTypes> legalTypes)
legalTypes
- the List of legal types in the order they will be displayed.public java.util.List<LegalAttributeTypes> getLegalTypes()
public void setEditable(boolean editable)
editable
- if true then the table can be editedpublic MenuManager createContextMenu()
It is recommended that the MenuManager be registered with an IWorkbenchPartSite
public void setGlobalActions(IActionBars actionBars)
actionBars
- public void setFeatureType(FeatureType type)
type
- then new FeatureType to be edited, or null to create a new type.public final void setFeatureTypeBuilder(FeatureTypeBuilder newBuilder)
builder
- public FeatureTypeBuilder createDefaultFeatureType()
public void setDefaultCRS(CoordinateReferenceSystem crs)
public IAction getCreateAttributeAction()
public IAction getDeleteAction()
public void createFeatureTypeNameText(Composite parent, java.lang.Object layoutData)
parent
- the parent of the text objectpublic FeatureType getFeatureType() throws SchemaException
SchemaException
public FeatureTypeBuilder getFeatureTypeBuilder()
public Control getControl()
public TreeViewer testingGetViewer()
public static java.util.List<LegalAttributeTypes> testingGetTYPES()
public Text testingGetNameText()
public void builderChanged()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |