|
Arch4J 1.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.Component | +--java.awt.Container | +--javax.swing.JComponent | +--javax.swing.JPanel | +--org.arch4j.ui.components.PropertiesPanel
This is the base panel for all panels in the user interfaces.
Field Summary | |
protected int |
bottomOffset
|
protected int |
boxOffset
|
protected int |
buttonOffset
|
protected JButton |
cancelButton
|
JDialog |
dialog
|
protected int |
fieldOffset
|
FractionalLayout |
layout
|
protected int |
leftIndent
|
protected boolean |
m_isDirty
|
protected JButton |
okButton
|
Performer |
performer
|
boolean |
returnValue
|
protected int |
rightIndent
|
protected int |
topOffset
|
protected int |
x
|
protected int |
y
|
protected int |
yHeight
|
protected int |
yIncrement
|
Fields inherited from class javax.swing.JComponent |
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
PropertiesPanel()
PropertiesPanel constructor comment. |
|
PropertiesPanel(int aLeftMargin,
int aLeftIndent,
int aRightIndent,
int aFieldOffset)
PropertiesPanel constructor comment. |
Method Summary | |
void |
actionPerformed(ActionEvent arg1)
Listener callback method. |
JCheckBox |
addCheckBox(JLabel label)
Add a comboBox field. |
JCheckBox |
addCheckBox(String labelString)
Add a comboBox field. |
JComboBox |
addComboBox(JLabel label,
Vector possibleValues,
Object initialValue)
Add a comboBox field. |
JComboBox |
addComboBox(JLabel label,
Vector possibleValues,
Object initialValue,
int aWidth)
Add a comboBox field. |
JComboBox |
addComboBox(String labelString,
Vector possibleValues,
Object initialValue)
Add a comboBox field. |
JComboBox |
addComboBox(String labelString,
Vector possibleValues,
Object initialValue,
int aWidth)
Add a comboBox field. |
protected void |
addComponent(Component aComponent,
int aStartingOffset,
int aWidth)
Add a component to the panel without positioning to the next line. |
protected void |
addComponentRelativeToBottom(Component aComponent,
int aBottomOffset)
Add a component to the panel starting at the current y location and the bottom constraint on the bottom of the panel as it streches. |
protected void |
addComponentRelativeToBottom(Component aComponent,
int aBottomOffset,
int aHeight)
Add a component to the panel starting at the current y location and the bottom constraint on the bottom of the panel as it streches. |
protected void |
addComponentRelativeToBottom(Component aComponent,
int aBottomOffset,
int aHeight,
int aWidth)
Add a component to the panel starting at the current y location and the bottom constraint on the bottom of the panel as it streches. |
protected void |
addComponentRelativeToBottomWithWidth(Component aComponent,
int aBottomOffset,
int aWidth)
Add a component to the panel starting at the current y location and the bottom constraint on the bottom of the panel as it streches. |
protected void |
addComponentRelativeToRight(Component aComponent,
int aStartingOffset)
Add a component to the panel without positioning to the next line. |
protected void |
addComponentRelativeToRight(Component aComponent,
int aStartingOffset,
int aHeight)
Add a component to the panel without positioning to the next line. |
void |
addComponents()
This method was created by a SmartGuide. |
JButton |
addHelpButton()
|
JButton |
addHelpButton(int yIncrement)
|
JLabel |
addLabel(String aLabel)
|
JLabel |
addLabel(String aLabel,
int yIncrement)
|
protected JList |
addList(JLabel label,
Vector contents,
String selectedItem,
int height)
Add a text area. |
protected JList |
addList(String labelString,
Vector contents,
String selectedItem,
int height)
Add a text area. |
JTextField |
addNewlineTextField(JLabel label,
String initialValue)
Add a label and a text field, with the text field on the line below the label example: label: [textfield]. |
JTextField |
addNewlineTextField(String labelString,
String initialValue)
Add a label and a text field, with the text field on the line below the label example: label: [textfield]. |
protected void |
addOkCancelButtons()
Add the OK and Cancel buttons to the panel. |
protected void |
addPanel(JPanel aPanel)
Add the panel to our canvas and used the height of the panel. |
protected void |
addPanel(JPanel aPanel,
int aHeight)
Add the panel to our canvas with the given height. |
protected void |
addPanel(JPanel aPanel,
int anOffset,
int aWidth,
int aHeight)
Add the panel to our canvas with the given height. |
void |
addPanelTypeForDebug()
|
protected void |
addScrollPane(JScrollPane aScrollPane,
int aHeight)
Add the scroll pane to our canvas with the given height. |
SearchComboBox |
addSearchComboBox(JLabel label,
Vector possibleValues,
Object initialValue)
Add a comboBox field. |
SearchComboBox |
addSearchComboBox(JLabel label,
Vector possibleValues,
Object initialValue,
int aWidth)
Add a comboBox field. |
SearchComboBox |
addSearchComboBox(String labelString,
Vector possibleValues,
Object initialValue)
Add a comboBox field. |
SearchComboBox |
addSearchComboBox(String labelString,
Vector possibleValues,
Object initialValue,
int aWidth)
Add a comboBox field. |
JTable |
addTable(JLabel label,
TableModel tableModel,
int height)
This method was created by a SmartGuide. |
JTable |
addTable(String tableLabel,
TableModel tableModel,
int height)
This method was created by a SmartGuide. |
protected MaxLengthTextArea |
addTextArea(JLabel label,
String contents,
int height)
Add a max length text area. |
protected MaxLengthTextArea |
addTextArea(JLabel label,
String contents,
int height,
boolean tabTraversable)
Add a max length text area. |
protected MaxLengthTextArea |
addTextArea(String labelString,
String contents,
int height)
Add a max length text area. |
protected MaxLengthTextArea |
addTextArea(String labelString,
String contents,
int height,
boolean tabTraversable)
Add a max length text area. |
protected JTextArea |
addTextAreaToBottom(JLabel label,
String contents,
int bottomOffset)
Add a text area. |
protected JTextArea |
addTextAreaToBottom(String labelString,
String contents,
int bottomOffset)
Add a text area. |
MaxLengthField |
addTextField(JLabel label,
String initialValue)
Add a text field. |
MaxLengthField |
addTextField(JLabel label,
String initialValue,
int width)
Add a text field. |
MaxLengthField |
addTextField(String labelString,
String initialValue)
Add a text field. |
MaxLengthField |
addTextField(String labelString,
String initialValue,
int aWidth)
Add a text field. |
JLabel |
addTextLabel(JLabel label,
String value)
Add non-editable text preceded by a label. |
JLabel |
addTextLabel(String labelString,
String value)
Add non-editable text preceded by a label. |
void |
addTitle()
|
void |
cancelPressed()
Invoked when the cancel button is pressed. |
protected void |
closeWindow()
Close the top level window. |
static void |
disableTextField(JTextField aTextField)
Disable a text field. |
boolean |
displayConfirm(String aMessage,
String aTitle)
Display an Confirmation dialog to the user |
void |
displayError(String anError,
String aTitle)
Display an error to the user. |
void |
displayInformation(String aMessage,
String aTitle)
Display an informational message to the user. |
void |
displayWarning(String aWarning,
String aTitle)
Display a warning to the user. |
static void |
enableTextField(JTextField aTextField)
Enable a text field. |
void |
ensureVisible(JComponent aComponent)
Make sure the component is visible if in a scroll pane. |
void |
focusGained(FocusEvent e)
|
void |
focusLost(FocusEvent e)
|
protected JButton |
getDefaultButton()
|
int |
getFieldOffset()
accessor for fieldOffset |
int |
getPanelHeight()
Get the height of the panel. |
int |
getPanelWidth()
Gets the calculated width of the panel. |
Dimension |
getPreferredSize()
This method was created by a SmartGuide. |
int |
getRightIndent()
accessor for rightIndent |
ComponentStateMonitor |
getStateMonitor()
Gets the state monitor for this panel. |
String |
getTitle()
This method was created by a SmartGuide. |
void |
highlightAndEnsureVisible(FocusEvent e)
|
void |
initialize()
This method was created by a SmartGuide. |
boolean |
isAdjustingFieldValues()
|
boolean |
isDialog()
Returns true if this panel is being shown in a dialog. |
boolean |
isDirty()
Returns true if there have been any changes to the panel that have not been committed. |
boolean |
isDisplayingMessage()
|
boolean |
isValidSize(String sizeString,
String applicationName)
|
protected void |
monitorComponentState(JCheckBox aCheckBox)
Add the field to the monitor. |
protected void |
monitorComponentState(JComboBox aComboBox)
Add the field to the monitor. |
protected void |
monitorComponentState(JList aList)
Add the field to the monitor. |
protected void |
monitorComponentState(JTable aTable)
Add the field to the monitor. |
protected void |
monitorComponentState(JTextArea aTextArea)
Add the field to the monitor. |
protected void |
monitorComponentState(JTextField aTextField)
Add the field to the monitor. |
void |
okPressed()
Invoked when the ok/apply button is pressed on the user interface. |
protected void |
positionToNextLine()
Position the x and y coordinates for the next row. |
void |
resetStateMonitor()
Reset the state of the monitor. |
protected void |
resizePanel(JPanel aPanel,
int aHeight)
Resize panel on our canvas with the given height. |
protected void |
resizePanel(JPanel aPanel,
int aWidth,
int aHeight)
Resize panel on our canvas with the given height. |
void |
setDefaultCursor()
Set the wait cursor. |
void |
setFieldOffset(int newFieldOffset)
mutator for fieldOffset |
void |
setIsAdjustingFieldValues(boolean isAdjusting)
Marked by implementors if PropertiesPanel to flag when fields are being adjusted programatically. |
void |
setLeftIndent(int anIndent)
Set the indentation from the left when placing elements. |
void |
setLeftMargin(int aPosition)
Set the left margin for placing elements. |
void |
setRightIndent(int newRightIndent)
mutator for rightIndent |
protected void |
setupComponentMonitoring()
Setup the components that you wish to have their state tracked. |
void |
setWaitCursor()
Set the wait cursor. |
boolean |
showDialog(Component parent,
String title)
Show this panel as a dialog without resizing. |
boolean |
showDialog(Component parent,
String title,
boolean resizable)
Show this panel as a dialog. |
boolean |
update()
Update the values from the interface back to the domain object. |
Methods inherited from class javax.swing.JPanel |
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public FractionalLayout layout
public Performer performer
public JDialog dialog
public boolean returnValue
protected boolean m_isDirty
protected JButton okButton
protected JButton cancelButton
protected int x
protected int y
protected int leftIndent
protected int rightIndent
protected int topOffset
protected int bottomOffset
protected int fieldOffset
protected int yHeight
protected int yIncrement
protected int boxOffset
protected int buttonOffset
Constructor Detail |
public PropertiesPanel()
public PropertiesPanel(int aLeftMargin, int aLeftIndent, int aRightIndent, int aFieldOffset)
Method Detail |
public void actionPerformed(ActionEvent arg1)
actionPerformed
in interface ActionListener
public JCheckBox addCheckBox(String labelString)
public void ensureVisible(JComponent aComponent)
public JCheckBox addCheckBox(JLabel label)
public JComboBox addComboBox(String labelString, Vector possibleValues, Object initialValue)
labelString
- The text for the label.possibleValues
- The list of possible values.initialValue
- The initial selection.public JComboBox addComboBox(String labelString, Vector possibleValues, Object initialValue, int aWidth)
labelString
- The text for the label.possibleValues
- The list of possible values.initialValue
- The initial selection.aWidth
- The width of the field in pixelspublic JComboBox addComboBox(JLabel label, Vector possibleValues, Object initialValue)
label
- The label to use for the combo-box.possibleValues
- The list of possible values.initialValue
- The initial selection.public JComboBox addComboBox(JLabel label, Vector possibleValues, Object initialValue, int aWidth)
label
- The label to use for the combo-box.possibleValues
- The list of possible values.initialValue
- The initial selection.aWidth
- The width of the field in pixelspublic SearchComboBox addSearchComboBox(String labelString, Vector possibleValues, Object initialValue)
labelString
- The text for the label.possibleValues
- The list of possible values.initialValue
- The initial selection.public SearchComboBox addSearchComboBox(String labelString, Vector possibleValues, Object initialValue, int aWidth)
labelString
- The text for the label.possibleValues
- The list of possible values.initialValue
- The initial selection.aWidth
- The width of the field in pixelspublic SearchComboBox addSearchComboBox(JLabel label, Vector possibleValues, Object initialValue)
label
- The label to use for the combo-box.possibleValues
- The list of possible values.initialValue
- The initial selection.public SearchComboBox addSearchComboBox(JLabel label, Vector possibleValues, Object initialValue, int aWidth)
label
- The label to use for the combo-box.possibleValues
- The list of possible values.initialValue
- The initial selection.aWidth
- The width of the field in pixelspublic void addComponents()
public JButton addHelpButton()
public static void disableTextField(JTextField aTextField)
aTextField
- The text field to disable.public static void enableTextField(JTextField aTextField)
aTextField
- The text field to enable.public JButton addHelpButton(int yIncrement)
public JLabel addLabel(String aLabel)
public JLabel addLabel(String aLabel, int yIncrement)
protected JList addList(String labelString, Vector contents, String selectedItem, int height)
protected JList addList(JLabel label, Vector contents, String selectedItem, int height)
public JTextField addNewlineTextField(String labelString, String initialValue)
public JTextField addNewlineTextField(JLabel label, String initialValue)
protected void addOkCancelButtons()
protected void addPanel(JPanel aPanel)
aPanel
- The panel to add.protected void addPanel(JPanel aPanel, int anOffset, int aWidth, int aHeight)
aPanel
- The panel to add.aHeight
- The height of the panel on our canvas.protected void addPanel(JPanel aPanel, int aHeight)
aPanel
- The panel to add.aHeight
- The height of the panel on our canvas.protected void resizePanel(JPanel aPanel, int aHeight)
aPanel
- The panel to resize.aHeight
- The height of the panel on our canvas.protected void resizePanel(JPanel aPanel, int aWidth, int aHeight)
aPanel
- The panel to resize.aWidth
- The width of the panel on our canvas.aHeight
- The height of the panel on our canvas.protected void addScrollPane(JScrollPane aScrollPane, int aHeight)
aScrollPane
- The scroll pane to add.aHeight
- The height of the scroll pane on our canvas.public JTable addTable(String tableLabel, TableModel tableModel, int height)
public JTable addTable(JLabel label, TableModel tableModel, int height)
protected MaxLengthTextArea addTextArea(String labelString, String contents, int height)
protected MaxLengthTextArea addTextArea(String labelString, String contents, int height, boolean tabTraversable)
protected MaxLengthTextArea addTextArea(JLabel label, String contents, int height)
protected MaxLengthTextArea addTextArea(JLabel label, String contents, int height, boolean tabTraversable)
protected JTextArea addTextAreaToBottom(String labelString, String contents, int bottomOffset)
protected JTextArea addTextAreaToBottom(JLabel label, String contents, int bottomOffset)
public MaxLengthField addTextField(String labelString, String initialValue)
labelString
- The text for the label that is placed next to the field.initialValue
- The initial value for the text field.
public MaxLengthField addTextField(String labelString, String initialValue, int aWidth)
labelString
- The text for the label that is placed next to the field.initialValue
- The initial value for the text field.aWidth
- The width of the field in pixels.
public MaxLengthField addTextField(JLabel label, String initialValue)
label
- The label to place next to the field.initialValue
- The initial value for the text field.
public MaxLengthField addTextField(JLabel label, String initialValue, int width)
label
- The label to place next to the field.initialValue
- The initial value for the text field.width
- The width to make the text field.
public JLabel addTextLabel(String labelString, String value)
public JLabel addTextLabel(JLabel label, String value)
public void addPanelTypeForDebug()
public void addTitle()
protected void closeWindow()
public int getFieldOffset()
public Dimension getPreferredSize()
getPreferredSize
in class JComponent
public int getRightIndent()
public ComponentStateMonitor getStateMonitor()
public void resetStateMonitor()
public String getTitle()
public void initialize()
public void setLeftIndent(int anIndent)
anIndent
- The amount to indent from the left when placing elements.public void setLeftMargin(int aPosition)
aPosition
- The left margin for placing elements.public boolean isDialog()
public boolean isDirty()
isDirty
in interface EditablePropertyPanel
protected void monitorComponentState(JCheckBox aCheckBox)
aCheckBox
- The field to monitor.protected void monitorComponentState(JComboBox aComboBox)
aComboBox
- The field to monitor.protected void monitorComponentState(JList aList)
aList
- The field to monitor.protected void monitorComponentState(JTable aTable)
aTable
- The field to monitor.protected void monitorComponentState(JTextField aTextField)
aTextField
- The field to monitor.protected void monitorComponentState(JTextArea aTextArea)
aTextArea
- The field to monitor.public void okPressed()
public void cancelPressed()
public void setDefaultCursor()
public void setFieldOffset(int newFieldOffset)
public void setRightIndent(int newRightIndent)
protected void setupComponentMonitoring()
public void setWaitCursor()
public boolean showDialog(Component parent, String title)
parent
- The parent component that the dialog will be centered on.title
- The title for the dialog.
public boolean showDialog(Component parent, String title, boolean resizable)
parent
- The parent component that the dialog will be centered on.title
- The title for the dialog.resizable
- Whether or not to allow the user to resize the dialog.
protected JButton getDefaultButton()
public boolean update()
update
in interface EditablePropertyPanel
public boolean isValidSize(String sizeString, String applicationName)
public void displayError(String anError, String aTitle)
anError
- The error message.aTitle
- The title for the dialog.public boolean displayConfirm(String aMessage, String aTitle)
aMessage
- The confirmation message.aTitle
- The title for the dialog.
public void displayWarning(String aWarning, String aTitle)
aWarning
- The warning message.aTitle
- The title for the dialog.public void displayInformation(String aMessage, String aTitle)
aMessage
- The informational message.aTitle
- The title for the dialog.public int getPanelHeight()
protected void addComponent(Component aComponent, int aStartingOffset, int aWidth)
aComponent
- The component to add.aStartingOffset
- The amount of space to put in to separate from last component.aWidth
- The width of the component on the panel.protected void addComponentRelativeToRight(Component aComponent, int aStartingOffset)
aComponent
- The component to add.aStartingOffset
- The amount of space to put in to separate from last component.protected void addComponentRelativeToRight(Component aComponent, int aStartingOffset, int aHeight)
aComponent
- The component to add.aStartingOffset
- The amount of space to put in to separate from last component.aHeight
- The height of the component to add.protected void addComponentRelativeToBottomWithWidth(Component aComponent, int aBottomOffset, int aWidth)
aComponent
- The component to add.aBottomOffset
- The amount of space to leave at the bottom of the
panel.aWidth
- The width of the component to add.protected void addComponentRelativeToBottom(Component aComponent, int aBottomOffset)
aComponent
- The component to add.aBottomOffset
- The amount of space to leave at the bottom of the
panel.protected void addComponentRelativeToBottom(Component aComponent, int aBottomOffset, int aHeight)
aComponent
- The component to add.aBottomOffset
- The amount of space to leave at the bottom of the
panel.aHeight
- The height of the component.protected void addComponentRelativeToBottom(Component aComponent, int aBottomOffset, int aHeight, int aWidth)
aComponent
- The component to add.aBottomOffset
- The amount of space to leave at the bottom of the
panel.aHeight
- The height of the component.aWidth
- The width of the component.protected void positionToNextLine()
public int getPanelWidth()
public boolean isDisplayingMessage()
public void focusGained(FocusEvent e)
public void highlightAndEnsureVisible(FocusEvent e)
public void focusLost(FocusEvent e)
public void setIsAdjustingFieldValues(boolean isAdjusting)
public boolean isAdjustingFieldValues()
true
if the panel is currently being adjusted
programatically, otherwise false
|
Arch4J 1.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |