org.jppf.ui.options
Class AbstractOptionProperties

java.lang.Object
  extended by org.jppf.ui.options.AbstractOptionProperties
All Implemented Interfaces:
Serializable, OptionProperties
Direct Known Subclasses:
AbstractOptionElement

public abstract class AbstractOptionProperties
extends Object
implements OptionProperties

Default abstract implementation of the OptionElement interface.

Author:
Laurent Cohen
See Also:
Serialized Form

Field Summary
protected  boolean bordered
          Determines whether this option has a border around it.
protected  String componentConstraints
          Mig layout constraints for a component.
protected  boolean eventsEnabled
          Determines whether firing events is enabled or not.
protected  ValueChangeListener finalizer
          The action to fire immediately when the page is disposed.
protected  String iconPath
          Path to an eventual icon displayed in the button.
protected  ValueChangeListener initializer
          The action to fire immediately after the page is built, allowing to perform initializations before the page is displayed and used.
protected  String label
          The label or title displayed with the UI component.
protected  String layoutConstraints
          Mig layout constraints for the entire layout.
protected  String name
          The name of this option element.
protected  List<OptionDescriptor.ScriptDescriptor> scripts
          Scripts used by this option or its children.
protected  boolean scrollable
          Determines whether this page should be enclosed within a scroll pane.
protected  String toolTipText
          The tooltip text displayed with the UI component.
protected  JComponent UIComponent
          Get the UI component for this option element.
 
Constructor Summary
protected AbstractOptionProperties()
          Constructor provided as a convenience to facilitate the creation of option elements through reflexion.
 
Method Summary
abstract  void createUI()
          Create the UI components for this option.
 String getComponentConstraints()
          Get the Mig layout constraints for a component.
 ValueChangeListener getFinalizer()
          Get the finalizer for this option.
 String getIconPath()
          Get the path to an eventual icon displayed in the button.
 ValueChangeListener getInitializer()
          Get the initializer for this option.
 String getLabel()
          Get the label displayed with the UI component.
 String getLayoutConstraints()
          Get the Mig layout constraints for the entire layout.
 String getName()
          Get the name of this option.
 List<OptionDescriptor.ScriptDescriptor> getScripts()
          Get the scripts used by this option or its children.
 String getToolTipText()
          Get the tooltip text displayed with the UI component.
 JComponent getUIComponent()
          Get the UI component for this option.
 boolean isBordered()
          Determine whether this page has a border around it.
 boolean isEventsEnabled()
          Determine whether the events firing in this option and/or its children are enabled.
 boolean isScrollable()
          Determine whether this page should be enclosed within a scroll pane.
 void setBordered(boolean bordered)
          Determine whether this page has a border around it.
 void setComponentConstraints(String componentConstraints)
          Set the Mig layout constraints for a component.
 void setEditable(boolean editable)
          Enable or disable this option.
 void setEventsEnabled(boolean enabled)
          Enable or disable the events firing in this otpion and/or its children.
 void setFinalizer(ValueChangeListener finalizer)
          Set the finalizer for this option.
 void setIconPath(String iconPath)
          Set the path to an eventual icon displayed in the button.
 void setInitializer(ValueChangeListener initializer)
          Set the initializer for this option.
 void setLabel(String label)
          Set the label displayed with the UI component.
 void setLayoutConstraints(String layoutConstraints)
          Set the Mig layout constraints for the entire layout.
 void setName(String name)
          Set the name of this option.
 void setScrollable(boolean scrollable)
          Determine whether this page should be enclosed within a scroll pane.
 void setToolTipText(String tooltip)
          Set the tooltip text displayed with the UI component.
 void setUIComponent(JComponent component)
          Set the UI component for this option.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jppf.ui.options.OptionProperties
getRoot, setEnabled
 

Field Detail

label

protected String label
The label or title displayed with the UI component.


name

protected String name
The name of this option element.


toolTipText

protected String toolTipText
The tooltip text displayed with the UI component.


UIComponent

protected transient JComponent UIComponent
Get the UI component for this option element.


iconPath

protected String iconPath
Path to an eventual icon displayed in the button.


scrollable

protected boolean scrollable
Determines whether this page should be enclosed within a scroll pane.


bordered

protected boolean bordered
Determines whether this option has a border around it.


scripts

protected List<OptionDescriptor.ScriptDescriptor> scripts
Scripts used by this option or its children.


initializer

protected ValueChangeListener initializer
The action to fire immediately after the page is built, allowing to perform initializations before the page is displayed and used.


finalizer

protected ValueChangeListener finalizer
The action to fire immediately when the page is disposed.


eventsEnabled

protected boolean eventsEnabled
Determines whether firing events is enabled or not.


layoutConstraints

protected String layoutConstraints
Mig layout constraints for the entire layout.


componentConstraints

protected String componentConstraints
Mig layout constraints for a component.

Constructor Detail

AbstractOptionProperties

protected AbstractOptionProperties()
Constructor provided as a convenience to facilitate the creation of option elements through reflexion.

Method Detail

createUI

public abstract void createUI()
Create the UI components for this option.


getLabel

public String getLabel()
Get the label displayed with the UI component.

Specified by:
getLabel in interface OptionProperties
Returns:
the label as a string.
See Also:
OptionProperties.getLabel()

setLabel

