Package org.apache.hop.ui.core.gui
Class BaseGuiWidgets
- java.lang.Object
-
- org.apache.hop.ui.core.gui.BaseGuiWidgets
-
- Direct Known Subclasses:
GuiMenuWidgets,GuiToolbarWidgets
public class BaseGuiWidgets extends Object
-
-
Field Summary
Fields Modifier and Type Field Description protected StringguiPluginClassNameFor convenience, we remember the classname of the GUI plugin that creates and owns these widgets.protected ObjectguiPluginObjectThe plugin object which is registeredprotected StringinstanceIdEvery set of widgets (toolbar, composite, menu, ...) gets its own unique ID It will cause a new object to be created per unique ID for the listener or GUI plugins if this plugin wasn't registered yet.
-
Constructor Summary
Constructors Constructor Description BaseGuiWidgets(String instanceId)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddDeRegisterGuiPluginObjectListener(org.eclipse.swt.widgets.Control control)voiddispose()protected static ObjectfindGuiPluginInstance(ClassLoader classLoader, String listenerClassName, String instanceId)protected String[]getComboItems(GuiToolbarItem toolbarItem)StringgetGuiPluginClassName()Gets guiPluginClassNameObjectgetGuiPluginObject()Gets guiPluginObjectStringgetInstanceId()Gets instanceIdprotected org.eclipse.swt.widgets.ListenergetListener(ClassLoader classLoader, String listenerClassName, String listenerMethodName)voidregisterGuiPluginObject(Object guiPluginObject)Let the GUI plugin system know that there is no need to instantiate new objects for the given class.voidsetGuiPluginClassName(String guiPluginClassName)Sets guiPluginClassNamevoidsetGuiPluginObject(Object guiPluginObject)Sets guiPluginObjectvoidsetInstanceId(String instanceId)
-
-
-
Field Detail
-
instanceId
protected String instanceId
Every set of widgets (toolbar, composite, menu, ...) gets its own unique ID It will cause a new object to be created per unique ID for the listener or GUI plugins if this plugin wasn't registered yet.
-
guiPluginClassName
protected String guiPluginClassName
For convenience, we remember the classname of the GUI plugin that creates and owns these widgets.
-
guiPluginObject
protected Object guiPluginObject
The plugin object which is registered
-
-
Constructor Detail
-
BaseGuiWidgets
public BaseGuiWidgets(String instanceId)
-
-
Method Detail
-
registerGuiPluginObject
public void registerGuiPluginObject(Object guiPluginObject)
Let the GUI plugin system know that there is no need to instantiate new objects for the given class. Instead, this object can be taken. Make sure to call dispose() to prevent a (slow) memory leak. Call this method before creating the widgets themselves.- Parameters:
guiPluginObject-
-
addDeRegisterGuiPluginObjectListener
protected void addDeRegisterGuiPluginObjectListener(org.eclipse.swt.widgets.Control control)
-
dispose
public void dispose()
-
findGuiPluginInstance
protected static Object findGuiPluginInstance(ClassLoader classLoader, String listenerClassName, String instanceId) throws Exception
- Throws:
Exception
-
getComboItems
protected String[] getComboItems(GuiToolbarItem toolbarItem)
-
getListener
protected org.eclipse.swt.widgets.Listener getListener(ClassLoader classLoader, String listenerClassName, String listenerMethodName)
-
getInstanceId
public String getInstanceId()
Gets instanceId- Returns:
- value of instanceId
-
setInstanceId
public void setInstanceId(String instanceId)
- Parameters:
instanceId- The instanceId to set
-
getGuiPluginClassName
public String getGuiPluginClassName()
Gets guiPluginClassName- Returns:
- value of guiPluginClassName
-
setGuiPluginClassName
public void setGuiPluginClassName(String guiPluginClassName)
Sets guiPluginClassName- Parameters:
guiPluginClassName- value of guiPluginClassName
-
getGuiPluginObject
public Object getGuiPluginObject()
Gets guiPluginObject- Returns:
- value of guiPluginObject
-
setGuiPluginObject
public void setGuiPluginObject(Object guiPluginObject)
Sets guiPluginObject- Parameters:
guiPluginObject- value of guiPluginObject
-
-