Module platform

Class Workbench

java.lang.Object
de.grogra.pf.ui.Workbench
All Implemented Interfaces:
RegistryContext, Context, ClipboardOwner
Direct Known Subclasses:
ProjectWorkbench

public abstract class Workbench extends Object implements Context, RegistryContext, ClipboardOwner
  • Field Details

  • Constructor Details

  • Method Details

    • initLogger

      public void initLogger()
    • close

      protected abstract void close(Command info)
    • current

      public static Workbench current()
    • get

      public static Workbench get(RegistryContext ctx)
    • current

      public static Workbench current(ThreadContext tc)
    • setCurrent

      public static void setCurrent(Workbench w)
    • runAsCurrent

      public void runAsCurrent(Runnable r)
    • isWorkbenchThread

      public boolean isWorkbenchThread()
    • initializeWindow

      protected void initializeWindow(Window w)
    • getMainWorkbench

      public abstract Workbench getMainWorkbench()
    • getLogger

      public final Logger getLogger()
    • getJobManager

      public final JobManager getJobManager()
    • getToolkit

      public final UIToolkit getToolkit()
    • getWorkbench

      public final Workbench getWorkbench()
      Description copied from interface: Context
      Determines the workbench of this GUI context.
      Specified by:
      getWorkbench in interface Context
      Returns:
      this context's workbench
    • getPanel

      public final Panel getPanel()
      Description copied from interface: Context
      Determines the panel of this GUI context.
      Specified by:
      getPanel in interface Context
      Returns:
      this context's panel
    • getComponent

      public final Object getComponent()
      Description copied from interface: Context
      Determines the GUI component of this GUI context.
      Specified by:
      getComponent in interface Context
      Returns:
      this context's component
    • isHeadless

      public boolean isHeadless()
    • setProperty

      public void setProperty(String key, Object value)
    • getProperty

      public Object getProperty(String key)
    • setName

      public void setName(String name)
    • getName

      public String 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.
    • save

      public boolean save(boolean allowSaveAs)
    • saveAs

      public boolean saveAs(Object info)
    • open

      public abstract Workbench open(FilterSource fs, Map initParams)
    • save

      public static void save(Item item, Object info, Context ctx)
    • undo

      public static void undo(Item item, Object info, Context ctx)
      Undo the last derivation step.
    • saveAs

      public static void saveAs(Item item, Object info, Context ctx)
    • open

      public static void open(Item item, Object info, Context ctx)
    • open

      public abstract void open(Object info)
    • openRecent

      public static void openRecent(Item item, Object info, Context ctx)
    • openRecent

      public void openRecent(Object info)
    • openAsDemo

      public static void openAsDemo(Item item, Object info, Context ctx)
    • openAsDemo

      public void openAsDemo(Object info)
    • addToLastUsed

      public static void addToLastUsed(Workbench wb, File file)
    • refreshLastUsed

      public static void refreshLastUsed(Registry r, Workbench mwb)
    • setIgnoreIfModified

      protected void setIgnoreIfModified(boolean i)
    • ignoreIfModified

      public void ignoreIfModified()
    • setFile

      public void setFile(File file, MimeType mimeType)
    • save

      public boolean save(Object object, File f, MimeType mt)
    • export

      public void export(FilterSource src)
    • export

      public void export(FilterSource src, MimeType mt, File file)
    • getState

      protected void getState(Item state)
    • chooseFileToSave

      public FileChooserResult chooseFileToSave(String title, IOFlavor flavor, FileTypeItem.Filter selectedfilter)
      Parameters:
      title -
      flavor -
      selectedfilter - - the selected file filter type
      Returns:
    • readObject

      public Object readObject(FileChooserResult src, IOFlavor flavor)
    • readObject

      public Object readObject(FilterSource src, IOFlavor flavor)
    • showAboutAppDialog

      public void showAboutAppDialog(PluginDescriptor plugin)
    • showAboutPluginDialog

      public void showAboutPluginDialog(PluginDescriptor plugin)
    • showConfigurationDialog

      public boolean showConfigurationDialog(ConfigurationSet config)
    • showConfigurationDialog

      public boolean showConfigurationDialog(Selection properties)
    • getChartPanel

      public ChartPanel getChartPanel(String chart, Map params)
    • showViewerPanel

      public void showViewerPanel(String viewerId, URL url, Map params)
    • showViewerPanel

      public void showViewerPanel(String viewerId, String systemId, Map params)
    • logInfo

      public void logInfo(String msg)
    • logGUIInfo

      public void logGUIInfo(String msg)
    • logInfo

      public void logInfo(String msg, Throwable thrown)
    • logGUIInfo

      public void logGUIInfo(String msg, Throwable thrown)
    • log

      public static void log(Throwable thrown)
    • addStatusChangeListener

      public void addStatusChangeListener(PropertyChangeListener l)
    • removeStatusChangeListener

      public void removeStatusChangeListener(PropertyChangeListener l)
    • beginStatus

      public void beginStatus(Object owner)
    • setStatus

      public void setStatus(Object owner, String text)
    • setStatus

      public void setStatus(Object owner, String text, float progress)
    • setStatusClearProgress

      public void setStatusClearProgress(Object owner, String text)
    • setProgress

      public void setProgress(Object owner, float progress)
    • clearProgress

      public void clearProgress(Object owner)
    • setIndeterminateProgress

      public void setIndeterminateProgress(Object owner)
    • clearStatusAndProgress

      public void clearStatusAndProgress(Object owner)
    • setStatusFinished

      public void setStatusFinished(Object owner)
    • getStatus

      public String getStatus()
    • getProgress

      public Float getProgress()
    • cut

      public static void cut(Item item, Object info, Context ctx)
    • isCutEnabled

      public static boolean isCutEnabled(Context ctx)
    • copy

      public static void copy(Item item, Object info, Context ctx)
    • isCopyEnabled

      public static boolean isCopyEnabled(Context ctx)
    • paste

      public static void paste(Item item, Object info, Context ctx)
    • delete

      public static void delete(Item item, Object info, Context ctx)
    • delete

      public void delete(Object info)
    • isDeleteEnabled

      public static boolean isDeleteEnabled(Context ctx)
    • lostOwnership

      public void lostOwnership(Clipboard c, Transferable t)
      Specified by:
      lostOwnership in interface ClipboardOwner
    • select

      public void select(Node[] nodes)
    • getFile

      public File getFile()
      The file is the project local file ( xx.gs, or xx.gsz).
      Returns:
    • refreshJEdit

      public static void refreshJEdit(String fileName)
      Refreshes JEdit for the file fielName.
      Parameters:
      fileName - , including suffix, e.g. "rgg", but without file system identifier ("pfs" is assumed)
    • refreshJEdit

      public static void refreshJEdit(Workbench wb, String fileName)
      Refreshes JEdit for the file fielName.
      Parameters:
      the - current workbench
      fileName - , including suffix, e.g. "rgg", but without file system identifier ("pfs" is assumed)
    • startLocalFileSynchronization

      public static void startLocalFileSynchronization(Item item, Object info, Context ctx)
    • stopLocalFileSynchronization

      public static void stopLocalFileSynchronization(Item item, Object info, Context ctx)
    • stopLocalFileSynchronization

      public abstract void stopLocalFileSynchronization()
    • startLocalFileSynchronization

      public abstract void startLocalFileSynchronization()
    • getApplication

      public UIApplication 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

      public static void clearGraph(Item item, Object info, Context ctx)
      Fully clear the graph and reset the root node
    • clearGraph

      public void clearGraph()