Package org.jppf.ui.options
Class AbstractOptionProperties
java.lang.Object
org.jppf.ui.options.AbstractOptionProperties
- All Implemented Interfaces:
Serializable,OptionProperties
- Direct Known Subclasses:
AbstractOptionElement
Default abstract implementation of the
OptionElement interface.- Author:
- Laurent Cohen
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanDetermines whether this option has a border around it.protected StringMig layout constraints for a component.protected booleanDetermines whether this component can be detached to a different view.protected booleanDetermines whether firing events is enabled or not.protected ValueChangeListenerThe action to fire immediately when the page is disposed.protected booleanWhether the scroll pane can have a horizontal scrollbar (ifscrollableistrue).protected StringPath to an eventual icon displayed in the button.protected ValueChangeListenerThe action to fire immediately after the page is built, allowing to perform initializations before the page is displayed and used.protected StringThe label or title displayed with the UI component.protected StringMig layout constraints for the entire layout.protected MouseListenerA Java or scripted mouse click listener.protected StringThe name of this option element.protected List<OptionDescriptor.ScriptDescriptor>Scripts used by this option or its children.protected booleanDetermines whether this page should be enclosed within a scroll pane.protected StringThe tooltip text displayed with the UI component.protected JComponentGet the UI component for this option element.protected booleanWhether the scroll pane can have a vertical scrollbar (ifscrollableistrue). -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedConstructor provided as a convenience to facilitate the creation of option elements through reflexion. -
Method Summary
Modifier and TypeMethodDescriptionprotected JScrollPanecreateScrollPane(JComponent comp) Create a JScrollPane for the specified view, based on the scroll pane policies.abstract voidcreateUI()Create the UI components for this option.Get the Mig layout constraints for a component.Get the finalizer for this option.Get the path to an eventual icon displayed in the button.Get the initializer for this option.getLabel()Get the label displayed with the UI component.Get the Mig layout constraints for the entire layout.Get the Java or scripted mouse click listener.getName()Get the name of this option.Get the scripts used by this option or its children.Get the tooltip text displayed with the UI component.Get the UI component for this option.booleanDetermine whether this page has a border around it.booleanDetermines whether this component can be detached to a different view.booleanDetermine whether the events firing in this option and/or its children are enabled.booleanDetermine whether the scroll pane can have a horizontal scrollbar (ifscrollableistrue).booleanDetermine whether this page should be enclosed within a scroll pane.booleanDetermine whether the scroll pane can have a vertical scrollbar (ifscrollableistrue).voidsetBordered(boolean bordered) Determine whether this page has a border around it.voidsetComponentConstraints(String componentConstraints) Set the Mig layout constraints for a component.voidsetDetachable(boolean detachable) Specify whether this component can be detached to a different view.voidsetEditable(boolean editable) Enable or disable this option.voidsetEventsEnabled(boolean enabled) Enable or disable the events firing in this option and/or its children.voidsetFinalizer(ValueChangeListener finalizer) Set the finalizer for this option.voidsetHorizontalScrollbar(boolean horizontalScrollbar) Specify whether the scroll pane can have a horizontal scrollbar (ifscrollableistrue).voidsetIconPath(String iconPath) Set the path to an eventual icon displayed in the button.voidsetInitializer(ValueChangeListener initializer) Set the initializer for this option.voidSet the label displayed with the UI component.voidsetLayoutConstraints(String layoutConstraints) Set the Mig layout constraints for the entire layout.voidsetMouseListener(MouseListener mouseListener) Set the Java or scripted mouse click listener.voidSet the name of this option.voidsetScrollable(boolean scrollable) Determine whether this page should be enclosed within a scroll pane.voidsetToolTipText(String tooltip) Set the tooltip text displayed with the UI component.voidsetUIComponent(JComponent component) Set the UI component for this option.voidsetVerticalScrollbar(boolean verticalScrollbar) Specify whether the scroll pane can have a vertical scrollbar (ifscrollableistrue).Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.jppf.ui.options.OptionProperties
setEnabled
-
Field Details
-
label
The label or title displayed with the UI component. -
name
The name of this option element. -
toolTipText
The tooltip text displayed with the UI component. -
UIComponent
Get the UI component for this option element. -
iconPath
Path to an eventual icon displayed in the button. -
scrollable
protected boolean scrollableDetermines whether this page should be enclosed within a scroll pane. -
horizontalScrollbar
protected boolean horizontalScrollbarWhether the scroll pane can have a horizontal scrollbar (ifscrollableistrue). -
verticalScrollbar
protected boolean verticalScrollbarWhether the scroll pane can have a vertical scrollbar (ifscrollableistrue). -
bordered
protected boolean borderedDetermines whether this option has a border around it. -
scripts
Scripts used by this option or its children. -
initializer
The action to fire immediately after the page is built, allowing to perform initializations before the page is displayed and used. -
finalizer
The action to fire immediately when the page is disposed. -
mouseListener
A Java or scripted mouse click listener. -
eventsEnabled
protected boolean eventsEnabledDetermines whether firing events is enabled or not. -
layoutConstraints
Mig layout constraints for the entire layout. -
componentConstraints
Mig layout constraints for a component. -
detachable
protected boolean detachableDetermines whether this component can be detached to a different view.
-
-
Constructor Details
-
AbstractOptionProperties
protected AbstractOptionProperties()Constructor provided as a convenience to facilitate the creation of option elements through reflexion.
-
-
Method Details
-
createUI
public abstract void createUI()Create the UI components for this option. -
getLabel
Get the label displayed with the UI component.- Specified by:
getLabelin interfaceOptionProperties- Returns:
- the label as a string.
-
setLabel
Set the label displayed with the UI component.- Parameters:
label- the label as a string.
-
getName
Get the name of this option.- Specified by:
getNamein interfaceOptionProperties- Returns:
- the name as a string.
-
setName
Set the name of this option.- Parameters:
name- the name as a string.
-
getUIComponent
Get the UI component for this option.- Specified by:
getUIComponentin interfaceOptionProperties- Returns:
- a
JComponentinstance.
-
setUIComponent
Set the UI component for this option.- Parameters:
component- aJComponentinstance.
-
getToolTipText
Get the tooltip text displayed with the UI component.- Specified by:
getToolTipTextin interfaceOptionProperties- Returns:
- the tooltip as a string.
-
setToolTipText
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:
isScrollablein interfaceOptionProperties- Returns:
- true if the page is to be enclosed in a scroll page, false otherwise.
-
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:
isBorderedin interfaceOptionProperties- Returns:
- true if the page has a border, false otherwise.
- See Also:
-
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
Get the scripts used by this option or its children.- Specified by:
getScriptsin interfaceOptionProperties- Returns:
- a list of
ScriptDescriptorinstances.
-
getInitializer
Get the initializer for this option.- Specified by:
getInitializerin interfaceOptionProperties- Returns:
- a
ValueChangeListenerinstance.
-
setInitializer
Set the initializer for this option.- Parameters:
initializer- aValueChangeListenerinstance.
-
getFinalizer
Get the finalizer for this option.- Specified by:
getFinalizerin interfaceOptionProperties- Returns:
- a
ValueChangeListenerinstance.
-
setFinalizer
Set the finalizer for this option.- Parameters:
finalizer- aValueChangeListenerinstance.
-
getIconPath
Get the path to an eventual icon displayed in the button.- Specified by:
getIconPathin interfaceOptionProperties- Returns:
- the path as a string.
-
setIconPath
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:
isEventsEnabledin interfaceOptionProperties- Returns:
- enabled true if the events are enabled, false otherwise.
-
setEventsEnabled
public void setEventsEnabled(boolean enabled) Enable or disable the events firing in this option and/or its children.- Specified by:
setEventsEnabledin interfaceOptionProperties- Parameters:
enabled- true to enable the events, false to disable them.
-
getLayoutConstraints
Get the Mig layout constraints for the entire layout.- Specified by:
getLayoutConstraintsin interfaceOptionProperties- Returns:
- the constraints as a string.
-
setLayoutConstraints
Set the Mig layout constraints for the entire layout.- Specified by:
setLayoutConstraintsin interfaceOptionProperties- Parameters:
layoutConstraints- - the constraints as a string.
-
getComponentConstraints
Get the Mig layout constraints for a component.- Specified by:
getComponentConstraintsin interfaceOptionProperties- Returns:
- the constraints as a string.
-
setComponentConstraints
Set the Mig layout constraints for a component.- Specified by:
setComponentConstraintsin interfaceOptionProperties- Parameters:
componentConstraints- - the constraints as a string.
-
setEditable
public void setEditable(boolean editable) Description copied from interface:OptionPropertiesEnable or disable this option.- Specified by:
setEditablein interfaceOptionProperties- Parameters:
editable- true to make this option editable, false otherwise.
-
isDetachable
public boolean isDetachable()Description copied from interface:OptionPropertiesDetermines whether this component can be detached to a different view.- Specified by:
isDetachablein interfaceOptionProperties- Returns:
- true if this component can be detached, false otherwise.
-
setDetachable
public void setDetachable(boolean detachable) Specify whether this component can be detached to a different view.- Parameters:
detachable-trueif this component can be detached,falseotherwise.
-
getMouseListener
Description copied from interface:OptionPropertiesGet the Java or scripted mouse click listener.- Specified by:
getMouseListenerin interfaceOptionProperties- Returns:
- a
MouseListenerinstance.
-
setMouseListener
Description copied from interface:OptionPropertiesSet the Java or scripted mouse click listener.- Specified by:
setMouseListenerin interfaceOptionProperties- Parameters:
mouseListener- aMouseListenerinstance.
-
isHorizontalScrollbar
public boolean isHorizontalScrollbar()Determine whether the scroll pane can have a horizontal scrollbar (ifscrollableistrue).- Returns:
trueif the scroll pane can have a horizontal scroll bar,falseotherwise.
-
setHorizontalScrollbar
public void setHorizontalScrollbar(boolean horizontalScrollbar) Specify whether the scroll pane can have a horizontal scrollbar (ifscrollableistrue).- Parameters:
horizontalScrollbar-trueif the scroll pane can have a horizontal scroll bar,falseotherwise.
-
isVerticalScrollbar
public boolean isVerticalScrollbar()Determine whether the scroll pane can have a vertical scrollbar (ifscrollableistrue).- Returns:
trueif the scroll pane can have a vertical scroll bar,falseotherwise.
-
setVerticalScrollbar
public void setVerticalScrollbar(boolean verticalScrollbar) Specify whether the scroll pane can have a vertical scrollbar (ifscrollableistrue).- Parameters:
verticalScrollbar-trueif the scroll pane can have a vertical scroll bar,falseotherwise.
-
createScrollPane
Create a JScrollPane for the specified view, based on the scroll pane policies.- Parameters:
comp- the view for which to create the scroll pane.- Returns:
JScrollPaneinstance.
-