|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.tensegrity.palowebviewer.modules.ui.client.AbstractXObjectEditor
public abstract class AbstractXObjectEditor
Abstract implementation for IXObjectEditor
interface.
It provides support for listeners, event firing and actions.
Field Summary | |
---|---|
protected IAction |
saveAction
Save action object. |
protected IAction |
saveAsAction
"Save As" action object. |
Constructor Summary | |
---|---|
AbstractXObjectEditor(IEngine engine,
XObject object)
|
Method Summary | |
---|---|
void |
addEditorListener(IEditorListener listener)
Add listener for the editor. |
void |
close(IEditorCloseCallback callback)
|
void |
dispose()
Dispose editor (Unsubscribe all listeners) |
protected abstract void |
doSave(IEditorSaveCallback callback)
Call to this method is redirected from saveAction . |
protected abstract void |
doSaveAs(IEditorSaveCallback callback)
Call to this method is redirected from saveAsAction . |
protected abstract void |
doSaveModified(IEditorSaveCallback callback)
|
protected void |
fireModified()
Notifies editor listeners that editor now has unsaved changes. |
protected void |
fireObjectRenamed()
|
protected void |
fireSourceChanged()
Notifies editor listeners that edited object has been changed. |
protected void |
fireUnmodified()
Notifies editor listeners that editor now has no unsaved changes. |
IEngine |
getEngine()
|
IPaloServerModel |
getPaloServerModel()
Returns link to palo server model for the idited XObject . |
IAction |
getSaveAction()
Returns save action for this editor. |
IAction |
getSaveAsAction()
Returns "save as " action for this editor. |
XObject |
getXObject()
Returns XObject for the editor. |
protected abstract boolean |
hasChanged(XObject[] path,
XObject[] oldChildren,
int type)
|
boolean |
isInitialized()
|
boolean |
isModified()
Tells if there is any unsaved modifications. |
protected abstract boolean |
isObjectPart(XObject object)
|
protected void |
onSourceChanged()
|
void |
removeEditorListener(IEditorListener listener)
Remove editor listener. |
protected void |
setModified(boolean modified)
Marks the editor as modified or unmodified. |
protected void |
setObject(XObject object)
Set XObject to edit. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.tensegrity.palowebviewer.modules.ui.client.IXObjectEditor |
---|
getTitle |
Field Detail |
---|
protected final IAction saveAction
IAction.onActionPerformed(java.lang.Object)
is delegated to doSave(com.tensegrity.palowebviewer.modules.engine.client.IEditorSaveCallback)
method.
protected final IAction saveAsAction
IAction.onActionPerformed(java.lang.Object)
is delegated to doSaveAs(com.tensegrity.palowebviewer.modules.engine.client.IEditorSaveCallback)
method.
Constructor Detail |
---|
public AbstractXObjectEditor(IEngine engine, XObject object)
Method Detail |
---|
public boolean isInitialized()
protected abstract boolean isObjectPart(XObject object)
protected void onSourceChanged()
protected abstract boolean hasChanged(XObject[] path, XObject[] oldChildren, int type)
public IPaloServerModel getPaloServerModel()
palo server model
for the idited XObject
.
public IEngine getEngine()
public IAction getSaveAction()
getSaveAction
in interface IXObjectEditor
public IAction getSaveAsAction()
getSaveAsAction
in interface IXObjectEditor
public boolean isModified()
isModified
in interface IXObjectEditor
public XObject getXObject()
getXObject
in interface IXObjectEditor
public void addEditorListener(IEditorListener listener)
addEditorListener
in interface IXObjectEditor
public void removeEditorListener(IEditorListener listener)
removeEditorListener
in interface IXObjectEditor
protected void setModified(boolean modified)
modified
- - state to set;
If modified
is true then state changed to modified and saveAction
is enabled.
Else state changed to unmodified and saveAction
is disabled.
Listeners are notified about the event.protected abstract void doSave(IEditorSaveCallback callback)
saveAction
.
protected abstract void doSaveAs(IEditorSaveCallback callback)
saveAsAction
.
protected void setObject(XObject object)
XObject
to edit.
object
- - object to set.protected void fireModified()
protected void fireUnmodified()
protected void fireSourceChanged()
protected void fireObjectRenamed()
public void dispose()
IXObjectEditor
dispose
in interface IXObjectEditor
public void close(IEditorCloseCallback callback)
close
in interface IXObjectEditor
protected abstract void doSaveModified(IEditorSaveCallback callback)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |