LEONARDI Application Composer - 8.9.0.40 by W4 S.A.

leon.view.win.swing.component
Class LyJTextArea

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.text.JTextComponent
                  extended by javax.swing.JTextArea
                      extended by leon.view.win.swing.component.LyJTextArea
All Implemented Interfaces:
java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible, javax.swing.Scrollable

public class LyJTextArea
extends javax.swing.JTextArea

This class manages a text area with a popup menu.

See Also:
Serialized Form

Nested Class Summary
 class LyJTextArea._LyPopupInvoker
          Defines the mouse event listeners for this popup menu.
 
Nested classes/interfaces inherited from class javax.swing.text.JTextComponent
javax.swing.text.JTextComponent.AccessibleJTextComponent, javax.swing.text.JTextComponent.DropLocation, javax.swing.text.JTextComponent.KeyBinding
 
Nested classes/interfaces inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.BaselineResizeBehavior
 
Field Summary
static java.lang.String __VERSION
           
static java.lang.String CANCEL
          The cancel string.
static java.lang.String COPY
          The copy string.
static java.lang.String CUT
          The cut string.
static java.lang.String DELETE
          The delete string.
static java.lang.String PASTE
          The paste string.
static java.lang.String SELECT_ALL
          The select all string.
 
Fields inherited from class javax.swing.text.JTextComponent
DEFAULT_KEYMAP, FOCUS_ACCELERATOR_KEY
 
Fields inherited from class javax.swing.JComponent
TOOL_TIP_TEXT_KEY, 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
LyJTextArea(javax.swing.text.Document doc, java.lang.String text, int rows, int columns, LyEnvironment env)
          Creates a text area with the specified attributes.
LyJTextArea(int rows, int columns, LyEnvironment env)
          Creates a text area with the specified attributes.
LyJTextArea(LyEnvironment env)
          Creates a default text area with an empty text area.
LyJTextArea(java.lang.String text, int rows, int columns, LyEnvironment env)
          Creates a text area with the specified attributes.
LyJTextArea(java.lang.String text, LyEnvironment env)
          Creates a text area with the specified attributes.
 
Method Summary
 javax.swing.JPopupMenu createPopupMenu()
          Creates the editing popup menu and initializes its actions.
 void delete()
          Executes the delete action on the selected text.
 javax.swing.JPopupMenu getMenu()
          Gets the popup menu of this text area.
 void init(LyEnvironment env)
          Initializes this component and its attributes in the specified environment.
 void paste()
          Executes the paste action if this text area is editable.
 void showMenu(java.awt.Component comp, int x, int y)
          Shows the popup menu at the specified (x,y) position in the specified component.
 void superPaste()
          Call the paste method of the super class.
 void undo()
          Nothing is done for the undo action.
 
Methods inherited from class javax.swing.JTextArea
append, getAccessibleContext, getColumns, getLineCount, getLineEndOffset, getLineOfOffset, getLineStartOffset, getLineWrap, getPreferredScrollableViewportSize, getPreferredSize, getRows, getScrollableTracksViewportWidth, getScrollableUnitIncrement, getTabSize, getUIClassID, getWrapStyleWord, insert, replaceRange, setColumns, setFont, setLineWrap, setRows, setTabSize, setWrapStyleWord
 
Methods inherited from class javax.swing.text.JTextComponent
addCaretListener, addInputMethodListener, addKeymap, copy, cut, 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, print, print, print, read, removeCaretListener, removeKeymap, removeNotify, replaceSelection, select, selectAll, setCaret, setCaretColor, setCaretPosition, setComponentOrientation, setDisabledTextColor, setDocument, setDragEnabled, setDropMode, setEditable, setFocusAccelerator, setHighlighter, setKeymap, setMargin, setNavigationFilter, setSelectedTextColor, setSelectionColor, setSelectionEnd, setSelectionStart, setText, setUI, updateUI, viewToModel, write
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, 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, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintImmediately, paintImmediately, print, printAll, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, 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, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, createImage, createImage, createVolatileImage, createVolatileImage, dispatchEvent, enable, enableInputMethods, 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, 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, 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, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

__VERSION

public static final java.lang.String __VERSION
See Also:
Constant Field Values

CANCEL

public static java.lang.String CANCEL
The cancel string.


CUT

public static java.lang.String CUT
The cut string.


COPY

public static java.lang.String COPY
The copy string.


PASTE

public static java.lang.String PASTE
The paste string.


DELETE

public static java.lang.String DELETE
The delete string.


SELECT_ALL

public static java.lang.String SELECT_ALL
The select all string.

Constructor Detail

LyJTextArea

public LyJTextArea(LyEnvironment env)
Creates a default text area with an empty text area.

Parameters:
env - the current environment to access the resources

LyJTextArea

public LyJTextArea(javax.swing.text.Document doc,
                   java.lang.String text,
                   int rows,
                   int columns,
                   LyEnvironment env)
Creates a text area with the specified attributes.

Parameters:
doc - the document model that rules input
text - the initial text of the text field
rows - the number of rows of this text field
columns - the number of columns of this text field
env - the current environment to access the resources

LyJTextArea

public LyJTextArea(int rows,
                   int columns,
                   LyEnvironment env)
Creates a text area with the specified attributes. By default, the text area is empty and the default document model is used.

Parameters:
rows - the number of rows of this text field
columns - the number of columns of this text field
env - the current environment to access the resources

LyJTextArea

public LyJTextArea(java.lang.String text,
                   LyEnvironment env)
Creates a text area with the specified attributes. By default, the default document model is used and the number of rows and columns is 0.

Parameters:
text - the initial text of the text field
env - the current environment to access the resources

LyJTextArea

public LyJTextArea(java.lang.String text,
                   int rows,
                   int columns,
                   LyEnvironment env)
Creates a text area with the specified attributes. The default document model is used.

Parameters:
text - the initial text of the text field
rows - the number of rows of this text field
columns - the number of columns of this text field
env - the current environment to access the resources
Method Detail

init

public void init(LyEnvironment env)
Initializes this component and its attributes in the specified environment.

Parameters:
env - the current environment

paste

public void paste()
Executes the paste action if this text area is editable.

Overrides:
paste in class javax.swing.text.JTextComponent
See Also:
JTextComponent.paste()

superPaste

public void superPaste()
Call the paste method of the super class.


delete

public void delete()
Executes the delete action on the selected text.


undo

public void undo()
Nothing is done for the undo action.


createPopupMenu

public javax.swing.JPopupMenu createPopupMenu()
Creates the editing popup menu and initializes its actions.

Returns:
the popup menu of this text area

getMenu

public javax.swing.JPopupMenu getMenu()
Gets the popup menu of this text area.

Returns:
the popup menu

showMenu

public void showMenu(java.awt.Component comp,
                     int x,
                     int y)
Shows the popup menu at the specified (x,y) position in the specified component.

Parameters:
comp - the invoking component
x - the x-coordinate to show the popup menu
y - the y-coordinate to show the popup menu

(c) January 2013 - W4 S.A.

Website: W4 S.A., contact us: support@w4global.com