|
org.openide.text 6.9.22 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
org.openide.windows.TopComponent
org.openide.windows.CloneableTopComponent
org.openide.text.CloneableEditor
public class CloneableEditor
Cloneable top component to hold the editor kit.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.openide.windows.CloneableTopComponent |
|---|
org.openide.windows.CloneableTopComponent.Ref |
| Nested classes/interfaces inherited from class org.openide.windows.TopComponent |
|---|
org.openide.windows.TopComponent.Cloneable, org.openide.windows.TopComponent.NodeName, org.openide.windows.TopComponent.Registry |
| 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.BltBufferStrategy, Component.FlipBufferStrategy |
| Field Summary | |
|---|---|
protected JEditorPane |
pane
editor pane |
| Fields inherited from class org.openide.windows.CloneableTopComponent |
|---|
EMPTY |
| Fields inherited from class org.openide.windows.TopComponent |
|---|
CLOSE_EACH, CLOSE_LAST, PERSISTENCE_ALWAYS, PERSISTENCE_NEVER, PERSISTENCE_ONLY_OPENED |
| 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 | |
|---|---|
CloneableEditor()
For externalization of subclasses only |
|
CloneableEditor(CloneableEditorSupport support)
Creates new editor component associated with support object. |
|
| Method Summary | |
|---|---|
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 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 org.openide.windows.CloneableTopComponent |
createClonedObject()
|
void |
ensureVisible()
callback for the Pane implementation to adjust itself to the openAt() request. |
org.openide.windows.CloneableTopComponent |
getComponent()
Get the TopComponent that contains the EditorPane |
JEditorPane |
getEditorPane()
get the editor pane component represented by this wrapper. |
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()
|
SystemAction[] |
getSystemActions()
|
UndoRedo |
getUndoRedo()
The undo/redo manager of the support. |
void |
open(org.openide.windows.Workspace workspace)
Overrides superclass version. |
protected String |
preferredID()
|
void |
readExternal(ObjectInput in)
|
protected Object |
readResolve()
Resolves deserialized object. |
boolean |
requestDefaultFocus()
|
void |
requestFocus()
Transfer the focus to the editor pane. |
boolean |
requestFocusInWindow()
Transfer the focus to the editor pane. |
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. |
| Methods inherited from class org.openide.windows.CloneableTopComponent |
|---|
canClose, clone, cloneComponent, cloneTopComponent, getReference, setReference |
| Methods inherited from class org.openide.windows.TopComponent |
|---|
associateLookup, availableModes, cancelRequestAttention, close, close, closeNotify, componentDeactivated, componentHidden, getAccessibleContext, getActions, getActivatedNodes, getCloseOperation, getDisplayName, getHtmlDisplayName, getIcon, getLookup, getRegistry, isOpened, isOpened, open, openNotify, processKeyBinding, requestActive, requestAttention, requestVisible, setActivatedNodes, setCloseOperation, setDisplayName, setHtmlDisplayName, setIcon, setName, setToolTipText, toFront |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected JEditorPane pane
| Constructor Detail |
|---|
public CloneableEditor()
public CloneableEditor(CloneableEditorSupport support)
support - support that holds the document and operations above it| Method Detail |
|---|
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 org.openide.windows.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 org.openide.windows.TopComponentpublic boolean canClose()
canClose in class org.openide.windows.CloneableTopComponentprotected void componentShowing()
CloneableEditor.
componentShowing in class org.openide.windows.TopComponentprotected org.openide.windows.CloneableTopComponent createClonedObject()
createClonedObject in class org.openide.windows.CloneableTopComponentprotected void componentOpened()
EditorCookie.Observable.PROP_OPENED_PANES
property change on their own.
componentOpened in class org.openide.windows.TopComponentprotected void componentClosed()
EditorCookie.Observable.PROP_OPENED_PANES
property change on their own.
componentClosed in class org.openide.windows.CloneableTopComponentpublic void open(org.openide.windows.Workspace workspace)
open in class org.openide.windows.TopComponentprotected boolean closeLast()
closeLast in class org.openide.windows.CloneableTopComponenttrue if close succeededpublic UndoRedo getUndoRedo()
getUndoRedo in class org.openide.windows.TopComponentpublic SystemAction[] getSystemActions()
getSystemActions in class org.openide.windows.TopComponentpublic void requestFocus()
requestFocus in class org.openide.windows.TopComponentpublic boolean requestFocusInWindow()
requestFocusInWindow in class org.openide.windows.TopComponentpublic boolean requestDefaultFocus()
requestDefaultFocus in class JComponentpublic Dimension getPreferredSize()
getPreferredSize in class JComponentprotected void componentActivated()
componentActivated in class org.openide.windows.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 org.openide.windows.TopComponentpublic void writeExternal(ObjectOutput out) throws IOException
writeExternal in interface ExternalizablewriteExternal in class org.openide.windows.CloneableTopComponentIOExceptionpublic void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal in interface ExternalizablereadExternal in class org.openide.windows.CloneableTopComponentIOException
ClassNotFoundExceptionprotected Object writeReplace() throws ObjectStreamException
NotSerializableException.
writeReplace in class org.openide.windows.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 org.openide.windows.CloneableTopComponent getComponent()
CloneableEditorSupport.Pane
getComponent in interface CloneableEditorSupport.Panepublic JEditorPane getEditorPane()
CloneableEditorSupport.Pane
getEditorPane in interface CloneableEditorSupport.Panepublic void ensureVisible()
ensureVisible in interface CloneableEditorSupport.Pane
|
org.openide.text 6.9.22 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||