Interface OWThinlet
- All Known Implementing Classes:
DefaultOWThinlet
public interface OWThinlet
Represent a specialized Thinlet like, that manage the life cycle of Object Wrapper Component.
OWThinlet maintain a repository of related (Object wrapper - thinlet component), and define the API
required to retrieve OWObject from a given thinlet component.
Implementation Note:
- With JDK < 1.3, all widget which are definitively removed from the hierachy must have it's
counter part OWObject released by the
OWObject.release()call, to avoid leak memory. - For JDK >= 1.3, the repository use a java.util.WeakHashMap, so explicit
OWObject.release()become optional.
-
Method Summary
Modifier and TypeMethodDescriptionvoidIssued fromthinlet.Thinlet.voidIssued fromthinlet.Thinlet.voidAdds the specified widget to the root desktopvoiddefineMethod(Object component, String methodName, Method method) Issued fromthinlet.Thinlet.findObject(String name) Finds the first widget from the root desktop by a specified name valuefindObject(OWWidget component, String name) Finds the first widget from the specified component by a namebooleangetBoolean(Object component, String key) Issued fromthinlet.Thinlet.Issued fromthinlet.Thinlet.intIssued fromthinlet.Thinlet.Issued fromthinlet.Thinlet.intgetInteger(Object component, String key) Issued fromthinlet.Thinlet.@Nullable ObjectIssued fromthinlet.Thinlet.Object[]Issued fromthinlet.Thinlet.@Nullable ObjectIssued fromthinlet.Thinlet.@Nullable ObjectgetProperty(Object component, Object key) Issued fromthinlet.Thinlet.intgetSelectedIndex(Object component) Issued fromthinlet.Thinlet.@Nullable ObjectgetSelectedItem(Object component) Issued fromthinlet.Thinlet.Object[]getSelectedItems(Object component) Issued fromthinlet.Thinlet.Issued fromthinlet.Thinlet.parseAsObject(InputStream inputstream) Creates a widget from the given streamparseAsObject(InputStream inputstream, Object handler) Creates a widget from the given stream and event handlerparseAsObject(String path) Creates a widget (and its subcomponents, and properties) from the given xml resourceparseAsObject(String path, Object handler) Creates a widget from the given xml resource using the specified event handlervoidputProperty(Object component, Object key, Object value) Issued fromthinlet.Thinlet.voidregister the given OWObject, as managed by the given thinletvoidIssued fromthinlet.Thinlet.voidIssued fromthinlet.Thinlet.voidsetBoolean(Object component, String key, boolean value) Issued fromthinlet.Thinlet.voidIssued fromthinlet.Thinlet.voidIssued fromthinlet.Thinlet.voidsetComponent(Object component, String key, Object value) Issued fromthinlet.Thinlet.voidIssued fromthinlet.Thinlet.voidIssued fromthinlet.Thinlet.voidsetInteger(Object component, String key, int value) Issued fromthinlet.Thinlet.voidsetKeystroke(Object component, String key, String value) Issued fromthinlet.Thinlet.voidIssued fromthinlet.Thinlet.voidunregister(OWObject widget) unregister the given OWObject, as not managed by the given thinletReturn a previously registered object wrapper from the given thinlet component, or build a new wrapper object and register it.
-
Method Details
-
wrap
Return a previously registered object wrapper from the given thinlet component, or build a new wrapper object and register it. -
register
register the given OWObject, as managed by the given thinlet -
unregister
unregister the given OWObject, as not managed by the given thinlet -
add
Adds the specified widget to the root desktop- Parameters:
component- a widget to be added
-
findObject
Finds the first widget from the specified component by a name- Parameters:
component- the widget is searched inside this componentname- parameter value identifies the widget- Returns:
- the first suitable component, or null
-
findObject
Finds the first widget from the root desktop by a specified name value- Parameters:
name- parameter value identifies the widget- Returns:
- the first suitable component, or null
-
parseAsObject
Creates a widget (and its subcomponents, and properties) from the given xml resource- Parameters:
path- is relative to your thinlet instance or the classpath (if the path starts with an / character), or a full URL- Returns:
- the root component of the parsed resource
- Throws:
IOException
-
parseAsObject
Creates a widget from the given xml resource using the specified event handler- Parameters:
path- is relative to your application package or the classpath, or an URLhandler- bussiness methods are implemented in this object- Returns:
- the parsed components' root
- Throws:
IOException
-
parseAsObject
Creates a widget from the given stream- Parameters:
inputstream- e.g. new URL("http://myserver/myservlet").openStream()- Returns:
- the root component of the parsed stream
- Throws:
IOException
-
parseAsObject
Creates a widget from the given stream and event handler- Parameters:
inputstream- read xml from this streamhandler- event handlers are implemented in this object- Returns:
- the parsed components' root
- Throws:
IOException
-
defineMethod
Issued fromthinlet.Thinlet. Part of the thinlet like interface, required to have several ObjectWrapperThinlet implementation. -
setString
Issued fromthinlet.Thinlet. Part of the thinlet like interface, required to have several ObjectWrapperThinlet implementation. -
getString
Issued fromthinlet.Thinlet. Part of the thinlet like interface, required to have several ObjectWrapperThinlet implementation. -
setChoice
Issued fromthinlet.Thinlet. Part of the thinlet like interface, required to have several ObjectWrapperThinlet implementation. -
getChoice
Issued fromthinlet.Thinlet. Part of the thinlet like interface, required to have several ObjectWrapperThinlet implementation. -
setBoolean
Issued fromthinlet.Thinlet. Part of the thinlet like interface, required to have several ObjectWrapperThinlet implementation. -
getBoolean
Issued fromthinlet.Thinlet. Part of the thinlet like interface, required to have several ObjectWrapperThinlet implementation. -
setInteger
Issued fromthinlet.Thinlet. Part of the thinlet like interface, required to have several ObjectWrapperThinlet implementation. -
getInteger
Issued fromthinlet.Thinlet. Part of the thinlet like interface, required to have several ObjectWrapperThinlet implementation. -
setIcon
Issued fromthinlet.Thinlet. Part of the thinlet like interface, required to have several ObjectWrapperThinlet implementation. -
getIcon
Issued fromthinlet.Thinlet. Part of the thinlet like interface, required to have several ObjectWrapperThinlet implementation. -
setKeystroke
Issued fromthinlet.Thinlet. Part of the thinlet like interface, required to have several ObjectWrapperThinlet implementation. -
setFont
Issued fromthinlet.Thinlet. Part of the thinlet like interface, required to have several ObjectWrapperThinlet implementation. -
setColor
Issued fromthinlet.Thinlet. Part of the thinlet like interface, required to have several ObjectWrapperThinlet implementation. -
putProperty
Issued fromthinlet.Thinlet. Part of the thinlet like interface, required to have several ObjectWrapperThinlet implementation. -
getProperty
Issued fromthinlet.Thinlet. Part of the thinlet like interface, required to have several ObjectWrapperThinlet implementation. -
setComponent
Issued fromthinlet.Thinlet. Part of the thinlet like interface, required to have several ObjectWrapperThinlet implementation. -
getParent
Issued fromthinlet.Thinlet. Part of the thinlet like interface, required to have several ObjectWrapperThinlet implementation. -
add
Issued fromthinlet.Thinlet. Part of the thinlet like interface, required to have several ObjectWrapperThinlet implementation. -
add
Issued fromthinlet.Thinlet. Part of the thinlet like interface, required to have several ObjectWrapperThinlet implementation. -
remove
Issued fromthinlet.Thinlet. Part of the thinlet like interface, required to have several ObjectWrapperThinlet implementation. -
removeAll
Issued fromthinlet.Thinlet. Part of the thinlet like interface, required to have several ObjectWrapperThinlet implementation. -
getSelectedIndex
Issued fromthinlet.Thinlet. Part of the thinlet like interface, required to have several ObjectWrapperThinlet implementation. -
getSelectedItem
Issued fromthinlet.Thinlet. Part of the thinlet like interface, required to have several ObjectWrapperThinlet implementation. -
getSelectedItems
Issued fromthinlet.Thinlet. Part of the thinlet like interface, required to have several ObjectWrapperThinlet implementation. -
getItem
Issued fromthinlet.Thinlet. Part of the thinlet like interface, required to have several ObjectWrapperThinlet implementation. -
getItems
Issued fromthinlet.Thinlet. Part of the thinlet like interface, required to have several ObjectWrapperThinlet implementation. -
getCount
Issued fromthinlet.Thinlet. Part of the thinlet like interface, required to have several ObjectWrapperThinlet implementation.
-