| 
 | Oracle Fusion Middleware Java API Reference for Oracle Extension SDK 11g Release 2 (11.1.2.4.0) E17493-05 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectoracle.ide.view.View
oracle.ide.editor.Editor
oracle.ide.editor.AsynchronousEditor
public abstract class AsynchronousEditor
Base editor template for editors that load the UI model on a thread off the event dispatch thread.
| Field Summary | 
|---|
| Fields inherited from class oracle.ide.view.View | 
|---|
| EMPTY_SELECTION, PROJECT_PROP, VISIBLE_PROP, WORKSPACE_PROP | 
| Constructor Summary | |
|---|---|
| AsynchronousEditor()Creates a new . | |
| Method Summary | |
|---|---|
|  void | activate()Called when this editor is the active view. | 
| protected  void | activateImpl(boolean contentAvailable)Called when this editor is the active view. | 
| protected  boolean | asyncModeEnabled()Indicates whether this editor supports asynchronous loading of its contents. | 
|  void | close()Closes this editor. | 
| protected  void | closeImpl(boolean contentAvailable)Closes this editor. | 
| protected  void | contextAvailable()Indicates that the context has been set in this editor, after the UI model has been loaded in a worker thread. | 
| protected  java.awt.Component | createEditorNotInitializedGUI()Component to be put in the center of the editor while the UI model is being created (e.g. | 
| protected  java.lang.Runnable | createUIModelGetterTask(Context newContext)Creates the task that will load the UI model off the event thread. | 
|  void | deactivate()Cleans up after this editor stops being the active view. | 
| protected  void | deactivateImpl(boolean contentAvailable)Cleans up after this editor stops being the active view. | 
| protected  Context | delayContextSet(Context newContext)Sets the Context, whose UI should be used only after its UI model 
 becomes available. | 
| protected abstract  void | doSetContext(Context context)This is where the context gets actually applied to the editor. | 
|  void | editorHidden()This method is called when an editor is hidden. | 
| protected  void | editorReady()Called when this editor's UI is ready to be displayed. | 
|  void | editorShown()Called when this editor is made visible. | 
| protected abstract  void | getEditorContent(Context newContext)This is the action where loading the UI model takes place. | 
| protected  java.awt.Component | getEditorNotInitializedGUI()Returns the UI to be displayed while the editor's UI model is being loaded off the event dispatch thread (in a separate worker thread.) | 
| protected  java.lang.String | getEditorNotInitializedMessage() | 
|  java.awt.Component | getGUI()Returns the editor's UI if: the editor is not in asynchronous mode the editor is in asynchronous mode, but it finish loading the UI model off the event dispatch thread otherwise it will return the UI to be shown while the UI model is being loaded. | 
| protected abstract  java.awt.Component | getGUIComponent()Returns this editor's UI component. | 
| protected  void | hiddenImpl(boolean contentAvailable)This method is called when an editor is hidden. | 
| static void | invokeLaterAfterRepaint(java.lang.Runnable runnable)Invokes the given task in the Event Dispatch Thread. | 
| protected  boolean | isActivated()Indicates whether this editor is the active view. | 
| protected abstract  boolean | isContentModelLoaded()Indicates whether the model for this editor's UI has been already loaded. | 
| protected  boolean | isOpened()Indicates whether this editor is open. | 
| protected  boolean | isShown()Indicates whether this editor is shown. | 
|  void | open()Delegates opening this editor to if this editor has not been previously opened. | 
| protected abstract  void | openImpl(boolean contentAvailable)Opens this editor, if it wasn't previously opened. | 
| protected  void | scheduleTask(ProgressTrackedTask task,
             Context context)Schedules the given task in the IDE's ProgressTracker. | 
|  void | setContext(Context newContext)Sets the current for this editor. | 
| protected  void | setDelayedContext(Context newContext)Updates this editor with the given context. | 
| protected  void | shownImpl(boolean contentAvailable)Called when this editor is made visible. | 
| protected  void | switchEditorGUI(java.awt.Component newEditorGUI)Replaces current component shown by this editor with the given one. | 
| protected  void | switchEditorGuiInUiThread(java.awt.Component newEditorGUI)Calls making sure the call is made
 in the UI thread (EDT.) | 
|  void | update(java.lang.Object observed,
       UpdateMessage change)Notification message. | 
| protected  void | updateContextImpl(Context context)Called when the IDE context is ready to be used by the editor. | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait | 
| Constructor Detail | 
|---|
public AsynchronousEditor()
AsynchronousEditor
| Method Detail | 
|---|
public final void setContext(Context newContext)
ContextIf this editor is working in asynchronous mode, the model for this editor's UI will not be loaded inmediately. Instead, it will be loaded in a separate worker thread. This editor's UI will be displayed once the model has been loaded.
setContext in class EditornewContext - the new Context to set.protected Context delayContextSet(Context newContext)
Context, whose UI should be used only after its UI model 
 becomes available.
newContext - the new Context to set.newContext - the new Context to set.protected boolean asyncModeEnabled()
true by default. Subclasses can opt out by overriding 
 this method to return false.public final void open()
openImpl(boolean)
open in class EditoropenImpl(boolean)public final void editorShown()
shownImpl(boolean)
editorShown in class EditorshownImpl(boolean)public final void activate()
activateImpl(boolean)
activate in class ViewactivateImpl(boolean)public final void deactivate()
{@link #deactivateImpl(boolean).
deactivate in class ViewdeactivateImpl(boolean)public final void editorHidden()
hiddenImpl(boolean)
editorHidden in class EditorhiddenImpl(boolean)public final void close()
closeImpl(boolean)
close in class EditorcloseImpl(boolean)protected abstract boolean isContentModelLoaded()
true if the model has been loaded; false
 otherwise.public final java.awt.Component getGUI()
getGUI in class Viewprotected abstract java.awt.Component getGUIComponent()
null if this editor's UI is not ready yet (e.g. the model is 
 still being loaded in a worker thread.)
null if the UI is not
 ready yet.protected final java.awt.Component getEditorNotInitializedGUI()
protected java.lang.Runnable createUIModelGetterTask(Context newContext)
newContext - the IDE Context.
protected abstract void getEditorContent(Context newContext)
createUIModelGetterTask(Context)protected final void setDelayedContext(Context newContext)
setContext(Context)
newContext - the Context to set.protected void updateContextImpl(Context context)
setContext. Otherwise it is called after the UI model becomes 
 available.
context - the Context to set.protected abstract void doSetContext(Context context)
setContext in non-asynchronous editors.
context - the Context to set.protected void contextAvailable()
protected final boolean isOpened()
true if this editor is open; false
 otherwise.protected final boolean isActivated()
true if this editor is the active view;
 false otherwise.protected final boolean isShown()
true if this editor is shown; false
 otherwise.protected void editorReady()
protected final void switchEditorGuiInUiThread(java.awt.Component newEditorGUI)
switchEditorGUI(java.awt.Component)
newEditorGUI - the new editor UI.protected void switchEditorGUI(java.awt.Component newEditorGUI)
editorReady()
 This method will be called by AsynchronousEditor automatically. Subclasses 
 should not call this method directly, unless they need to handle very
 special use cases. If you need to call this method, please
 check that it is done in the UI thread. It is recommended to call
 switchEditorGuiInUiThread(java.awt.Component) instead.
 
newEditorGUI - the new editor UI.   *
protected void scheduleTask(ProgressTrackedTask task,
                            Context context)
ProgressTracker.
task - the task to schedule.context - the current context.public static void invokeLaterAfterRepaint(java.lang.Runnable runnable)
runnable - the given task.protected java.awt.Component createEditorNotInitializedGUI()
JLabel with text "Loading Editor".)
protected java.lang.String getEditorNotInitializedMessage()
public void update(java.lang.Object observed,
                   UpdateMessage change)
Observer
observed - the subject whose state has changed.change - what has changed.Observer.update(Object, UpdateMessage)protected abstract void openImpl(boolean contentAvailable)
contentAvailable - indicates whether the model of this editor's UI
 has been already loaded or not.protected void closeImpl(boolean contentAvailable)
contentAvailable - indicates whether the model of this editor's UI
 has been already loaded or not.protected void shownImpl(boolean contentAvailable)
contentAvailable - indicates whether the model of this editor's UI
 has been already loaded or not.protected void hiddenImpl(boolean contentAvailable)
contentAvailable - indicates whether the model of this editor's UI
 has been already loaded or not.protected void activateImpl(boolean contentAvailable)
contentAvailable - indicates whether the model of this editor's UI
 has been already loaded or not.protected void deactivateImpl(boolean contentAvailable)
contentAvailable - indicates whether the model of this editor's UI
 has been already loaded or not.| 
 | Oracle Fusion Middleware Java API Reference for Oracle Extension SDK 11g Release 2 (11.1.2.4.0) E17493-05 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||