public class CloneableEditor extends CloneableTopComponent implements CloneableEditorSupport.Pane
CloneableTopComponent.RefTopComponent.Cloneable, TopComponent.Description, TopComponent.NodeName, TopComponent.OpenActionRegistration, TopComponent.Registration, TopComponent.Registry, TopComponent.SubComponentJComponent.AccessibleJComponentContainer.AccessibleAWTContainerComponent.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy| Modifier and Type | Field and Description |
|---|---|
protected JEditorPane |
pane
editor pane
|
EMPTYCLOSE_EACH, CLOSE_LAST, PERSISTENCE_ALWAYS, PERSISTENCE_NEVER, PERSISTENCE_ONLY_OPENED, PROP_CLOSING_DISABLED, PROP_DND_COPY_DISABLED, PROP_DRAGGING_DISABLED, PROP_KEEP_PREFERRED_SIZE_WHEN_SLIDED_IN, PROP_MAXIMIZATION_DISABLED, PROP_SLIDING_DISABLED, PROP_UNDOCKING_DISABLEDlistenerList, 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 |
|---|
CloneableEditor()
For externalization of subclasses only
|
CloneableEditor(CloneableEditorSupport support)
Creates new editor component associated with
support object.
|
CloneableEditor(CloneableEditorSupport support,
boolean associateLookup)
Creates new editor component associated with
support object (possibly also with its
lookup. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canClose()
Indicates whether this component can be closed.
|
protected CloneableEditorSupport |
cloneableEditorSupport()
Gives access to
CloneableEditorSupport object under
this CloneableEditor component. |
protected boolean |
closeLast()
When closing last view, also close the document.
|
protected boolean |
closeLast(boolean ask)
Utility method to close the document.
|
protected void |
componentActivated()
Overrides superclass method.
|
protected void |
componentClosed()
Descendants overriding this method must either call
this implementation or fire the
EditorCookie.Observable.PROP_OPENED_PANES
property change on their own. |
protected void |
componentOpened()
Descendants overriding this method must either call
this implementation or fire the
EditorCookie.Observable.PROP_OPENED_PANES
property change on their own. |
protected void |
componentShowing()
Overrides superclass method.
|
protected CloneableTopComponent |
createClonedObject() |
void |
ensureVisible()
callback for the Pane implementation to adjust itself to the openAt() request.
|
Action[] |
getActions() |
CloneableTopComponent |
getComponent()
Get the TopComponent that contains the EditorPane
|
JEditorPane |
getEditorPane()
Returns editor pane.
|
HelpCtx |
getHelpCtx()
Get context help for this editor pane.
|
int |
getPersistenceType()
Overriden to explicitely set persistence type of CloneableEditor
to PERSISTENCE_ONLY_OPENED
|
Dimension |
getPreferredSize() |
UndoRedo |
getUndoRedo()
The undo/redo manager of the support.
|
protected void |
initializeBySupport()
Asks the associated
CloneableEditorSupport to initialize
this editor via its CloneableEditorSupport.initializeCloneableEditor(org.openide.text.CloneableEditor)
method. |
void |
open() |
protected String |
preferredID() |
void |
readExternal(ObjectInput in) |
protected Object |
readResolve()
Resolves deserialized object.
|
boolean |
requestDefaultFocus()
Deprecated.
|
void |
requestFocus()
Deprecated.
|
boolean |
requestFocusInWindow()
Deprecated.
|
void |
updateName()
Updates the name and tooltip of this
CloneableEditor
TopCompoenent
according to the support retrieved from cloneableEditorSupport()
method. |
void |
writeExternal(ObjectOutput out) |
protected Object |
writeReplace()
Replaces serializing object.
|
canClose, clone, cloneComponent, cloneTopComponent, getReference, setReferenceaddNotify, associateLookup, availableModes, cancelRequestAttention, close, close, closeNotify, componentDeactivated, componentHidden, getAccessibleContext, getActivatedNodes, getCloseOperation, getDisplayName, getHtmlDisplayName, getIcon, getLookup, getRegistry, getShortName, getSubComponents, getSystemActions, getTabPosition, isOpened, isOpened, makeBusy, open, openAction, openAtTabPosition, openNotify, processKeyBinding, requestActive, requestAttention, requestVisible, setActivatedNodes, setAttentionHighlight, setCloseOperation, setDisplayName, setHtmlDisplayName, setIcon, setName, setToolTipText, toFrontaddAncestorListener, 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, getToolTipText, getTopLevelAncestor, getTransferHandler, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, paramString, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestFocus, 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, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update, updateUIadd, 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, 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, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycleprotected JEditorPane pane
public CloneableEditor()
public CloneableEditor(CloneableEditorSupport support)
support - support that holds the document and operations above itpublic CloneableEditor(CloneableEditorSupport support, boolean associateLookup)
lookup.support - support that holds the document and operations above itassociateLookup - true, if TopComponent.getLookup() should return the lookup
associated with CloneableEditorSupport.protected CloneableEditorSupport cloneableEditorSupport()
CloneableEditorSupport object under
this CloneableEditor component.CloneableEditorSupport object
that holds the document or null, what means
this component is not in valid state yet and can be discardedpublic int getPersistenceType()
getPersistenceType in class TopComponentpublic HelpCtx getHelpCtx()
HelpCtx.findHelp(java.awt.Component),
then that it used, else general help on the editor is provided.getHelpCtx in interface HelpCtx.ProvidergetHelpCtx in class TopComponentpublic boolean canClose()
canClose in class CloneableTopComponentprotected void componentShowing()
CloneableEditor.componentShowing in class TopComponentprotected final void initializeBySupport()
CloneableEditorSupport to initialize
this editor via its CloneableEditorSupport.initializeCloneableEditor(org.openide.text.CloneableEditor)
method. By default called from the support on various occasions including
shortly after creation and
after the CloneableEditor has been deserialized.protected CloneableTopComponent createClonedObject()
createClonedObject in class CloneableTopComponentprotected void componentOpened()
EditorCookie.Observable.PROP_OPENED_PANES
property change on their own.componentOpened in class CloneableTopComponentprotected void componentClosed()
EditorCookie.Observable.PROP_OPENED_PANES
property change on their own.componentClosed in class CloneableTopComponentprotected boolean closeLast()
closeLast(true).closeLast in class CloneableTopComponenttrue if close succeededprotected final boolean closeLast(boolean ask)
ask - verify and ask the user whether a document can be closed or not?public UndoRedo getUndoRedo()
getUndoRedo in class TopComponentpublic Action[] getActions()
getActions in class TopComponent@Deprecated public void requestFocus()
requestFocus in class TopComponent@Deprecated public boolean requestFocusInWindow()
requestFocusInWindow in class TopComponent@Deprecated public boolean requestDefaultFocus()
requestDefaultFocus in class JComponentpublic Dimension getPreferredSize()
getPreferredSize in class JComponentpublic void open()
open in class TopComponentprotected void componentActivated()
CloneableEditorSupport.getRecentPane and
CloneableEditorSupport.getOpenedPanes will be broken.componentActivated in class TopComponentTopComponent.componentDeactivated()public void updateName()
CloneableEditor
TopCompoenent
according to the support retrieved from cloneableEditorSupport()
method. The name and tooltip are in case of support presence
updated thru its CloneableEditorSupport.messageName() and
CloneableEditorSupport.messageToolTip() methods.updateName in interface CloneableEditorSupport.PanecloneableEditorSupport()protected String preferredID()
preferredID in class TopComponentpublic void writeExternal(ObjectOutput out) throws IOException
writeExternal in interface ExternalizablewriteExternal in class CloneableTopComponentIOExceptionpublic void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal in interface ExternalizablereadExternal in class CloneableTopComponentIOExceptionClassNotFoundExceptionprotected Object writeReplace() throws ObjectStreamException
NotSerializableException.writeReplace in class TopComponentObjectStreamException - When problem during serialization occures.NotSerializableException - When this CloneableEditor
is invalid and doesn't want to be serialized.protected Object readResolve() throws ObjectStreamException
InvalidObjectException.ObjecStreamException - When problem during serialization occures.InvalidObjectException - When deserialized CloneableEditor
is invalid and shouldn't be used.ObjectStreamExceptionpublic CloneableTopComponent getComponent()
CloneableEditorSupport.PanegetComponent in interface CloneableEditorSupport.Panepublic JEditorPane getEditorPane()
getEditorPane in interface CloneableEditorSupport.Panepublic void ensureVisible()
ensureVisible in interface CloneableEditorSupport.PaneBuilt on February 21 2018. | Portions Copyright 1997-2018 Oracle. All rights reserved.