org.xulux.api.gui
Interface INativeWidgetHandler


public interface INativeWidgetHandler

Interface to handle native widgets. You should register the implementation via eg the guidefaults xml file.

Version:
$Id: INativeWidgetHandler.java,v 1.1 2005/12/18 12:58:15 mvdb Exp $
Author:
Martin van den Bemt

Method Summary
 void addWidgetToParent(IWidget widget, java.lang.Object parentWidget)
          Adds a widget to the parent, which is a native.
 IWidget getWidget(java.lang.Object object, IWidget parent)
          Returns the widget passed in (as convenience) and adds the native widget to the parent.
 IWidget getWidget(java.lang.String clazz, IWidget parent)
          Returns the widget passed in (as convenience) and adds the native widget to the parent.
 void refresh(java.lang.Object widget)
          Should refresh the gui when needed.
 void setLocationOnWidget(IWidget parent, int x, int y)
          Set the location on the last native widget added
 void setLocationOnWidget(java.lang.Object widget, int x, int y)
          Set the location on the last native widget added
 

Method Detail

getWidget

IWidget getWidget(java.lang.String clazz,
                  IWidget parent)
Returns the widget passed in (as convenience) and adds the native widget to the parent. This is normally used for automated processing of native widgets.

Parameters:
clazz - - the className of the native widget
parent - - the nyx parent widget
Returns:
the nyx parent widget.

getWidget

IWidget getWidget(java.lang.Object object,
                  IWidget parent)
Returns the widget passed in (as convenience) and adds the native widget to the parent. Use this for hand programmed addition of native widgets.

Parameters:
object - - the native widget
parent - - the nyx parent widget
Returns:
- the nyx parent widget.

setLocationOnWidget

void setLocationOnWidget(IWidget parent,
                         int x,
                         int y)
Set the location on the last native widget added

Parameters:
parent - the parent widget to set the location on
x - the x position
y - the y position

setLocationOnWidget

void setLocationOnWidget(java.lang.Object widget,
                         int x,
                         int y)
Set the location on the last native widget added

Parameters:
widget - the native widget to set the location on
x - the x position
y - the y position

addWidgetToParent

void addWidgetToParent(IWidget widget,
                       java.lang.Object parentWidget)
Adds a widget to the parent, which is a native. (getParentWidget())

Parameters:
widget - the widget to add
parentWidget - the parent to add the widget to

refresh

void refresh(java.lang.Object widget)
Should refresh the gui when needed. Eg Swing doesn't pick up on new widgets very well.



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