sk.uniba.euromath.editor.dialogs
Class Dialogs

java.lang.Object
  extended by sk.uniba.euromath.editor.dialogs.Dialogs

public final class Dialogs
extends Object

Instantiate various dialogs.

Author:
Martin Vysny

Method Summary
static WidgetWrapperDialog<NameListItemChooser<AttributeRule>> createAttributeCreator(Shell parent, INameList<AttributeRule> nameList, XMLAccess xmlAccess, NamespaceManager nsManager)
          Constructs an instance of a dialog, that will be used to create an attribute.
static WidgetWrapperDialog<NameListItemChooser<AttributeRule>> createAttributeEditor(Shell parent, Attr attr, AttributeRule rule, XMLAccess xmlAccess, NamespaceManager nsManager)
          Constructs an instance of a dialog, that will be used to modify an attribute value.
static WidgetWrapperDialog<NameListItemChooser<NewElementRule>> createElementCreator(Shell parent, XMLAccess xmlAccess, String caption, DisplayableNameList<NewElementRule> dnl)
          Constructs an instance of a dialog, that will be used to select an element name.
static WidgetWrapperDialog<EntityList> createEntityLister(Shell parent, XMLAccess xmlAccess, String caption, IEntityFilter filter)
          Constructs an instance of a dialog, that will be used to select an entity.
static WidgetWrapperDialog<EntityList> createEntityLister(Shell parent, XMLAccess xmlAccess, String caption, List<? extends String> entityNames)
          Constructs an instance of a dialog, that will be used to select an entity.
static WidgetWrapperDialog<GraphSelectorWidget> createGraphSelector(Shell parent, Map<GraphNode,Set<String>> editableChoices, ExportGraph graph)
          Creates dialog that allows you to choose exporters.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

createAttributeCreator

public static WidgetWrapperDialog<NameListItemChooser<AttributeRule>> createAttributeCreator(Shell parent,
                                                                                             INameList<AttributeRule> nameList,
                                                                                             XMLAccess xmlAccess,
                                                                                             NamespaceManager nsManager)
Constructs an instance of a dialog, that will be used to create an attribute. Component will not create the attribute itself.

Parameters:
parent - the parent widget. should not be null.
nameList - list of attributes that can be created.
xmlAccess - the XMLAccess instance.
nsManager - the namespace manager. If null then the one from xmlAccess will be used.
Returns:
namelist item chooser, intented for creating an attribute

createAttributeEditor

public static WidgetWrapperDialog<NameListItemChooser<AttributeRule>> createAttributeEditor(Shell parent,
                                                                                            Attr attr,
                                                                                            AttributeRule rule,
                                                                                            XMLAccess xmlAccess,
                                                                                            NamespaceManager nsManager)
Constructs an instance of a dialog, that will be used to modify an attribute value. Component will not modify the attribute itself.

Parameters:
parent - the parent widget. should not be null.
attr - the attribute. The window will not change the attribute value itself.
rule - the rule for the attribute.
xmlAccess - the XMLAccess instance.
nsManager - namespace manager. If null then the one from xmlAccess will be used.
Returns:
namelist item chooser, intented for modifying attribute value only

createEntityLister

public static WidgetWrapperDialog<EntityList> createEntityLister(Shell parent,
                                                                 XMLAccess xmlAccess,
                                                                 String caption,
                                                                 IEntityFilter filter)
Constructs an instance of a dialog, that will be used to select an entity. Component will not modify the attribute itself.

Parameters:
parent - the parent widget. should not be null.
xmlAccess - the XMLAccess instance.
caption - caption of the dialog.
filter - filters out unwanted entities. If null then no entities are filtered out.
Returns:
an entity selector.

createEntityLister

public static WidgetWrapperDialog<EntityList> createEntityLister(Shell parent,
                                                                 XMLAccess xmlAccess,
                                                                 String caption,
                                                                 List<? extends String> entityNames)
Constructs an instance of a dialog, that will be used to select an entity. Component will not modify the attribute itself.

Parameters:
parent - the parent widget. should not be null.
xmlAccess - the XMLAccess instance.
caption - caption of the dialog.
entityNames - only these entities are shown.
Returns:
an entity selector.

createElementCreator

public static WidgetWrapperDialog<NameListItemChooser<NewElementRule>> createElementCreator(Shell parent,
                                                                                            XMLAccess xmlAccess,
                                                                                            String caption,
                                                                                            DisplayableNameList<NewElementRule> dnl)
Constructs an instance of a dialog, that will be used to select an element name. Component will not modify the attribute itself.

Parameters:
parent - the parent widget. should not be null.
xmlAccess - the XMLAccess instance.
caption - dialog caption
dnl - name list holding element names.
Returns:
an entity selector.

createGraphSelector

public static WidgetWrapperDialog<GraphSelectorWidget> createGraphSelector(Shell parent,
                                                                           Map<GraphNode,Set<String>> editableChoices,
                                                                           ExportGraph graph)
Creates dialog that allows you to choose exporters.

Parameters:
parent - the parent widget. Should not be null.
editableChoices - all choice nodes. May be empty or null.
graph - offer this graph to user. Must not be empty.
Returns:
the export graph chooser dialog instance.
Throws:
IllegalArgumentException - if graphList or editableChoices is empty, or editableChoices refers to non-choosable nodes.


Copyright © 2003-2006 null. All Rights Reserved.