|
ABLE 2.0.0 07/02/2003 10:25:01 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.able.AblePanelHelper
This class provides graphical helper methods to assure consistency of controls for AbleCustomizer panels. It contains only static methods.
AbleObjectCustomizer
Method Summary | |
---|---|
static javax.swing.JButton |
addButton(javax.swing.JPanel thePanel,
int theX,
int theY,
int theWidth,
java.lang.String theLabel,
java.awt.event.ActionListener theAction,
java.lang.String theToolTip)
Construct a JButton and place it on the panel provided at the specified location. |
static javax.swing.JButton |
addButton(javax.swing.JPanel thePanel,
java.lang.String theLabel,
java.awt.event.ActionListener theAction,
java.lang.String theToolTip)
Construct a JButton and place it on the panel. |
static javax.swing.JCheckBox |
addCheckBox(javax.swing.JPanel thePanel,
int theX,
int theY,
int theWidth,
java.lang.String theLabel)
Construct a JCheckBox and place it on the panel provided at the specified location. |
static javax.swing.JCheckBox |
addCheckBox(javax.swing.JPanel thePanel,
int theX,
int theY,
java.lang.String theLabel)
Construct a JCheckBox and place it on the panel provided at the specified location. |
static javax.swing.JComboBox |
addComboBox(javax.swing.JPanel thePanel,
int theX,
int theY,
int theWidth)
Construct a JComboBox and place it on the panel provided at the specified location. |
static javax.swing.JComboBox |
addComboBox(javax.swing.JPanel thePanel,
int theX,
int theY,
int theWidth,
java.util.Vector model)
Construct a JComboBox and place it on the panel provided at the specified location. |
static AbleJTextAreaHandler |
addJTextAreaHandler(AbleLogger theLogger,
java.lang.String handlerName,
long level,
javax.swing.JTextArea area)
Add an AbleJTextAreaHandler handler to a logger. |
static javax.swing.JLabel |
addLabel(javax.swing.JPanel thePanel,
int theX,
int theY,
int theWidth,
java.lang.String theLabel)
Construct a JLabel and place it on the panel provided at the specified location. |
static javax.swing.JList |
addList(javax.swing.JPanel thePanel,
int theX,
int theY,
int theWidth,
int theHeight,
int theMode)
Construct a JList and place it in a JScrollPane on the panel provided at the specified location. |
static javax.swing.JPasswordField |
addPasswordField(javax.swing.JPanel thePanel,
int theX,
int theY,
int theWidth)
Construct a JPasswordField and place it on the panel provided at the specified location. |
static javax.swing.JTextArea |
addTextArea(javax.swing.JPanel thePanel,
int theX,
int theY,
int theWidth,
int theHeight,
int theRows,
int theColumns)
Construct a JTextArea and place it in a JScrollPane on the panel provided at the specified location. |
static javax.swing.JTextField |
addTextField(javax.swing.JPanel thePanel,
int theX,
int theY,
int theWidth)
Construct a JTextField and place it on the panel provided at the specified location. |
static AbleJTextAreaHandler |
addTraceJTextAreaHandler(AbleBean theBean,
long level,
javax.swing.JTextArea area)
Add a new JTextAreaHandler to a bean's trace logger. |
static java.lang.String |
Copyright()
Determine the copyright of this class. |
static java.lang.String[] |
getFileDialog(java.awt.Window theParent,
java.lang.String theChooserTitle,
java.lang.String theFileTitle,
java.lang.String[] theFileSpec,
java.lang.String theDirectory,
int theDialogType)
Construct a modal JFileChooser and use it to obtain a file and path. |
static java.lang.String[] |
getFileDialog(java.awt.Window theParent,
java.lang.String theChooserTitle,
java.lang.String theFileTitle,
java.lang.String theFileExtension,
java.lang.String theDirectory,
int theDialogType)
Construct a modal JFileChooser and use it to obtain a file and path. |
static void |
removeTraceJTextAreaHandler(AbleBean theBean)
Remove the Able.TraceLog file handler from a bean's trace logger. |
static void |
setFileDialog(javax.swing.JTextField theTextField,
java.lang.String theDialogTitle,
java.lang.String theFileSpec)
Deprecated. Use setTextFieldFromFileDialog instead. |
static java.lang.String |
setTextFieldFromFileDialog(javax.swing.JTextField theTextField,
java.lang.String theDirectory)
Construct a OPEN JFileChooser dialog and use it to set the text of a JTextField. |
static java.lang.String |
setTextFieldFromFileDialog(javax.swing.JTextField theTextField,
java.lang.String theFileTitle,
java.lang.String[] theFileExtensions,
java.lang.String theDirectory)
Construct a OPEN JFileChooser dialog and use it to set the text of a JTextField. |
static java.lang.String |
setTextFieldFromFileDialog(javax.swing.JTextField theTextField,
java.lang.String theFileTitle,
java.lang.String theFileExtension,
java.lang.String theDirectory)
Construct a OPEN JFileChooser dialog and use it to set the text of a JTextField. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static javax.swing.JButton addButton(javax.swing.JPanel thePanel, int theX, int theY, int theWidth, java.lang.String theLabel, java.awt.event.ActionListener theAction, java.lang.String theToolTip)
thePanel
- add the new button to this JPanel.theX
- place the new button at this X location.theY
- place the new button at this Y location.theWidth
- the button width.theLabel
- use this label for the new button.theAction
- the action listener to use when the button is pressed.theToolTip
- the text to display when the mouse hovers over the button.public static javax.swing.JButton addButton(javax.swing.JPanel thePanel, java.lang.String theLabel, java.awt.event.ActionListener theAction, java.lang.String theToolTip)
thePanel
- add the new button to this JPanel.theLabel
- use this label for the new button.theAction
- the action listener to use when the button is pressed.theToolTip
- the text to display when the mouse hovers over the button.public static javax.swing.JCheckBox addCheckBox(javax.swing.JPanel thePanel, int theX, int theY, java.lang.String theLabel)
thePanel
- add the new checkbox to this JPanel.theX
- place the new checkbox at this X location.theY
- place the new checkbox at this Y location.theLabel
- use this label for the new checkbox.public static javax.swing.JCheckBox addCheckBox(javax.swing.JPanel thePanel, int theX, int theY, int theWidth, java.lang.String theLabel)
thePanel
- add the new checkbox to this JPanel.theX
- place the new checkbox at this X location.theY
- place the new checkbox at this Y location.theWidth
- the checkbox width.theLabel
- use this label for the new checkbox.public static javax.swing.JComboBox addComboBox(javax.swing.JPanel thePanel, int theX, int theY, int theWidth)
thePanel
- add the new combobox to this JPanel.theX
- place the new combobox at this X location.theY
- place the new combobox at this Y location.theWidth
- the combobox width.public static javax.swing.JComboBox addComboBox(javax.swing.JPanel thePanel, int theX, int theY, int theWidth, java.util.Vector model)
thePanel
- add the new combobox to this JPanel.theX
- place the new combobox at this X location.theY
- place the new combobox at this Y location.theWidth
- the combobox width.public static javax.swing.JLabel addLabel(javax.swing.JPanel thePanel, int theX, int theY, int theWidth, java.lang.String theLabel)
thePanel
- add the new label to this JPanel.theX
- place the new label at this X location.theY
- place the new label at this Y location.theWidth
- the new label width.theLabel
- use this label for the text.public static javax.swing.JList addList(javax.swing.JPanel thePanel, int theX, int theY, int theWidth, int theHeight, int theMode)
thePanel
- add the new list to this JPanel.theX
- place the new list at this X location.theY
- place the new list at this Y location.theWidth
- the list width.theHeight
- the list height.theMode
- the selection mode for the ListSelectionModel.ListSelectionModel
public static javax.swing.JTextArea addTextArea(javax.swing.JPanel thePanel, int theX, int theY, int theWidth, int theHeight, int theRows, int theColumns)
thePanel
- add the new text area to this JPanel.theX
- place the new text area at this X location.theY
- place the new text area at this Y location.theWidth
- the text area width.theHeight
- the text area height.theRows
- the number of rows in the text area. Provide -1 to
avoid setting the row size.theColumns
- the number of rows in the text area. Provide -1 to
avoid setting the column size.public static javax.swing.JTextField addTextField(javax.swing.JPanel thePanel, int theX, int theY, int theWidth)
thePanel
- add the new text field to this JPanel.theX
- place the new text field at this X location.theY
- place the new text field at this Y location.theWidth
- the text field width.public static javax.swing.JPasswordField addPasswordField(javax.swing.JPanel thePanel, int theX, int theY, int theWidth)
thePanel
- add the new text field to this JPanel.theX
- place the new text field at this X location.theY
- place the new text field at this Y location.theWidth
- the text field width.public static void setFileDialog(javax.swing.JTextField theTextField, java.lang.String theDialogTitle, java.lang.String theFileSpec)
theTextField
- The textfield to be populated with the FileDialog selection.theDialogTitle
- The title to be used for the FileDialog box.theFileSpec
- The filter to be used to select files.public static java.lang.String[] getFileDialog(java.awt.Window theParent, java.lang.String theChooserTitle, java.lang.String theFileTitle, java.lang.String theFileExtension, java.lang.String theDirectory, int theDialogType)
theParent
- The Window that represents the JFileChooser's parent.theChooserTitle
- A String containing the JFileChooser's title.theFileTitle
- The description used to identify the file selection.
Suggested format: "Description of File (*.xyz)"theFileExtension
- The extension used to filter the search, for
example: "xyz".theDirectory
- A String containing the starting directory.theDialogType
- An integer representing the type of dialog:
JFileChooser
public static java.lang.String[] getFileDialog(java.awt.Window theParent, java.lang.String theChooserTitle, java.lang.String theFileTitle, java.lang.String[] theFileSpec, java.lang.String theDirectory, int theDialogType)
theParent
- The Window that represents the JFileChooser's parent.theChooserTitle
- A String containing the JFileChooser's title.theFileTitle
- The description used to identify the file selection.
Suggested format: "Description of File (*.xyz)"theFileExtensions
- A String array of file extensions used to filter the search, for
example: {"ser", "xlt"}.
theDirectory
- A String containing the starting directory.theDialogType
- An integer representing the type of dialog:
JFileChooser
public static java.lang.String setTextFieldFromFileDialog(javax.swing.JTextField theTextField, java.lang.String theFileTitle, java.lang.String theFileExtension, java.lang.String theDirectory)
theTextField
- The textfield to be populated with the JFileChooser selection.theFileTitle
- The description used to identify the file selection.
Suggested format: "Description of File (*.xyz)"theFileExtension
- The extension used to filter the search, for
example: "xyz".theDirectory
- A String containing the starting directory.public static java.lang.String setTextFieldFromFileDialog(javax.swing.JTextField theTextField, java.lang.String theFileTitle, java.lang.String[] theFileExtensions, java.lang.String theDirectory)
theTextField
- The textfield to be populated with the JFileChooser selection.theFileTitle
- The description used to identify the file selection.
Suggested format: "Description of File (*.xyz)"theFileExtensions
- A String array of extensions used to filter the search, for
example: {"ser","xlt"}.theDirectory
- A String containing the starting directory.public static java.lang.String setTextFieldFromFileDialog(javax.swing.JTextField theTextField, java.lang.String theDirectory)
theTextField
- The textfield to be populated with the JFileChooser selection.theDirectory
- A String containing the starting directory.public static AbleJTextAreaHandler addTraceJTextAreaHandler(AbleBean theBean, long level, javax.swing.JTextArea area) throws AbleException
Able.startBeanTraceLogging(com.ibm.able.AbleBean)
or no action
will be taken.
If the bean's logger already has a JTextAreaHandler, it is removed and
a new handler is constructed.theBean
- An AbleBean whose trace output is to be sent to its own JTextArea.level
- A level from AbleTraceLogger.TraceLogLevelValuesVector
used to calculate a mask.fileName
- The path and file name used to store the trace output.addJTextAreaHandler(AbleLogger, String, long, JTextArea)
public static AbleJTextAreaHandler addJTextAreaHandler(AbleLogger theLogger, java.lang.String handlerName, long level, javax.swing.JTextArea area)
AnyMaskFilter
is
calculated from the level.
If Able.Debug is true, the AbleTraceFormatter is used to display output.theLogger
- The logger instance to use the new handler.handlerName
- A String containing the name of the handler to add.level
- A level used to calculate the mask for an AnyMaskFilter
.JTextArea
- A JTextArea to display the output.public static void removeTraceJTextAreaHandler(AbleBean theBean) throws AbleException
theBean
- An AbleBean whose trace output is no longer to be filed.public static java.lang.String Copyright()
|
ABLE 2.0.0 07/02/2003 10:25:01 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |