public class IlvTextView extends IlvPanelView
JPanel.AccessibleJPanel
JComponent.AccessibleJComponent
Container.AccessibleAWTContainer
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
Modifier and Type | Field and Description |
---|---|
static String |
COPY_COMMAND
Action command key for transferring the currently selected text in the
text view to the system clipboard.
|
static String |
CUT_COMMAND
Action command key for transferring the currently selected text in the
text view to the system clipboard and removing the selected text from the
view.
|
static String |
PASTE_COMMAND
Action command key for pasting the contents of the system clipboard into the
text view.
|
static String |
SELECT_ALL_COMMAND
Action command key for selecting all the text in the text view.
|
DEFAULT_SETTINGS_NAME, DEFAULT_SETTINGS_TYPE
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
ACTIVE_PROPERTY, ACTIVE_VIEW_NAME, APPLICATION_PROPERTY, CLOSABLE_PROPERTY, CLOSING_VIEW_MSG, DOCUMENT_PROPERTY, SETTINGS_ELEMENT_PROPERTY, STATIC_VIEW_PROPERTY, VIEW_CONTAINER_PROPERTY
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor and Description |
---|
IlvTextView()
Constructs a new
IlvTextView . |
Modifier and Type | Method and Description |
---|---|
void |
actionPerformed(ActionEvent e)
Invoked when receiving action events.
|
protected void |
addEditorPane(JEditorPane editorPane)
Adds the specified
editorPane to the panel view. |
protected JEditorPane |
createEditorPane()
Factory method for creating the editor pane.
|
protected Document |
getTextDocument()
Returns the text document displayed by the text view.
|
protected void |
initializeEditorPane(JEditorPane editorPane)
Invoked after a new editor pane has been created and added to the
panel view to initialize it.
|
void |
initializeView(IlvDocument document)
Initializes the text view with the specified document.
|
boolean |
isProcessingAction(String command)
Determines whether the text view is able to process the action
with the specified
command key in its
actionPerformed(java.awt.event.ActionEvent) method. |
boolean |
updateAction(Action action)
Invoked by the application to update the state of the specified
action . |
addActionHandler, close, getApplication, getDocument, getProperty, getSettings, getSettingsElement, getSettingsName, getSettingsQuery, getSettingsType, getViewContainer, isStaticView, readSettings, receiveMessage, registerMappings, removeActionHandler, setApplication, setDocument, setProperty, setSettings, setSettingsElement, setSettingsName, setSettingsQuery, setViewContainer, viewClosed, viewClosing, writeSettings
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
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, 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, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
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, transferFocusDownCycle, validate, validateTree
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, 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, transferFocusBackward, transferFocusUpCycle
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addPropertyChangeListener, removePropertyChangeListener
public static final String PASTE_COMMAND
public static final String CUT_COMMAND
public static final String COPY_COMMAND
public static final String SELECT_ALL_COMMAND
public void initializeView(IlvDocument document)
IlvTextDocument.getTextDocument()
.initializeView
in interface IlvDocumentView
initializeView
in class IlvPanelView
document
- The document to initialize the content of the view with.protected Document getTextDocument()
protected void addEditorPane(JEditorPane editorPane)
editorPane
to the panel view.
By default, a border layout is set to the panel view, a
scroll pane is add to the
panel with the BorderLayout.CENTER
constraint, and the
editor pane is added to the scroll pane if appropriate.protected JEditorPane createEditorPane()
protected void initializeEditorPane(JEditorPane editorPane)
editorPane
to synchronize the updating of the actions Cut
or Copy
and Paste
with the text selection changes.public boolean isProcessingAction(String command)
command
key in its
actionPerformed(java.awt.event.ActionEvent)
method.
By default, the text view processes the action with the following
command keys:CUT_COMMAND
for cutting the current selected text in the text view.COPY_COMMAND
for copying the current selected text in the text view.PASTE_COMMAND
for pasting the current content of the clipboard in the text view.SELECT_ALL_COMMAND
for selecting all the text in the text view.isProcessingAction
in interface ActionHandler
isProcessingAction
in class IlvPanelView
command
- The command key of the action.true
if the action listener performs the specified
action; false
otherwise.public boolean updateAction(Action action)
action
.
By default, the text view updates the state of the action with the following
command keys:CUT_COMMAND
for cutting the current selected text in the text view.COPY_COMMAND
for copying the current selected text in the text view.PASTE_COMMAND
for pasting the current content of the clipboard into the text view.updateAction
in interface ActionHandler
updateAction
in class IlvPanelView
action
- The action to update.true
if the action handler has updated the state
of the action; false
otherwise.public void actionPerformed(ActionEvent e)
CUT_COMMAND
for cutting the current selected text in the text view.COPY_COMMAND
for copying the current selected text in the text view.PASTE_COMMAND
for pasting the current content of the clipboard into the text view.SELECT_ALL_COMMAND
for selecting all the text in the text view.actionPerformed
in interface ActionListener
actionPerformed
in class IlvPanelView
e
- The action event.© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.