|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.partnersoft.codex.CodexResourceModel
com.partnersoft.codex.editors.CogModel
public class CogModel
Edits a CodexResource containing Cog XML as a Cog.
Essentially acts as a undoable wrapper around the Cog setter methods.
Copyright 2006-2007 Partner Software, Inc.
| Field Summary |
|---|
| Fields inherited from class com.partnersoft.codex.CodexResourceModel |
|---|
resource |
| Constructor Summary | |
|---|---|
CogModel(CodexResource resource)
|
|
| Method Summary | |
|---|---|
void |
addCogModelListener(CogModelListener listener)
|
CodexResource |
getCodexResource()
Should return whatever got set in setCodexResource(). |
Cog |
getCog()
Returns a copy of the cog referred to by this resource. |
java.lang.Object |
getCogAsObject()
Returns a copy of the object represented by the cog referred to by this resource. |
java.lang.String |
getModelLabel()
Used to label the model in the user interface. |
java.lang.Object |
getObject(java.lang.String path)
Returns a part of the cog using Cog.getObject(String). |
java.lang.String |
getString(java.lang.String path)
Returns a part of the cog using Cog.getString(String). |
void |
invalidateModel()
When another model calls CodexResource.touch(), the resource invalidates all other models through this method. |
void |
removeCogModelListener(CogModelListener listener)
|
void |
save(java.io.OutputStream outie)
This is the counterpart to CodexResource.touch(). |
void |
setCodexResource(CodexResource resource)
|
void |
setCog(Cog newCog)
Replaces the cog referred to by this resource with the one provided. |
void |
setCogAsObject(java.lang.Object object)
Replaces the cog referred to by this resource with the cog representation of the object provided. |
void |
setObject(java.lang.String path,
java.lang.Object newValue)
Sets a part of the cog using Cog.setObject(String, Object) and
the undo stack. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CogModel(CodexResource resource)
| Method Detail |
|---|
public void addCogModelListener(CogModelListener listener)
public CodexResource getCodexResource()
CodexResourceModel
getCodexResource in class CodexResourceModel
public java.lang.Object getCogAsObject()
throws java.io.IOException
java.io.IOException
public void setCogAsObject(java.lang.Object object)
throws java.io.IOException
java.io.IOExceptionpublic Cog getCog()
public void setCog(Cog newCog)
throws java.io.IOException
java.io.IOExceptionpublic java.lang.Object getObject(java.lang.String path)
Cog.getObject(String).
path -
public java.lang.String getString(java.lang.String path)
Cog.getString(String).
path -
public void setObject(java.lang.String path,
java.lang.Object newValue)
Cog.setObject(String, Object) and
the undo stack.
path - newValue - public java.lang.String getModelLabel()
CodexResourceModel
getModelLabel in class CodexResourceModelpublic void invalidateModel()
CodexResourceModel
invalidateModel in class CodexResourceModelpublic void removeCogModelListener(CogModelListener listener)
public void save(java.io.OutputStream outie)
throws java.io.IOException
CodexResourceModel
save in class CodexResourceModeljava.io.IOExceptionpublic void setCodexResource(CodexResource resource)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||