org.opensha.refFaultParamDb.gui.params
Class CommentsParameterEditor

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JPanel
                  extended by org.opensha.commons.param.editor.AbstractParameterEditorOld
                      extended by org.opensha.refFaultParamDb.gui.params.CommentsParameterEditor
All Implemented Interfaces:
FocusListener, KeyListener, ImageObserver, MenuContainer, Serializable, EventListener, Accessible, ParameterEditor

public class CommentsParameterEditor
extends AbstractParameterEditorOld

Title: CommnetsParameterEditor

Description: This allows the input of multi line comments by the user.

Version:
1.0
Author:
Vipin Gupta, Nitin Gupta
See Also:
Serialized Form

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.
protected static GridBagConstraints WIDGET_GBC
           
protected static GridBagConstraints WIDGET_PANEL_GBC
           
protected static Dimension WIGET_PANEL_DIM
           
 
Fields inherited from class org.opensha.commons.param.editor.AbstractParameterEditorOld
border1, catchConstraint, COMBO_WIDGET_GBC, CONST_BORDER, DATA_TEXT, DEFAULT_FONT, DEFAULT_LABEL_FONT, EMPTY, ETCHED, FIVE_FIVE_INSETS, FIVE_INSETS, FOCUS_BORDER, focusEnabled, focusLostProcessing, FORE_COLOR, GBL, JCOMBO_DIM, JCOMBO_FONT, JLIST_DIM, keyTypeProcessing, LABEL_DIM, LABEL_PANEL_DIM, LABEL_TEXT, labelPanel, model, nameLabel, OUTER_PANEL_GBC, outerPanel, STRING_BACK_COLOR, titledBorder1, valueEditor, widgetPanel, ZERO_INSETS
 
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
CommentsParameterEditor()
          No-Arg constructor calls parent constructor
CommentsParameterEditor(Parameter model)
          Constructor that sets the parameter that it edits.
 
Method Summary
protected  void addWidget()
          This is where the JTextArea is defined and configured.
 void focusLost(FocusEvent e)
          Called when the user clicks on another area of the GUI outside this editor panel.
protected  void jbInit()
          Main GUI Initialization point.
 void refreshParamEditor()
          Updates the JTextArea string with the parameter value.
 void setParameter(Parameter model)
          Sets the parameter to be edited.
 
Methods inherited from class org.opensha.commons.param.editor.AbstractParameterEditorOld
focusGained, getComponent, getOuterPanel, getParameter, getValue, getValueEditor, isFocusEnabled, keyPressed, keyReleased, keyTyped, makeConstantEditor, removeWidget, setEditorBorder, setEnabled, setFocusEnabled, setNameLabelToolTip, setParameterInEditor, setValue, setWidgetBorder, setWidgetObject, unableToSetValue, updateNameLabel
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
 
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

C

protected static final String C
Class name for debugging.

See Also:
Constant Field Values

D

protected static final boolean D
If true print out debug statements.

See Also:
Constant Field Values

WIGET_PANEL_DIM

protected static final Dimension WIGET_PANEL_DIM

WIDGET_GBC

protected static final GridBagConstraints WIDGET_GBC

WIDGET_PANEL_GBC

protected static final GridBagConstraints WIDGET_PANEL_GBC
Constructor Detail

CommentsParameterEditor

public CommentsParameterEditor()
No-Arg constructor calls parent constructor


CommentsParameterEditor

public CommentsParameterEditor(Parameter model)
                        throws Exception
Constructor that sets the parameter that it edits. An Exception is thrown if the model is not an String Parameter

Throws:
Exception
Method Detail

addWidget

protected void addWidget()
This is where the JTextArea is defined and configured.

Overrides:
addWidget in class AbstractParameterEditorOld

jbInit

protected void jbInit()
               throws Exception
Main GUI Initialization point. This block of code is updated by JBuilder when using it's GUI Editor.

Overrides:
jbInit in class AbstractParameterEditorOld
Throws:
Exception

focusLost

public void focusLost(FocusEvent e)
Called when the user clicks on another area of the GUI outside this editor panel. This synchornizes the editor text field value to the internal parameter reference.

Specified by:
focusLost in interface FocusListener
Overrides:
focusLost in class AbstractParameterEditorOld

setParameter

public void setParameter(Parameter model)
Sets the parameter to be edited.

Specified by:
setParameter in interface ParameterEditor
Overrides:
setParameter in class AbstractParameterEditorOld

refreshParamEditor

public void refreshParamEditor()
Updates the JTextArea string with the parameter value. Used when the parameter is set for the first time, or changed by a background process independently of the GUI. This could occur with a ParameterChangeFail event.

Specified by:
refreshParamEditor in interface ParameterEditor
Overrides:
refreshParamEditor in class AbstractParameterEditorOld