public class WidgetTool
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
KEY_IMAGE_LABEL |
static java.lang.String |
KEY_LABEL |
static int |
MARGIN_DEFAULT |
Constructor and Description |
---|
WidgetTool() |
Modifier and Type | Method and Description |
---|---|
static void |
addHelpUrlMouseListener(Label labHelp,
java.lang.String helpURL) |
static DecoratedOutputFile |
createDecoratedOutputFileWithPovrayHelpLink(Composite parent,
java.lang.String labelText,
java.lang.String labelToolTip,
int labelStyle,
int widgetStyle,
java.lang.String helpURL,
java.lang.String defValue)
Creates a new
LabeledLabel widget along with a button linking to the Povray help system
and a description label. |
static Composite |
createDefaultContainer(Composite parent,
int columns) |
static Composite |
createDefaultContainer(Composite parent,
int style,
int columns) |
static Label |
createDefaultSpacer(Composite container,
int num)
Creates
num spacer holded by the given Composite . |
static GridLayout |
createGridLayoutDefault(int numColumns,
boolean makeColumnsEqualWidth)
Creates a new
GridLayout using a margin setting of
MARGIN_DEFAULT pixels on all 4 directions. |
static Label |
createLabel(Composite parent,
java.lang.String labelText,
int style,
int numColumns,
boolean takeFullWidth) |
static Button |
createLabeledButton(Composite parent,
java.lang.String labelText,
java.lang.String labelToolTip,
int widgetStyle,
boolean fullSize)
Creates a labled Button field with tooltips.
|
static Button |
createLabeledCheckButtonWithPovrayHelpLink(Composite parent,
java.lang.String labelText,
java.lang.String labelToolTip,
int labelStyle,
int widgetStyle,
java.lang.String helpURL)
Creates a new checkbox
Button widget along with a button linking to the Povray help system. |
static LabeledButton |
createLabeledCheckButtonWithPovrayHelpLink(Composite parent,
java.lang.String labelText,
java.lang.String labelToolTip,
int labelStyle,
int widgetStyle,
java.lang.String helpURL,
boolean defValue)
Creates a new checkbox
Button widget along with a button linking to the Povray help system. |
static Combo |
createLabeledCombo(Composite parent,
java.lang.String labelText,
java.lang.String labelToolTip,
int widgetStyle,
boolean fullSize)
Creates a labled Combo field with tooltips.
|
static Combo |
createLabeledComboWithPovrayHelpLink(Composite parent,
java.lang.String labelText,
java.lang.String labelToolTip,
int labelStyle,
int widgetStyle,
java.lang.String helpURL)
Creates a new
Combo widget along with a button linking to the Povray help system
adn a description lable. |
static LabeledCombo |
createLabeledComboWithPovrayHelpLink(Composite parent,
java.lang.String labelText,
java.lang.String labelToolTip,
int labelStyle,
int widgetStyle,
java.lang.String helpURL,
int defValue) |
static LabeledLabel |
createLabeledLabelFieldWithPovrayHelpLink(Composite parent,
java.lang.String labelText,
java.lang.String labelToolTip,
int labelStyle,
int widgetStyle,
java.lang.String helpURL,
java.lang.String defValue)
Creates a new
LabeledLabel widget along with a button linking to the Povray help system
and a description label. |
static LabeledOutputFile |
createLabeledOutFileFieldWithPovrayHelpLink(Composite parent,
java.lang.String labelText,
java.lang.String labelToolTip,
int labelStyle,
int widgetStyle,
java.lang.String helpURL,
java.lang.String defValue) |
static LabeledOutputType |
createLabeledOutputTypeWithPovrayHelpLink(Composite parent,
java.lang.String labelText,
java.lang.String labelToolTip,
int labelStyle,
int widgetStyle,
java.lang.String helpURL,
java.lang.String defValue) |
static Button |
createLabeledRadioButtonWithPovrayHelpLink(Composite parent,
java.lang.String labelText,
java.lang.String labelToolTip,
int widgetStyle,
java.lang.String helpURL)
Creates a new radio
Button widget along with a button linking to the Povray help system. |
static Button |
createLabeledRadioButtonWithPovrayHelpLink(Composite parent,
java.lang.String labelText,
java.lang.String labelToolTip,
int widgetStyle,
java.lang.String helpURL,
java.lang.String helpIconTooltip)
Creates a new radio
Button widget along with a button linking to the Povray help system. |
static Spinner |
createLabeledSpinnerWithPovrayHelpLink(Composite parent,
java.lang.String labelText,
java.lang.String labelToolTip,
int labelStyle,
int widgetStyle,
java.lang.String helpURL)
Creates a new
Spinner widget along with a button linking to the Povray help system
adn a description lable. |
static LabeledSpinner |
createLabeledSpinnerWithPovrayHelpLink(Composite parent,
java.lang.String labelText,
java.lang.String labelToolTip,
int labelStyle,
int widgetStyle,
java.lang.String helpURL,
double defValue) |
static Spinner |
createLabeledSpinnerWithPovrayHelpLink(Composite parent,
java.lang.String labelText,
java.lang.String labelToolTip,
int labelStyle,
int widgetStyle,
java.lang.String helpURL,
java.lang.String helpIconTooltip)
Creates a new
Spinner widget along with a button linking to the Povray help system
adn a description lable. |
static LabeledSpinner |
createLabeledSpinnerWithPovrayHelpLink(Composite parent,
java.lang.String labelText,
java.lang.String labelToolTip,
int labelStyle,
int widgetStyle,
java.lang.String helpURL,
java.lang.String helpIconTooltip,
double defValue)
Creates a new
Spinner widget along with a button linking to the Povray help system
adn a description lable. |
static Text |
createLabeledText(Composite parent,
java.lang.String labelText,
java.lang.String labelToolTip,
int widgetStyle,
boolean fullSize)
Creates a labled Text field with tooltips.
|
static Text |
createLabeledTextFieldWithPovrayHelpLink(Composite parent,
java.lang.String labelText,
java.lang.String labelToolTip,
int labelStyle,
int widgetStyle,
java.lang.String helpURL)
Creates a new
Text widget along with a button linking to the Povray help system
and a description label. |
static LabeledText |
createLabeledTextFieldWithPovrayHelpLink(Composite parent,
java.lang.String labelText,
java.lang.String labelToolTip,
int labelStyle,
int widgetStyle,
java.lang.String helpURL,
java.lang.String defValue)
Creates a new
Text widget along with a button linking to the Povray help system
and a description label. |
static Label |
createMinimumSpacer(Composite container,
int num)
Creates
num spacer holded by the given Composite . |
static Label |
createPovrayHelpLabel(Composite parent,
java.lang.String helpURL) |
static Label |
createPovrayHelpLabel(Composite parent,
java.lang.String tooltip,
java.lang.String helpURL) |
static Label |
createSpacer(Composite container,
int num,
int minHeight,
int heightHint,
int minWidth,
int widthHint)
Creates
num spacer holded by the given Composite . |
static Group |
createSpacerGroup(Composite container)
Create an invisible group used to make other grid elements line up.
|
static void |
setEnabled(Control control,
boolean enabled)
Enables the given
Control along with it's Label and help image button. |
static Label |
setHelpLinkAttributes(Label labHelp,
java.lang.String tooltip,
java.lang.String helpURL) |
static void |
setVisible(Control control,
boolean show)
Shows or hides the given
Control along with it's Label and help image button. |
public static final java.lang.String KEY_IMAGE_LABEL
public static final java.lang.String KEY_LABEL
public static final int MARGIN_DEFAULT
public static GridLayout createGridLayoutDefault(int numColumns, boolean makeColumnsEqualWidth)
GridLayout
using a margin setting of
MARGIN_DEFAULT
pixels on all 4 directions.numColumns
- the number of columns in the gridmakeColumnsEqualWidth
- whether or not the columns will have equal widthGridLayout
public static Composite createDefaultContainer(Composite parent, int columns)
public static Composite createDefaultContainer(Composite parent, int style, int columns)
public static void setEnabled(Control control, boolean enabled)
Control
along with it's Label and help image button.control
- The Control
to be enabled or disabled.enabled
- true
to enable it, false
to disable it.public static void setVisible(Control control, boolean show)
Control
along with it's Label and help image button.control
- The Control
to be enabled or disabled.show
- true
to show it, false
to hide it.public static Label createDefaultSpacer(Composite container, int num)
Creates num
spacer holded by the given Composite
.
All created spacers will have a minimum height and with of 3 pixles, and a width and height hint of 5 pixles.
container
- The Composite
holding the spacer lables.num
- The number of spacers to create.null
if num
was zero.public static Label createMinimumSpacer(Composite container, int num)
Creates num
spacer holded by the given Composite
.
All created spacers will have a minimum height and with of 0 pixles, and a width and height hint of 0 pixles.
container
- The Composite
holding the spacer lables.num
- The number of spacers to create.null
if num
was zero.public static Label createSpacer(Composite container, int num, int minHeight, int heightHint, int minWidth, int widthHint)
Creates num
spacer holded by the given Composite
.
container
- The Composite
holding the spacer lables.num
- The number of spacer lables to createminHeight
- The minumum height of a spacer.heightHint
- The height hint of a spacer.minWidth
- The width height of a spacer.widthHint
- The width hint of a spacer.null
if num
was zero.public static Group createSpacerGroup(Composite container)
container
- The parent to put our invisible group inpublic static void addHelpUrlMouseListener(Label labHelp, java.lang.String helpURL)
public static Label setHelpLinkAttributes(Label labHelp, java.lang.String tooltip, java.lang.String helpURL)
public static Label createPovrayHelpLabel(Composite parent, java.lang.String helpURL)
public static Label createPovrayHelpLabel(Composite parent, java.lang.String tooltip, java.lang.String helpURL)
public static Text createLabeledTextFieldWithPovrayHelpLink(Composite parent, java.lang.String labelText, java.lang.String labelToolTip, int labelStyle, int widgetStyle, java.lang.String helpURL)
Text
widget along with a button linking to the Povray help system
and a description label. The Label and the Text fields are given the provided tooltip text.parent
- The composite receiving the three created widgets.labelText
- The Label text to be usedlabelToolTip
- The tooltip message to be set on the Label and the Control.labelStyle
- The style bits to be used for the label controlwidgetStyle
- The style bits to be used for the Text controlhelpURL
- The url String linking to the help. If null
or empty
no help button is created.Text
widget.public static LabeledText createLabeledTextFieldWithPovrayHelpLink(Composite parent, java.lang.String labelText, java.lang.String labelToolTip, int labelStyle, int widgetStyle, java.lang.String helpURL, java.lang.String defValue)
Text
widget along with a button linking to the Povray help system
and a description label. The Label and the Text fields are given the provided tooltip text.parent
- The composite receiving the three created widgets.labelText
- The Label text to be usedlabelToolTip
- The tooltip message to be set on the Label and the Control.labelStyle
- The style bits to be used for the label controlwidgetStyle
- The style bits to be used for the Text controlhelpURL
- The url String linking to the help. If null
or empty
no help button is created.LabeledText
widget.public static LabeledOutputFile createLabeledOutFileFieldWithPovrayHelpLink(Composite parent, java.lang.String labelText, java.lang.String labelToolTip, int labelStyle, int widgetStyle, java.lang.String helpURL, java.lang.String defValue)
public static LabeledLabel createLabeledLabelFieldWithPovrayHelpLink(Composite parent, java.lang.String labelText, java.lang.String labelToolTip, int labelStyle, int widgetStyle, java.lang.String helpURL, java.lang.String defValue)
LabeledLabel
widget along with a button linking to the Povray help system
and a description label. The Label and the Text fields are given the provided tooltip text.parent
- The composite receiving the three created widgets.labelText
- The Label text to be usedlabelToolTip
- The tooltip message to be set on the Label and the Control.labelStyle
- The style bits to be used for the label controlwidgetStyle
- The style bits to be used for the Text controlhelpURL
- The url String linking to the help. If null
or empty
no help button is created.LabeledText
widget.public static DecoratedOutputFile createDecoratedOutputFileWithPovrayHelpLink(Composite parent, java.lang.String labelText, java.lang.String labelToolTip, int labelStyle, int widgetStyle, java.lang.String helpURL, java.lang.String defValue)
LabeledLabel
widget along with a button linking to the Povray help system
and a description label. The Label and the Text fields are given the provided tooltip text.parent
- The composite receiving the three created widgets.labelText
- The Label text to be usedlabelToolTip
- The tooltip message to be set on the Label and the Control.labelStyle
- The style bits to be used for the label controlwidgetStyle
- The style bits to be used for the Text controlhelpURL
- The url String linking to the help. If null
or empty
no help button is created.LabeledText
widget.public static Button createLabeledRadioButtonWithPovrayHelpLink(Composite parent, java.lang.String labelText, java.lang.String labelToolTip, int widgetStyle, java.lang.String helpURL)
Button
widget along with a button linking to the Povray help system.
The Button is given the provided text and tooltip.I18nCommon.show_povray_topic_help_tt
as the help icon tooltip.parent
- The composite receiving the three created widgets.labelText
- The Label text to be usedlabelToolTip
- The tooltip message to be set on the Label and the Control.textStyle
- The style bits to be used for the Text controlhelpURL
- The url String linking to the help. If null
or empty
no help button is created.Button
widget.public static Button createLabeledRadioButtonWithPovrayHelpLink(Composite parent, java.lang.String labelText, java.lang.String labelToolTip, int widgetStyle, java.lang.String helpURL, java.lang.String helpIconTooltip)
Button
widget along with a button linking to the Povray help system.
The Button is given the provided text and tooltip.parent
- The composite receiving the three created widgets.labelText
- The Label text to be usedlabelToolTip
- The tooltip message to be set on the Label and the Control.textStyle
- The style bits to be used for the Text controlhelpURL
- The url String linking to the help. If null
or empty
no help button is created.helpIconTooltip
- The tooltip for the help icon to be shown.Button
widget.public static Button createLabeledCheckButtonWithPovrayHelpLink(Composite parent, java.lang.String labelText, java.lang.String labelToolTip, int labelStyle, int widgetStyle, java.lang.String helpURL)
Button
widget along with a button linking to the Povray help system.
The Button is given the provided text and tooltip.parent
- The composite receiving the three created widgets.labelText
- The Label text to be usedlabelToolTip
- The tooltip message to be set on the Label and the Control.labelStyle
- The style bits to be used for the label controltextStyle
- The style bits to be used for the Text controlhelpURL
- The url String linking to the help. If null
or empty
no help button is created.Button
widget.public static LabeledButton createLabeledCheckButtonWithPovrayHelpLink(Composite parent, java.lang.String labelText, java.lang.String labelToolTip, int labelStyle, int widgetStyle, java.lang.String helpURL, boolean defValue)
Button
widget along with a button linking to the Povray help system.
The Button is given the provided text and tooltip.parent
- The composite receiving the three created widgets.labelText
- The Label text to be usedlabelToolTip
- The tooltip message to be set on the Label and the Control.labelStyle
- The style bits to be used for the label controltextStyle
- The style bits to be used for the Text controlhelpURL
- The url String linking to the help. If null
or empty
no help button is created.def
- default value when user enables usButton
widget.public static Spinner createLabeledSpinnerWithPovrayHelpLink(Composite parent, java.lang.String labelText, java.lang.String labelToolTip, int labelStyle, int widgetStyle, java.lang.String helpURL)
Spinner
widget along with a button linking to the Povray help system
adn a description lable.
The Label and Spinner are given the provided tooltip.I18nCommon.show_megapov_topic_help_tt
.parent
- The composite receiving the three created widgets.labelText
- The Label text to be usedlabelToolTip
- The tooltip message to be set on the Label and the Control.labelStyle
- The style bits to be used for the label controltextStyle
- The style bits to be used for the Text controlhelpURL
- The url String linking to the help. If null
or empty
no help button is created.Spinner
widget.public static Spinner createLabeledSpinnerWithPovrayHelpLink(Composite parent, java.lang.String labelText, java.lang.String labelToolTip, int labelStyle, int widgetStyle, java.lang.String helpURL, java.lang.String helpIconTooltip)
Spinner
widget along with a button linking to the Povray help system
adn a description lable.
The Label and Spinner are given the provided tooltip.parent
- The composite receiving the three created widgets.labelText
- The Label text to be usedlabelToolTip
- The tooltip message to be set on the Label and the Control.labelStyle
- The style bits to be used for the label controltextStyle
- The style bits to be used for the Text controlhelpURL
- The url String linking to the help. If null
or empty
no help button is created.helpIconTooltip
- The tooltipß message to be used by the help icon.Spinner
widget.public static LabeledSpinner createLabeledSpinnerWithPovrayHelpLink(Composite parent, java.lang.String labelText, java.lang.String labelToolTip, int labelStyle, int widgetStyle, java.lang.String helpURL, double defValue)
public static LabeledSpinner createLabeledSpinnerWithPovrayHelpLink(Composite parent, java.lang.String labelText, java.lang.String labelToolTip, int labelStyle, int widgetStyle, java.lang.String helpURL, java.lang.String helpIconTooltip, double defValue)
Spinner
widget along with a button linking to the Povray help system
adn a description lable.
The Label and Spinner are given the provided tooltip.parent
- The composite receiving the three created widgets.labelText
- The Label text to be usedlabelToolTip
- The tooltip message to be set on the Label and the Control.labelStyle
- The style bits to be used for the label controltextStyle
- The style bits to be used for the Text controlhelpURL
- The url String linking to the help. If null
or empty
no help button is created.helpIconTooltip
- The tooltipß message to be used by the help icon.Spinner
widget.public static Combo createLabeledComboWithPovrayHelpLink(Composite parent, java.lang.String labelText, java.lang.String labelToolTip, int labelStyle, int widgetStyle, java.lang.String helpURL)
Combo
widget along with a button linking to the Povray help system
adn a description lable.
The Label and Combo are given the provided tooltip.parent
- The composite receiving the three created widgets.labelText
- The Label text to be usedlabelToolTip
- The tooltip message to be set on the Label and the Control.labelStyle
- The style bits to be used for the label controltextStyle
- The style bits to be used for the Text controlhelpURL
- The url String linking to the help. If null
or empty
no help button is created.Spinner
widget.public static LabeledCombo createLabeledComboWithPovrayHelpLink(Composite parent, java.lang.String labelText, java.lang.String labelToolTip, int labelStyle, int widgetStyle, java.lang.String helpURL, int defValue)
public static LabeledOutputType createLabeledOutputTypeWithPovrayHelpLink(Composite parent, java.lang.String labelText, java.lang.String labelToolTip, int labelStyle, int widgetStyle, java.lang.String helpURL, java.lang.String defValue)
public static Text createLabeledText(Composite parent, java.lang.String labelText, java.lang.String labelToolTip, int widgetStyle, boolean fullSize)
parent
- The parent composite to recieve the label and text field.labelText
- The label textlabelToolTip
- The tooltip to be set on the label and text fieldwidgetStyle
- The style bits for the text field.fullSize
- true
to let the text field occupy the complete
available horizontal space, false
otherwise.public static Combo createLabeledCombo(Composite parent, java.lang.String labelText, java.lang.String labelToolTip, int widgetStyle, boolean fullSize)
parent
- The parent composite to recieve the label and combo field.labelText
- The label textlabelToolTip
- The tooltip to be set on the label and combo fieldwidgetStyle
- The style bits for the combo field.fullSize
- true
to let the combo field occupy the complete
available horizontal space, false
otherwise.public static Label createLabel(Composite parent, java.lang.String labelText, int style, int numColumns, boolean takeFullWidth)
public static Button createLabeledButton(Composite parent, java.lang.String labelText, java.lang.String labelToolTip, int widgetStyle, boolean fullSize)
parent
- The parent composite to recieve the label and button field.labelText
- The label textlabelToolTip
- The tooltip to be set on the label and button fieldwidgetStyle
- The style bits for the button field.fullSize
- true
to let the button field occupy the complete
available horizontal space, false
otherwise.