|
||||||||||
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.NewPrefixesQuery
public class NewPrefixesQuery
Queries for new prefixes.
Nested Class Summary | |
---|---|
protected class |
NewPrefixesQuery.TextDisposeListener
Dispose listener for text boxes. |
Field Summary | |
---|---|
protected Composite |
composite
Composite where all controls are placed. |
protected ValidityMessages |
lastMessages
Error messages. |
protected Set<String> |
namespaces
Get prefixes for these namespaces. |
protected NamespaceManager |
nsManager
Current namespace manager. |
protected Map<String,String> |
prefixes
Maps namespace URI to prefix. |
protected Map<String,Text> |
prefixTexts
Here all prefix textboxes are kept. |
Fields inherited from class sk.uniba.euromath.editor.widgets.AbstractUserInputWidget |
---|
listeners, msgListeners |
Constructor Summary | |
---|---|
NewPrefixesQuery(Composite parent,
Set<String> namespaces,
NamespaceManager nsManager)
Constructs the component. |
Method Summary | |
---|---|
protected void |
checkErrors(Map<String,String> map)
Checks data for errors. |
Composite |
getComposite()
Returns composite that is encapsulated in this object. |
ValidityMessages |
getMessages()
Checks if data contained in the widget are correct. |
static Set<String> |
getNamespaces(List<? extends QName> qnames)
Returns all namespaces that occurs in given list. |
Map<String,String> |
getPrefixes()
Returns currently selected prefixes. |
Map<String,String> |
getPrefixesInternal()
Returns currently selected prefixes. |
Map<String,String> |
getState()
Returns the state of this widget. |
Class<?> |
getStateClass()
Returns the class of the state that the widget accepts. |
NamespaceManager |
newUpdatedManager()
Produces a namespace manager where these new prefixes are registered. |
List<QName> |
setPrefixes(List<QName> qnames)
Modifies the prefixes of all qnames to currently selected prefixes. |
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 Set<String> namespaces
protected final NamespaceManager nsManager
protected final Map<String,Text> prefixTexts
protected final Map<String,String> prefixes
protected ValidityMessages lastMessages
Constructor Detail |
---|
public NewPrefixesQuery(Composite parent, Set<String> namespaces, NamespaceManager nsManager)
parent
- the parent composite.namespaces
- get prefixes for these namespaces.nsManager
- current namespace manager. New prefixes are not
registered here, new manager is created instead.Method Detail |
---|
public Composite getComposite()
IUserInputWidget
public Map<String,String> getPrefixes()
null
.public Map<String,String> getPrefixesInternal()
null
.public static Set<String> getNamespaces(List<? extends QName> qnames)
qnames
- set of qnames. null
s are permitted - they
are simply ignored.
public NamespaceManager newUpdatedManager()
IllegalArgumentException
- if the page contains errors thus some
prefixes cannot be registered.
IllegalStateException
- if the page contains errors thus some
prefixes cannot be registered.public ValidityMessages getMessages()
IUserInputWidget
null
if data is correct, or instance of
ValidityMessages
if there is error, warning or info
message.protected void checkErrors(Map<String,String> map)
map
- map that maps namespace URI to prefix, must not be
null
.public List<QName> setPrefixes(List<QName> qnames)
qnames
- list of qnames to modify
public Map<String,String> 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 |