|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
org.opensha.commons.gui.LabeledBorderPanel
org.opensha.commons.param.editor.AbstractParameterEditor<String>
org.opensha.commons.param.editor.impl.StringParameterEditor
public class StringParameterEditor
Title: IntegerParameterEditor
Description: Subclass of ParameterEditor for editing StringParameters. The widget is an JTextField.
The main functionality overidden from the parent class to achive Integer cusomization are the setWidgetObject() and AddWidget() functions. The parent's class JComponent valueEditor field becomes an IntegerTextField, a subclass of a JTextField.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class javax.swing.JPanel |
|---|
JPanel.AccessibleJPanel |
| Nested classes/interfaces inherited from class javax.swing.JComponent |
|---|
JComponent.AccessibleJComponent |
| Nested classes/interfaces inherited from class java.awt.Container |
|---|
Container.AccessibleAWTContainer |
| Nested classes/interfaces inherited from class java.awt.Component |
|---|
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy |
| Field Summary | |
|---|---|
protected static String |
C
Class name for debugging. |
protected static boolean |
D
If true print out debug statements. |
| Fields inherited from class org.opensha.commons.param.editor.AbstractParameterEditor |
|---|
CONST_BORDER, DEFAULT_FONT, ETCHED, FOCUS_BORDER, LABEL_DIM, LABEL_PANEL_DIM, WIGET_PANEL_DIM |
| Fields inherited from class org.opensha.commons.gui.LabeledBorderPanel |
|---|
addDefault, borderColor, editorPanel, GBL, jScrollPane1, mainPanel, PARAMETER_LABEL_FONT, PARAMTER_FORE_COLOR, title |
| 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 | |
|---|---|
protected |
StringParameterEditor()
No-Arg constructor calls parent constructtor |
|
StringParameterEditor(Parameter model)
Constructor that sets the parameter that it edits. |
| Method Summary | |
|---|---|
protected JComponent |
buildWidget()
This will be called by refreshParamEditor to initially build the widget component. |
void |
focusGained(FocusEvent e)
|
void |
focusLost(FocusEvent e)
Called when the user clicks on another area of the GUI outside this editor panel. |
boolean |
isParameterSupported(Parameter<String> param)
Abstract method that allows subclasses to define if a specific parameter is valid. |
void |
keyPressed(KeyEvent e)
|
void |
keyReleased(KeyEvent e)
|
void |
keyTyped(KeyEvent e)
Called everytime a key is typed in the text field to validate it as a valid integer character ( digits and - sign in first position ). |
void |
setEnabled(boolean enabled)
|
protected JComponent |
updateWidget()
This is called by refreshParamEditor when the parameters value is changed externally
and the widget needs to be updated to reflect the new value. |
| Methods inherited from class org.opensha.commons.param.editor.AbstractParameterEditor |
|---|
getComponent, getLabelToolTipText, getParameter, getValue, getWidget, getWidgetToolTipText, isFocusEnabled, makeSingleConstraintValueLabel, refreshParamEditor, removeWidget, setEditorBorder, setFocusEnabled, setParameter, setValue, unableToSetValue, updateTitle |
| Methods inherited from class org.opensha.commons.gui.LabeledBorderPanel |
|---|
add, add, add, add, add, getBorderColor, getTitle, initParameterLookAndFeel, jbInit, remove, remove, removeAll, setBorderColor, setLayout, setTitle, setTitleFont, setTitleJustification, setTitlePosition |
| 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 |
| Methods inherited from interface org.opensha.commons.param.editor.ParameterEditor |
|---|
isVisible, setVisible |
| Field Detail |
|---|
protected static final String C
protected static final boolean D
| Constructor Detail |
|---|
protected StringParameterEditor()
public StringParameterEditor(Parameter model)
throws Exception
Exception| Method Detail |
|---|
public void keyTyped(KeyEvent e)
keyTyped in interface KeyListenerpublic void focusLost(FocusEvent e)
focusLost in interface FocusListenerpublic boolean isParameterSupported(Parameter<String> param)
AbstractParameterEditorsetParameter is called.
isParameterSupported in class AbstractParameterEditor<String>public void setEnabled(boolean enabled)
setEnabled in interface ParameterEditor<String>setEnabled in class AbstractParameterEditor<String>protected JComponent buildWidget()
AbstractParameterEditorrefreshParamEditor to initially build the widget component.
buildWidget in class AbstractParameterEditor<String>protected JComponent updateWidget()
AbstractParameterEditorrefreshParamEditor when the parameters value is changed externally
and the widget needs to be updated to reflect the new value. If the widget can be simply updated
to display/edit the new value, it should do so.
buildWidget), or return the new
component.
updateWidget in class AbstractParameterEditor<String>public void keyPressed(KeyEvent e)
keyPressed in interface KeyListenerpublic void keyReleased(KeyEvent e)
keyReleased in interface KeyListenerpublic void focusGained(FocusEvent e)
focusGained in interface FocusListener
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||