|
||||||||||
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.CreateAttributeList
public class CreateAttributeList
Manages the process of creating new attributes into newly created element. Attributes themselves are not created, their names and values are returned instead.
Nested Class Summary | |
---|---|
class |
CreateAttributeList.State
Current state of the widget. |
Field Summary | |
---|---|
protected List<QName> |
_names
List of chosen attribute names. |
protected List<String> |
_values
List of chosen attribute values. |
protected Composite |
composite
All controls are placed here. |
NamespaceManager |
currentManager
Namespace manager. |
protected ValidityMessages |
lastMessages
Errors that occured during last fillData() call. |
String |
parentName
Name of parent element; used only to display the name on the shell. |
protected TabFolder |
tabFolder
The tab folder, where all attribute-related controls are stored. |
XMLAccess |
xmlAccess
Document instance. |
Fields inherited from class sk.uniba.euromath.editor.widgets.AbstractUserInputWidget |
---|
listeners, msgListeners |
Constructor Summary | |
---|---|
CreateAttributeList(Composite parent,
List<AttributeListRule> listRules,
String parentName,
XMLAccess xmlAccess,
NamespaceManager currentManager)
Constructs the instance of the window. |
Method Summary | |
---|---|
protected void |
fillData()
Fills the _names , _values lists and the
_namespaces set. |
Set<String> |
getAllNamespaces()
Retrieves all namespaces of currently selected attributes. |
Composite |
getComposite()
Returns composite that is encapsulated in this object. |
ValidityMessages |
getMessages()
Checks if data contained in the widget are correct. |
List<QName> |
getNames()
Returns names of actually selected attributes. |
Object |
getState()
Returns the state of this widget. |
Class<?> |
getStateClass()
Returns the class of the state that the widget accepts. |
List<String> |
getValues()
Returns text values of attributes. |
void |
setState(Object state)
Sets new state for the widget. |
protected void |
update()
Recreates all namelists and updates all combo boxes. |
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
public final XMLAccess xmlAccess
public final NamespaceManager currentManager
public final String parentName
protected TabFolder tabFolder
protected List<QName> _names
protected List<String> _values
protected ValidityMessages lastMessages
fillData()
call.
Constructor Detail |
---|
public CreateAttributeList(Composite parent, List<AttributeListRule> listRules, String parentName, XMLAccess xmlAccess, NamespaceManager currentManager)
parent
- the parent composite.listRules
- the list of lists of attribute. Exactly one list will be
chosen.parentName
- the name of the parent element. Used only to display
the name on the shell.xmlAccess
- the xml document instance.currentManager
- the current manager.Method Detail |
---|
protected void update()
public Composite getComposite()
IUserInputWidget
public List<QName> getNames()
null
.
null
if fillData()
fails.public List<String> getValues()
null
.
null
if
fillData()
fails.protected void fillData()
Fills the _names
, _values
lists and the
_namespaces
set. The tab control must not yet be disposed.
If any combobox does not have name selected then function fails - it sets
both lists to null
and exits, returning non-null
error message. If any attribute has illegal value, then function sets
error message and fails.
public ValidityMessages getMessages()
IUserInputWidget
null
if data is correct, or instance of
ValidityMessages
if there is error, warning or info
message.public Set<String> getAllNamespaces()
null
or incomplete set.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 |