java.lang.Object
de.grogra.pf.ui.Workbench
- All Implemented Interfaces:
RegistryContext,Context,ClipboardOwner
- Direct Known Subclasses:
ProjectWorkbench
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected UIApplicationstatic final Commandstatic final Stringstatic final Stringstatic final Levelstatic final Stringstatic final String[]static final StringTODO: the PROJECT_DIRECTORY is not a robust way to get the project directory.static final Levelstatic final Stringstatic final Stringstatic final Timer -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidstatic voidaddToLastUsed(Workbench wb, File file) voidbeginStatus(Object owner) chooseFileToSave(String title, IOFlavor flavor, FileTypeItem.Filter selectedfilter) voidstatic voidclearGraph(Item item, Object info, Context ctx) Fully clear the graph and reset the root nodevoidclearProgress(Object owner) voidclearStatusAndProgress(Object owner) protected abstract voidstatic voidabstract Stringstatic Workbenchcurrent()static Workbenchcurrent(ThreadContext tc) static voidstatic voidvoidvoidexport(FilterSource src) voidexport(FilterSource src, MimeType mt, File file) static Workbenchget(RegistryContext ctx) getChartPanel(String chart, Map params) final ObjectDetermines the GUI component of this GUI context.getFile()The file is the project local file ( xx.gs, or xx.gsz).final JobManagerfinal Loggerabstract WorkbenchgetName()final PanelgetPanel()Determines the panel of this GUI context.getProperty(String key) protected voidfinal UIToolkitfinal WorkbenchDetermines the workbench of this GUI context.voidvoidIt is done by the job manager when the workbench is startedprotected voidvoidstatic booleanisCopyEnabled(Context ctx) static booleanisCutEnabled(Context ctx) static booleanisDeleteEnabled(Context ctx) booleanfinal booleanstatic booleanisRedoEnabled(Context ctx) abstract booleanreturn true if the workbench is currently selectedstatic booleanisUndoEnabled(Context ctx) booleanstatic voidvoidlogGUIInfo(String msg) voidlogGUIInfo(String msg, Throwable thrown) voidvoidvoidabstract Workbenchopen(FilterSource fs, Map initParams) static voidabstract voidstatic voidopenAsDemo(Item item, Object info, Context ctx) voidopenAsDemo(Object info) static voidopenRecent(Item item, Object info, Context ctx) voidopenRecent(Object info) static voidreadObject(FilterSource src, IOFlavor flavor) readObject(FileChooserResult src, IOFlavor flavor) voidredo()"Undo" the last undo.static voidstatic voidrefreshJEdit(Workbench wb, String fileName) Refreshes JEdit for the file fielName.static voidrefreshJEdit(String fileName) Refreshes JEdit for the file fielName.static voidrefreshLastUsed(Registry r, Workbench mwb) voidvoidbooleansave(boolean allowSaveAs) static voidbooleanstatic voidbooleanvoidstatic voidvoidprotected voidsetIgnoreIfModified(boolean i) voidsetIndeterminateProgress(Object owner) final voidvoidsetModified(boolean modified) voidvoidsetProgress(Object owner, float progress) voidsetProperty(String key, Object value) voidvoidvoidsetStatusClearProgress(Object owner, String text) voidsetStatusFinished(Object owner) voidshowAboutAppDialog(PluginDescriptor plugin) voidbooleanshowConfigurationDialog(Selection properties) booleanvoidshowViewerPanel(String viewerId, String systemId, Map params) voidshowViewerPanel(String viewerId, URL url, Map params) abstract voidstatic voidstartLocalFileSynchronization(Item item, Object info, Context ctx) abstract voidstatic voidstopLocalFileSynchronization(Item item, Object info, Context ctx) voidundo()Undo the last action.static voidUndo the last derivation step.protected voidMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface de.grogra.pf.registry.RegistryContext
getRegistry
-
Field Details
-
CLOSE
-
TIMER
-
CURRENT_DIRECTORY
- See Also:
-
PROJECT_DIRECTORY
TODO: the PROJECT_DIRECTORY is not a robust way to get the project directory. The property change if several workbenches are opened. Use #getPathToProjectDirectory() instead.- See Also:
-
LAST_FILES
-
START_AS_DEMO
- See Also:
-
START_AS_TEMPLATE
- See Also:
-
INITIAL_LAYOUT
- See Also:
-
SOFT_GUI_INFO
-
GUI_INFO
-
EXPORT_VISIBLE_LAYER
- See Also:
-
app
-
-
Constructor Details
-
Workbench
-
-
Method Details
-
initLogger
public void initLogger() -
close
-
current
-
get
-
current
-
setCurrent
-
runAsCurrent
-
isWorkbenchThread
public boolean isWorkbenchThread() -
initializeWindow
-
getMainWorkbench
-
getLogger
-
getJobManager
-
getToolkit
-
getWorkbench
Description copied from interface:ContextDetermines the workbench of this GUI context.- Specified by:
getWorkbenchin interfaceContext- Returns:
- this context's workbench
-
getPanel
Description copied from interface:ContextDetermines the panel of this GUI context. -
getComponent
Description copied from interface:ContextDetermines the GUI component of this GUI context.- Specified by:
getComponentin interfaceContext- Returns:
- this context's component
-
isHeadless
public boolean isHeadless() -
setProperty
-
getProperty
-
setName
-
getName
-
setModified
public final void setModified() -
isModified
public final boolean isModified() -
setModified
public void setModified(boolean modified) -
updateName
protected void updateName() -
undo
public void undo()Undo the last action. -
redo
public void redo()"Undo" the last undo. -
isUndoEnabled
-
isRedoEnabled
-
save
public boolean save(boolean allowSaveAs) -
saveAs
-
open
-
save
-
undo
Undo the last derivation step. -
redo
-
saveAs
-
open
-
open
-
openRecent
-
openRecent
-
openAsDemo
-
openAsDemo
-
addToLastUsed
-
refreshLastUsed
-
setIgnoreIfModified
protected void setIgnoreIfModified(boolean i) -
ignoreIfModified
public void ignoreIfModified() -
setFile
-
save
-
export
-
export
-
getState
-
chooseFileToSave
public FileChooserResult chooseFileToSave(String title, IOFlavor flavor, FileTypeItem.Filter selectedfilter) - Parameters:
title-flavor-selectedfilter- - the selected file filter type- Returns:
-
readObject
-
readObject
-
showAboutAppDialog
-
showAboutPluginDialog
-
showConfigurationDialog
-
showConfigurationDialog
-
getChartPanel
-
showViewerPanel
-
showViewerPanel
-
logInfo
-
logGUIInfo
-
logInfo
-
logGUIInfo
-
log
-
addStatusChangeListener
-
removeStatusChangeListener
-
beginStatus
-
setStatus
-
setStatus
-
setStatusClearProgress
-
setProgress
-
clearProgress
-
setIndeterminateProgress
-
clearStatusAndProgress
-
setStatusFinished
-
getStatus
-
getProgress
-
cut
-
isCutEnabled
-
copy
-
isCopyEnabled
-
paste
-
delete
-
delete
-
isDeleteEnabled
-
lostOwnership
- Specified by:
lostOwnershipin interfaceClipboardOwner
-
select
-
getFile
The file is the project local file ( xx.gs, or xx.gsz).- Returns:
-
refreshJEdit
Refreshes JEdit for the file fielName.- Parameters:
fileName- , including suffix, e.g. "rgg", but without file system identifier ("pfs" is assumed)
-
refreshJEdit
Refreshes JEdit for the file fielName.- Parameters:
fileName- , including suffix, e.g. "rgg", but without file system identifier ("pfs" is assumed)the- current workbench
-
startLocalFileSynchronization
-
stopLocalFileSynchronization
-
stopLocalFileSynchronization
public abstract void stopLocalFileSynchronization() -
startLocalFileSynchronization
public abstract void startLocalFileSynchronization() -
getApplication
-
initialize
public void initialize()It is done by the job manager when the workbench is started -
isSelected
public abstract boolean isSelected()return true if the workbench is currently selected- Returns:
-
clearGraph
Fully clear the graph and reset the root node -
clearGraph
public void clearGraph() -
createMainWorkbenchHTMLContent
-
getPathToProjectDirectory
-