public class G9TextArea extends JTextArea implements G9ValueState, G9FieldValue
JTextArea.AccessibleJTextAreaJTextComponent.AccessibleJTextComponent, JTextComponent.DropLocation, JTextComponent.KeyBindingJComponent.AccessibleJComponentContainer.AccessibleAWTContainerComponent.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy| Modifier and Type | Field and Description |
|---|---|
protected EventListenerList |
vcListeners
List of value changed listeners
|
DEFAULT_KEYMAP, FOCUS_ACCELERATOR_KEYlistenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOWaccessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENTABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH| Constructor and Description |
|---|
G9TextArea()
Constructs a new TextArea.
|
G9TextArea(Document doc)
Constructs a new JTextArea with the given document model, and defaults
for all of the other arguments (null, 0, 0).
|
G9TextArea(Document doc,
String text,
int rows,
int columns)
Constructs a new JTextArea with the specified number of rows and columns,
and the given model.
|
G9TextArea(int rows,
int columns)
Constructs a new empty TextArea with the specified number of rows and
columns.
|
G9TextArea(String text)
Constructs a new TextArea with the specified text displayed.
|
G9TextArea(String text,
int rows,
int columns)
Constructs a new TextArea with the specified text and number of rows and
columns.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addValueChangedListener(G9ValueChangedListener listener)
Adds a change listener to this component.
|
void |
display(Object value)
Updates the displayed value of the component, without
affecting the state of the component.
|
protected void |
fireG9ValueChangedEvent(int id,
Object oldValue,
Object newValue)
Fires a g9 value changed event.
|
String |
format() |
Object |
getInitialValue()
Returns the initial displayed value.
|
Object |
getValue() |
boolean |
isChanged()
Checks if the currently displayed value is the same as the initial
value.
|
boolean |
isSelectAllOnFocus()
If the selectAllOnFocus property is
true the displayed text
is selected each time this component gains focus. |
Object |
parse(Object o)
Parses the object
|
Object |
parse(String formattedString)
Returns a value object.
|
void |
resetState()
Forces the currently displayed value to be considered the old value.
|
void |
setEditable(boolean editable) |
void |
setEnabled(boolean enable) |
void |
setInitialValue(Object value)
Sets the initial value to be the specified value.
|
void |
setSelectAllOnFocus(boolean selectAllOnFocus)
If the selectAllOnFocus property is
true the displayed text
is selected each time this component gains focus. |
void |
setText(String t) |
void |
setValue(Object value) |
void |
setVisible(boolean show) |
append, createDefaultModel, getAccessibleContext, getColumns, getColumnWidth, getLineCount, getLineEndOffset, getLineOfOffset, getLineStartOffset, getLineWrap, getPreferredScrollableViewportSize, getPreferredSize, getRowHeight, getRows, getScrollableTracksViewportWidth, getScrollableUnitIncrement, getTabSize, getUIClassID, getWrapStyleWord, insert, paramString, replaceRange, setColumns, setFont, setLineWrap, setRows, setTabSize, setWrapStyleWordaddCaretListener, addInputMethodListener, addKeymap, copy, cut, fireCaretUpdate, getActions, getCaret, getCaretColor, getCaretListeners, getCaretPosition, getDisabledTextColor, getDocument, getDragEnabled, getDropLocation, getDropMode, getFocusAccelerator, getHighlighter, getInputMethodRequests, getKeymap, getKeymap, getMargin, getNavigationFilter, getPrintable, getScrollableBlockIncrement, getScrollableTracksViewportHeight, getSelectedText, getSelectedTextColor, getSelectionColor, getSelectionEnd, getSelectionStart, getText, getText, getToolTipText, getUI, isEditable, loadKeymap, modelToView, moveCaretPosition, paste, print, print, print, processInputMethodEvent, read, removeCaretListener, removeKeymap, removeNotify, replaceSelection, restoreComposedText, saveComposedText, select, selectAll, setCaret, setCaretColor, setCaretPosition, setComponentOrientation, setDisabledTextColor, setDocument, setDragEnabled, setDropMode, setFocusAccelerator, setHighlighter, setKeymap, setMargin, setNavigationFilter, setSelectedTextColor, setSelectionColor, setSelectionEnd, setSelectionStart, setUI, updateUI, viewToModel, writeaddAncestorListener, 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, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setFocusTraversalKeys, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, unregisterKeyboardAction, updateadd, 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, transferFocusDownCycle, validate, validateTreeaction, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, 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, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, 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, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycleprotected EventListenerList vcListeners
public G9TextArea()
public G9TextArea(int rows,
int columns)
rows - the number of rows >= 0columns - the number of columns >= 0IllegalArgumentException - if the rows or columns arguments are
negative.public G9TextArea(String text)
text - the text to be displayed, or nullpublic G9TextArea(String text, int rows, int columns)
text - the text to be displayed, or nullrows - the number of rows >= 0columns - the number of columns >= 0IllegalArgumentException - if the rows or columns arguments are
negative.public G9TextArea(Document doc)
doc - the model to usepublic G9TextArea(Document doc, String text, int rows, int columns)
doc - the model to use, or create a default one if nulltext - the text to be displayed, null if nonerows - the number of rows >= 0columns - the number of columns >= 0IllegalArgumentException - if the rows or columns arguments are
negative.public void addValueChangedListener(G9ValueChangedListener listener)
G9ValueStateaddValueChangedListener in interface G9ValueStatelistener - the listener to addprotected void fireG9ValueChangedEvent(int id,
Object oldValue,
Object newValue)
id - the type of eventoldValue - the old valuenewValue - the new valuepublic Object getValue()
getValue in interface G9FieldValuepublic void setValue(Object value)
setValue in interface G9FieldValuevalue - (missing javadoc)public String format()
format in interface G9FieldValueG9FieldValue.format()public Object parse(String formattedString)
G9FieldValueparse in interface G9FieldValueformattedString - (missing javadoc)public Object parse(Object o)
o - the object to parsepublic void resetState()
G9ValueStateresetState in interface G9ValueStatepublic boolean isChanged()
G9ValueStateisChanged in interface G9ValueStatetrue if the displayed value differs from the
initial value.public void setText(String t)
setText in class JTextComponentpublic void display(Object value)
G9ValueStatedisplay in interface G9ValueStatevalue - the new value to displaypublic Object getInitialValue()
G9ValueStategetInitialValue in interface G9ValueStatepublic void setInitialValue(Object value)
G9ValueStatesetInitialValue in interface G9ValueStatevalue - the (new) initial value.public void setEnabled(boolean enable)
setEnabled in class JComponentpublic void setEditable(boolean editable)
setEditable in class JTextComponentpublic void setVisible(boolean show)
setVisible in class JComponentpublic boolean isSelectAllOnFocus()
true the displayed text
is selected each time this component gains focus.public void setSelectAllOnFocus(boolean selectAllOnFocus)
true the displayed text
is selected each time this component gains focus.selectAllOnFocus - The selectAllOnFocus property.Copyright © 2006–2020 Esito AS. All rights reserved.