|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.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 SimpleFeatureType as a parent. |
static class |
FeatureTypeEditor.FeatureTypeLabelProvider
Label provider for labeling AttributeTypes. |
Constructor Summary | |
---|---|
FeatureTypeEditor()
|
Method Summary | |
---|---|
void |
builderChanged()
Updates the viewer so it matches the state of the builder. |
SimpleFeatureTypeBuilder |
builderFromFeatureType(SimpleFeatureType ft)
|
MenuManager |
createContextMenu()
Creates a ContextMenu (the menu is created using the Table's composite as a parent) and returns the contextMenu. |
SimpleFeatureType |
createDefaultFeatureType()
Creates a default FeatureType . |
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,
SimpleFeatureType type)
Create the table control and set the input. |
void |
createTable(Composite parent,
java.lang.Object layoutData,
SimpleFeatureType featureType,
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 SimpleFeatureType. |
IAction |
getDeleteAction()
Returns an action that will delete the selected attributes from the SimpleFeatureType. |
SimpleFeatureType |
getFeatureType()
Retrieves the new SimpleFeatureType. |
SimpleFeatureTypeBuilder |
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 |
setErrorMessage(java.lang.String errorMessage)
|
void |
setFeatureType(SimpleFeatureType type)
Sets the SimpleFeatureType being edited. |
void |
setFeatureTypeBuilder(SimpleFeatureTypeBuilder newBuilder)
Deprecated. with the new SimpleFeatureTypeBuilder this is no
more possible, therefore deprecating. |
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, SimpleFeatureType 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, SimpleFeatureType featureType, 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).featureType
- the FeatureType
to use to populate the table.editable
- the editable flag of the tablepublic 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 SimpleFeatureTypeBuilder builderFromFeatureType(SimpleFeatureType ft)
public MenuManager createContextMenu()
It is recommended that the MenuManager be registered with an IWorkbenchPartSite
public void setGlobalActions(IActionBars actionBars)
actionBars
- public void setFeatureType(SimpleFeatureType type)
SimpleFeatureType
being edited.
If type is null then a new featureType is created. Must be called in the display thread.
type
- then new SimpleFeatureType to be edited, or null to create a new type.public final void setFeatureTypeBuilder(SimpleFeatureTypeBuilder newBuilder)
SimpleFeatureTypeBuilder
this is no
more possible, therefore deprecating.
builder
- public SimpleFeatureType createDefaultFeatureType()
FeatureType
.
The default type has a Geometry
attribute and a name
attribute.
The geometry attribute is a LineString
.
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 SimpleFeatureType getFeatureType()
public SimpleFeatureTypeBuilder getFeatureTypeBuilder()
public Control getControl()
public TreeViewer testingGetViewer()
public static java.util.List<LegalAttributeTypes> testingGetTYPES()
public Text testingGetNameText()
public void builderChanged()
public void setErrorMessage(java.lang.String errorMessage)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |