org.xulux.api.gui
Interface IGuiDefaults


public interface IGuiDefaults

The GuiDefaults interface.

Author:
Martin van den Bemt

Method Summary
 java.lang.String getDefaultGuiLayer()
           
 IXuluxLayout getDefaultLayout()
          The defaultwidget type needs to be set for this method to work.
 IXuluxListener getFieldEventHandler(java.lang.String guiLayer)
           
 IInvalidValueStrategy getInvalidValueStrategy()
           
 IInvalidValueStrategy getInvalidValueStrategy(java.lang.String name)
           
 IXuluxLayout getLayout(java.lang.String guiLayer, java.lang.String name)
           
 INativeWidgetHandler getNativeWidgetHandler()
           
 INativeWidgetHandler getNativeWidgetHandler(java.lang.String guiLayer)
           
 IParentWidgetHandler getParentWidgetHandler()
           
 IParentWidgetHandler getParentWidgetHandler(java.lang.String guiLayer)
           
 java.lang.Class getWidget(java.lang.String name)
          Returns the class that corresponds to the name or null when not found See GuiDefaults.xml for more info on defining widgets or call registerWidget(name, clazz) to register one yourself..
 IWidgetConfig getWidgetConfig(java.lang.String widgetName)
           
 java.util.Map getWidgets()
           
 IXuluxToolkit getXuluxToolkit()
           
 void registerFieldEventHandler(java.lang.String guiLayer, java.lang.String clazz)
           
 void registerInvalidValueStrategy(java.lang.String name, boolean isDefault, java.lang.String clazz)
          Register the specified InvalidValueStrategy.
 void registerLayout(java.lang.String name, boolean isDefault, java.lang.String clazz, java.lang.String guiLayer)
          Register the specified layout.
 void registerNativeWidgetHandler(java.lang.String guiLayer, java.lang.String clazz)
          Registers the native widget handler.
 void registerParentWidgetHandler(java.lang.String guiLayer, java.lang.String clazz)
          Registers the parent widget handler.
 IWidgetConfig registerWidget(java.lang.String name, java.lang.String clazz, java.lang.String guiLayer)
          Registers a widget that can be used to construct an ui.
 void registerXuluxToolkit(java.lang.String clazz, java.lang.String guiLayer)
          Add a toolkit of specified type
 void setDefaultGuiLayer(java.lang.String guiLayer)
          Sets the application wide default widget type (eg.
 

Method Detail

getXuluxToolkit

IXuluxToolkit getXuluxToolkit()
Returns:
the XuluxToolkit of the default type or null when not present

registerXuluxToolkit

void registerXuluxToolkit(java.lang.String clazz,
                          java.lang.String guiLayer)
Add a toolkit of specified type

Parameters:
clazz - the toolkit class
guiLayer - if the guiLayer is null, it defaults to the default guiLayer

getFieldEventHandler

IXuluxListener getFieldEventHandler(java.lang.String guiLayer)
Parameters:
guiLayer - specifies the guiLayer to get the eventhandler for
Returns:
a new instance of the event Handler or null when not found

registerFieldEventHandler

void registerFieldEventHandler(java.lang.String guiLayer,
                               java.lang.String clazz)
Parameters:
guiLayer - the guilayer to register the field eventhandler for
clazz - the class name of the field event handler.

getNativeWidgetHandler

INativeWidgetHandler getNativeWidgetHandler()
Returns:
the native widgets handler for the defaulttype

getNativeWidgetHandler

INativeWidgetHandler getNativeWidgetHandler(java.lang.String guiLayer)
Parameters:
guiLayer - specifies the guiLayer to get the native widget handler for
Returns:
the native widget handler for the specified type

getParentWidgetHandler

IParentWidgetHandler getParentWidgetHandler()
Returns:
the handler for the current gui framework or null if not found

getParentWidgetHandler

IParentWidgetHandler getParentWidgetHandler(java.lang.String guiLayer)
Parameters:
guiLayer - specifies the guiLayer to get the parent widget handler for
Returns:
the handler of parent widgets, or null when not found

registerParentWidgetHandler

void registerParentWidgetHandler(java.lang.String guiLayer,
                                 java.lang.String clazz)
Registers the parent widget handler. This is used when cleaning up the applicationpart to eg remove all widgets from the parent in one go. Initially it will be read from the default GuiDefaults.xml and can be overriden.

Parameters:
guiLayer - specifies the guiLayer to register the parent handler for
clazz - the class name of the parenthandler.

getInvalidValueStrategy

IInvalidValueStrategy getInvalidValueStrategy()
Returns:
the default invalid value strategy

getInvalidValueStrategy

IInvalidValueStrategy getInvalidValueStrategy(java.lang.String name)
Parameters:
name - the name of the strategy
Returns:
the specified invalidvaluestrategy, or null if not found.

registerInvalidValueStrategy

void registerInvalidValueStrategy(java.lang.String name,
                                  boolean isDefault,
                                  java.lang.String clazz)
Register the specified InvalidValueStrategy. Setting the default strategy is based on the name The last one that calls this method with the field isDefault as true, will be the default for the application.

Parameters:
name - the name of the strategy
isDefault - is this strategy the default
clazz - the class of the strategy

registerNativeWidgetHandler

void registerNativeWidgetHandler(java.lang.String guiLayer,
                                 java.lang.String clazz)
Registers the native widget handler. The handler will contain all logic to be able to use native widgets on top of the nyx widgets

Parameters:
guiLayer - specifies the gui type to register the native handler for
clazz - the classname of the nativehandler.

getWidgets

java.util.Map getWidgets()
Returns:
a map with widgets.

registerWidget

IWidgetConfig registerWidget(java.lang.String name,
                             java.lang.String clazz,
                             java.lang.String guiLayer)
Registers a widget that can be used to construct an ui.

Parameters:
name - the widget name (eg combo)
clazz - the class that needs to be used
guiLayer - the guiLayer to use

getWidgetConfig

IWidgetConfig getWidgetConfig(java.lang.String widgetName)
Parameters:
widgetName - the name of the widget to get the config for
Returns:
the widgetconfig for the widget or null if not found

getDefaultGuiLayer

java.lang.String getDefaultGuiLayer()
Returns:
the default gui layer.

getDefaultLayout

IXuluxLayout getDefaultLayout()
The defaultwidget type needs to be set for this method to work.

Returns:
the default layout if one is set

setDefaultGuiLayer

void setDefaultGuiLayer(java.lang.String guiLayer)
Sets the application wide default widget type (eg. swt, core, swing)

Parameters:
type - the default gui type for this application

getLayout

IXuluxLayout getLayout(java.lang.String guiLayer,
                       java.lang.String name)
Parameters:
guiLayer - the gui layer type. If null, it will use the default gui layer.
name - the name of the layout
Returns:
the layout specified or null if not found

registerLayout

void registerLayout(java.lang.String name,
                    boolean isDefault,
                    java.lang.String clazz,
                    java.lang.String guiLayer)
Register the specified layout. Setting the default layout is based on the name and will be the same across all gui layers. The last one that calls this method with the field isDefault as true, will be the default for the application

Parameters:
name - the name of the layout
isDefault - is this layout the default
clazz - the class of the layout
guiLayer - the gui layer

getWidget

java.lang.Class getWidget(java.lang.String name)
Returns the class that corresponds to the name or null when not found See GuiDefaults.xml for more info on defining widgets or call registerWidget(name, clazz) to register one yourself.. This will return the widget from the set defaulttype (system default is swing).

Parameters:
name - - the widget name
Returns:
the class for the widget


Copyright © 2002-2007 Martin van den Bemt. All Rights Reserved.