public void setLabel(String label)
Set the label displayed with the UI component.

Parameters:
label - the label as a string.

getName

public String getName()
Get the name of this option.

Specified by:
getName in interface OptionProperties
Returns:
the name as a string.
See Also:
OptionProperties.getName()

setName

public void setName(String name)
Set the name of this option.

Parameters:
name - the name as a string.

getUIComponent

public JComponent getUIComponent()
Get the UI component for this option.

Specified by:
getUIComponent in interface OptionProperties
Returns:
a JComponent instance.
See Also:
OptionProperties.getUIComponent()

setUIComponent

public void setUIComponent(JComponent component)
Set the UI component for this option.

Parameters:
component - a JComponent instance.

getToolTipText

public String getToolTipText()
Get the tooltip text displayed with the UI component.

Specified by:
getToolTipText in interface OptionProperties
Returns:
the tooltip as a string.
See Also:
OptionProperties.getToolTipText()

setToolTipText

public void setToolTipText(String tooltip)
Set the tooltip text displayed with the UI component.

Parameters:
tooltip - the tooltip as a string.

isScrollable

public boolean isScrollable()
Determine whether this page should be enclosed within a scroll pane.

Specified by:
isScrollable in interface OptionProperties
Returns:
true if the page is to be enclosed in a scroll pabe, false otherwise.
See Also:
OptionProperties.isScrollable()

setScrollable

public void setScrollable(boolean scrollable)
Determine whether this page should be enclosed within a scroll pane.

Parameters:
scrollable - true if the page is to be enclosed in a scroll pane, false otherwise.

isBordered

public boolean isBordered()
Determine whether this page has a border around it.

Specified by:
isBordered in interface OptionProperties
Returns:
true if the page has a border, false otherwise.
See Also:
OptionProperties.isBordered()

setBordered

public void setBordered(boolean bordered)
Determine whether this page has a border around it.

Parameters:
bordered - true if the page has a border, false otherwise.

getScripts

public List<OptionDescriptor.ScriptDescriptor> getScripts()
Get the scripts used by this option or its children.

Specified by:
getScripts in interface OptionProperties
Returns:
a list of ScriptDescriptor instances.
See Also:
OptionProperties.getScripts()

getInitializer

public ValueChangeListener getInitializer()
Get the initializer for this option.

Specified by:
getInitializer in interface OptionProperties
Returns:
a ValueChangeListener instance.
See Also:
OptionProperties.getInitializer()

setInitializer

public void setInitializer(ValueChangeListener initializer)
Set the initializer for this option.

Parameters:
initializer - a ValueChangeListener instance.

getFinalizer

public ValueChangeListener getFinalizer()
Get the finalizer for this option.

Specified by:
getFinalizer in interface OptionProperties
Returns:
a ValueChangeListener instance.
See Also:
OptionProperties.getFinalizer()

setFinalizer

public void setFinalizer(ValueChangeListener finalizer)
Set the finalizer for this option.

Parameters:
finalizer - a ValueChangeListener instance.

getIconPath

public String getIconPath()
Get the path to an eventual icon displayed in the button.

Specified by:
getIconPath in interface OptionProperties
Returns:
the path as a string.

setIconPath

public void setIconPath(String iconPath)
Set the path to an eventual icon displayed in the button.

Parameters:
iconPath - the path as a string.

isEventsEnabled

public boolean isEventsEnabled()
Determine whether the events firing in this option and/or its children are enabled.

Specified by:
isEventsEnabled in interface OptionProperties
Returns:
enabled true if the events are enabled, false otherwise.
See Also:
OptionProperties.isEventsEnabled()

setEventsEnabled

public void setEventsEnabled(boolean enabled)
Enable or disable the events firing in this otpion and/or its children.

Specified by:
setEventsEnabled in interface OptionProperties
Parameters:
enabled - true to enable the events, false to disable them.
See Also:
OptionProperties.setEventsEnabled(boolean)

getLayoutConstraints

public String getLayoutConstraints()
Get the Mig layout constraints for the entire layout.

Specified by:
getLayoutConstraints in interface OptionProperties
Returns:
the constraints as a string.
See Also:
OptionProperties.getLayoutConstraints()

setLayoutConstraints

public void setLayoutConstraints(String layoutConstraints)
Set the Mig layout constraints for the entire layout.

Specified by:
setLayoutConstraints in interface OptionProperties
Parameters:
layoutConstraints - - the constraints as a string.
See Also:
OptionProperties.setLayoutConstraints(java.lang.String)

getComponentConstraints

public String getComponentConstraints()
Get the Mig layout constraints for a component.

Specified by:
getComponentConstraints in interface OptionProperties
Returns:
the constraints as a string.
See Also:
OptionProperties.getComponentConstraints()

setComponentConstraints

public void setComponentConstraints(String componentConstraints)
Set the Mig layout constraints for a component.

Specified by:
setComponentConstraints in interface OptionProperties
Parameters:
componentConstraints - - the constraints as a string.
See Also:
OptionProperties.setComponentConstraints(java.lang.String)

setEditable

public void setEditable(boolean editable)
Enable or disable this option.

Specified by:
setEditable in interface OptionProperties
Parameters:
editable - true to make this option editable, false otherwise.


Copyright © 2005-2010 JPPF Team.