|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object sk.uniba.euromath.editor.widgets.AbstractUserInputWidget sk.uniba.euromath.editor.widgets.GraphSelectorWidget
public class GraphSelectorWidget
Allows user to select choices in an export graph. Able to convert list of
graph nodes to a list of TransformNode
instances.
Nested Class Summary | |
---|---|
class |
GraphSelectorWidget.State
The state of the widget. |
Field Summary | |
---|---|
protected Composite |
composite
Here all controls will be placed. |
protected sk.baka.xml.gene.exportgraph.ExportGraph |
graph
Graph provided to the constructor. |
protected IdentityHashMap<sk.baka.xml.gene.exportgraph.GraphNode,Map<String,sk.uniba.euromath.editor.widgets.GraphSelectorWidget.ComboAndValue>> |
graphChoices
Contains choices in graphs. |
protected Map<String,sk.uniba.euromath.editor.widgets.GraphSelectorWidget.CheckboxAndValue> |
wildcardCheckboxes
Contains all wildcard checkboxes. |
Fields inherited from class sk.uniba.euromath.editor.widgets.AbstractUserInputWidget |
---|
listeners, msgListeners |
Constructor Summary | |
---|---|
GraphSelectorWidget(Composite parent,
Map<sk.baka.xml.gene.exportgraph.GraphNode,Set<String>> editableChoices,
sk.baka.xml.gene.exportgraph.ExportGraph graph)
Constructor. |
Method Summary | |
---|---|
Composite |
getComposite()
Returns composite that is encapsulated in this object. |
static Map<sk.baka.xml.gene.exportgraph.GraphNode,Set<String>> |
getEditableChoices(sk.baka.xml.gene.exportgraph.ExportGraph graph)
Computes and returns all choice nodes that the user can edit using this widget. |
ValidityMessages |
getMessages()
Checks if data contained in the widget are correct. |
Object |
getState()
Returns the state of this widget. |
Class<?> |
getStateClass()
Returns the class of the state that the widget accepts. |
sk.baka.xml.gene.exportgraph.TransformGraph |
getTransformationInfo(sk.baka.xml.gene.CoordinatorInfo info)
Processes actual selection and returns exact transformation tree. |
protected static void |
scanGraph(sk.baka.xml.gene.exportgraph.GraphNode graph,
Map<sk.baka.xml.gene.exportgraph.GraphNode,Set<String>> editableChoices)
Scans the graph for a choice node. |
void |
setState(Object state)
Sets new state for the widget. |
Methods inherited from class sk.uniba.euromath.editor.widgets.AbstractUserInputWidget |
---|
addMessageListener, addModifyListener, allowModifyEvent, fireDataModified, removeMessageListener, removeModifyListener, suppressModifyEvent |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final Composite composite
protected final sk.baka.xml.gene.exportgraph.ExportGraph graph
protected final IdentityHashMap<sk.baka.xml.gene.exportgraph.GraphNode,Map<String,sk.uniba.euromath.editor.widgets.GraphSelectorWidget.ComboAndValue>> graphChoices
protected final Map<String,sk.uniba.euromath.editor.widgets.GraphSelectorWidget.CheckboxAndValue> wildcardCheckboxes
Constructor Detail |
---|
public GraphSelectorWidget(Composite parent, Map<sk.baka.xml.gene.exportgraph.GraphNode,Set<String>> editableChoices, sk.baka.xml.gene.exportgraph.ExportGraph graph)
parent
- the parent widgeteditableChoices
- all choice nodes. May be empty or
null
.graph
- offer this graph to user. Must not be empty.
IllegalArgumentException
- if graphList or editableChoices is
empty, or editableChoices refers to non-choosable nodes.Method Detail |
---|
public static Map<sk.baka.xml.gene.exportgraph.GraphNode,Set<String>> getEditableChoices(sk.baka.xml.gene.exportgraph.ExportGraph graph)
graph
- the export graph. Should be able to transform whole
document.
null
. A map of choice nodes. If empty then
there are no choice points.protected static void scanGraph(sk.baka.xml.gene.exportgraph.GraphNode graph, Map<sk.baka.xml.gene.exportgraph.GraphNode,Set<String>> editableChoices)
graphChoices
map and the scan continues.
Descendants of the choice node are not searched for the choice nodes.
graph
- graph to analyze.editableChoices
- put all choice nodes here.public sk.baka.xml.gene.exportgraph.TransformGraph getTransformationInfo(sk.baka.xml.gene.CoordinatorInfo info) throws sk.baka.xml.gene.ExportException, IOException
Processes actual selection and returns exact transformation tree. Each transformation info is produced from appropriate graph node: i-th info is produced from i-th graphlist item.
Not all choice nodes are made selectable; if a choice node is not selectable then simply the first exporter is selected.
info
- the coordinator info object.
sk.baka.xml.gene.ExportException
- if exporter fails to initialize.
IOException
- if i/o error occurs.public Composite getComposite()
IUserInputWidget
public ValidityMessages getMessages()
IUserInputWidget
null
if data is correct, or instance of
ValidityMessages
if there is error, warning or info
message.public Object getState()
IUserInputWidget
public Class<?> getStateClass()
IUserInputWidget
null
.public void setState(Object state)
IUserInputWidget
state
- the model to set. You may use the construct
setModel(getModel())
to reflect changes made in the model.
Please note that nearly all widgets rejects null
value.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |