|
JHotDraw 7.0.9 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Project
A project represents a work space for a document or a set of related documents within an Application.
After a project has been initialized using init(), either method clear() must be called or method read, in order to fully initialize a Project.
FIXME - Maybe Project should be renamed to Workspace.
Method Summary | |
---|---|
void |
addPropertyChangeListener(java.beans.PropertyChangeListener l)
Adds a property change listener. |
void |
clear()
Clears the project. |
void |
dispose()
Gets rid of all the resources of the project. |
void |
execute(java.lang.Runnable worker)
Executes the specified runnable on the worker thread of the project. |
javax.swing.Action |
getAction(java.lang.String id)
Returns the action with the specified id. |
Application |
getApplication()
Gets the application to which this project belongs. |
javax.swing.JComponent |
getComponent()
Returns the visual component of the project. |
java.io.File |
getFile()
Returns the project file. |
int |
getMultipleOpenId()
Returns the multiple open id. |
javax.swing.JFileChooser |
getOpenChooser()
Gets the open file chooser for the project. |
javax.swing.JFileChooser |
getSaveChooser()
Gets the save file chooser for the project. |
boolean |
hasUnsavedChanges()
Returns true, if the project has unsaved changes. |
void |
init()
Initializes the project. |
boolean |
isEnabled()
Returns the enabled state of the project. |
boolean |
isShowing()
This is used by Application to keep track if a project is showing. |
void |
markChangesAsSaved()
Marks all changes as saved. |
void |
putAction(java.lang.String id,
javax.swing.Action action)
Puts an action with the specified id. |
void |
read(java.io.File f)
Reads the project from the specified file. |
void |
removePropertyChangeListener(java.beans.PropertyChangeListener l)
Removes a property change listener. |
void |
setApplication(Application newValue)
Sets the application of the project. |
void |
setEnabled(boolean newValue)
Sets the enabled state of the project. |
void |
setFile(java.io.File newValue)
Sets the project file. |
void |
setMultipleOpenId(int newValue)
Sets the multiple open id. |
void |
setShowing(boolean newValue)
This is used by Application to keep track if a project is showing. |
void |
write(java.io.File f)
Writes the project to the specified file. |
Method Detail |
---|
Application getApplication()
void setApplication(Application newValue)
javax.swing.JComponent getComponent()
java.io.File getFile()
void setFile(java.io.File newValue)
boolean isEnabled()
void setEnabled(boolean newValue)
void write(java.io.File f) throws java.io.IOException
java.io.IOException
void read(java.io.File f) throws java.io.IOException
java.io.IOException
void clear()
javax.swing.JFileChooser getOpenChooser()
javax.swing.JFileChooser getSaveChooser()
boolean hasUnsavedChanges()
void markChangesAsSaved()
void execute(java.lang.Runnable worker)
void init()
After a project has been initialized using init(), either method clear() must be called or method read, in order to fully initialize a Project.
void dispose()
javax.swing.Action getAction(java.lang.String id)
void putAction(java.lang.String id, javax.swing.Action action)
void addPropertyChangeListener(java.beans.PropertyChangeListener l)
void removePropertyChangeListener(java.beans.PropertyChangeListener l)
void setMultipleOpenId(int newValue)
int getMultipleOpenId()
boolean isShowing()
void setShowing(boolean newValue)
|
Copyright 1996-2007 (c) JHotDraw.org. Some rights reserved. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |