de.grogra.pf.ui
Class Workbench
java.lang.Object
de.grogra.pf.ui.Workbench
- All Implemented Interfaces:
- RegistryContext, Context, java.awt.datatransfer.ClipboardOwner
- Direct Known Subclasses:
- IMPWorkbench
public abstract class Workbench
- extends java.lang.Object
- implements Context, RegistryContext, java.awt.datatransfer.ClipboardOwner
Method Summary |
void |
addStatusChangeListener(java.beans.PropertyChangeListener l)
|
static void |
addToLastUsed(Workbench wb,
java.io.File file)
|
void |
beginStatus(java.lang.Object owner)
|
FileChooserResult |
chooseFile(java.lang.String title,
javax.swing.filechooser.FileFilter[] filters,
int type,
boolean mustExist,
javax.swing.filechooser.FileFilter selectedFilter)
|
FileChooserResult |
chooseFileToOpen(java.lang.String title,
IOFlavor acceptableFlavor)
|
FileChooserResult |
chooseFileToSave(java.lang.String title,
IOFlavor flavor,
FileTypeItem.Filter selectedfilter)
|
void |
clearProgress(java.lang.Object owner)
|
void |
clearStatusAndProgress(java.lang.Object owner)
|
static void |
copy(Item item,
java.lang.Object info,
Context ctx)
|
static Workbench |
current()
|
static Workbench |
current(ThreadContext tc)
|
static void |
cut(Item item,
java.lang.Object info,
Context ctx)
|
static void |
delete(Item item,
java.lang.Object info,
Context ctx)
|
void |
export(FilterSource src)
|
void |
export(FilterSource src,
MimeType mt,
java.io.File file)
|
static Workbench |
get(RegistryContext ctx)
|
ChartPanel |
getChartPanel(java.lang.String chart,
Map params)
|
java.lang.Object |
getComponent()
Determines the GUI component of this GUI context. |
java.io.File |
getFile()
|
JobManager |
getJobManager()
|
java.util.logging.Logger |
getLogger()
|
abstract Workbench |
getMainWorkbench()
|
java.lang.String |
getName()
|
Panel |
getPanel()
Determines the panel of this GUI context. |
java.lang.Object |
getProperty(java.lang.String key)
|
Registry |
getRegistry()
Returns the Registry which is linked with this instance. |
protected void |
getState(Item state)
|
UIToolkit |
getToolkit()
|
Workbench |
getWorkbench()
Determines the workbench of this GUI context. |
void |
ignoreIfModified()
|
protected void |
initializeWindow(Window w)
|
static boolean |
isCopyEnabled(Context ctx)
|
static boolean |
isCutEnabled(Context ctx)
|
static boolean |
isDeleteEnabled(Context ctx)
|
boolean |
isHeadless()
|
boolean |
isModified()
|
boolean |
isWorkbenchThread()
|
static void |
log(java.lang.Throwable thrown)
|
void |
logGUIInfo(java.lang.String msg)
|
void |
logGUIInfo(java.lang.String msg,
java.lang.Throwable thrown)
|
void |
logInfo(java.lang.String msg)
|
void |
logInfo(java.lang.String msg,
java.lang.Throwable thrown)
|
void |
lostOwnership(java.awt.datatransfer.Clipboard c,
java.awt.datatransfer.Transferable t)
|
abstract Workbench |
open(FilterSource fs,
Map initParams)
|
static void |
open(Item item,
java.lang.Object info,
Context ctx)
|
static void |
openAsDemo(Item item,
java.lang.Object info,
Context ctx)
|
static void |
openRecent(Item item,
java.lang.Object info,
Context ctx)
|
static void |
paste(Item item,
java.lang.Object info,
Context ctx)
|
java.lang.Object |
readObject(FileChooserResult src,
IOFlavor flavor)
|
java.lang.Object |
readObject(FilterSource src,
IOFlavor flavor)
|
static void |
refreshLastUsed(Registry r,
Workbench mwb)
|
void |
removeStatusChangeListener(java.beans.PropertyChangeListener l)
|
void |
runAsCurrent(java.lang.Runnable r)
|
boolean |
save(boolean allowSaveAs)
|
static void |
save(Item item,
java.lang.Object info,
Context ctx)
|
boolean |
saveAs()
|
static void |
saveAs(Item item,
java.lang.Object info,
Context ctx)
|
void |
select(Node[] nodes)
|
static void |
setCurrent(Workbench w)
|
void |
setFile(java.io.File file,
MimeType mimeType)
|
void |
setIndeterminateProgress(java.lang.Object owner)
|
void |
setModified()
|
protected void |
setModified(boolean modified)
|
void |
setName(java.lang.String name)
|
void |
setProgress(java.lang.Object owner,
float progress)
|
void |
setProperty(java.lang.String key,
java.lang.Object value)
|
void |
setStatus(java.lang.Object owner,
java.lang.String text)
|
void |
setStatus(java.lang.Object owner,
java.lang.String text,
float progress)
|
void |
setStatusClearProgress(java.lang.Object owner,
java.lang.String text)
|
void |
showAboutAppDialog(PluginDescriptor plugin)
|
void |
showAboutPluginDialog(PluginDescriptor plugin)
|
boolean |
showConfigurationDialog(ConfigurationSet config)
|
boolean |
showConfigurationDialog(Selection properties)
|
void |
showViewerPanel(java.lang.String viewerId,
java.lang.String systemId,
Map params)
|
void |
showViewerPanel(java.lang.String viewerId,
java.net.URL url,
Map params)
|
protected void |
updateName()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CURRENT_DIRECTORY
public static final java.lang.String CURRENT_DIRECTORY
- See Also:
- Constant Field Values
GUI_INFO
public static final java.util.logging.Level GUI_INFO
INITIAL_LAYOUT
public static final java.lang.String INITIAL_LAYOUT
- See Also:
- Constant Field Values
LAST_FILES
public static final java.lang.String[] LAST_FILES
SOFT_GUI_INFO
public static final java.util.logging.Level SOFT_GUI_INFO
START_AS_DEMO
public static final java.lang.String START_AS_DEMO
- See Also:
- Constant Field Values
TIMER
public static final java.util.Timer TIMER
Workbench
public Workbench(Registry registry,
JobManager jm,
UIToolkit ui,
Map initParams)
addStatusChangeListener
public void addStatusChangeListener(java.beans.PropertyChangeListener l)
addToLastUsed
public static void addToLastUsed(Workbench wb,
java.io.File file)
beginStatus
public void beginStatus(java.lang.Object owner)
chooseFile
public FileChooserResult chooseFile(java.lang.String title,
javax.swing.filechooser.FileFilter[] filters,
int type,
boolean mustExist,
javax.swing.filechooser.FileFilter selectedFilter)
chooseFileToOpen
public FileChooserResult chooseFileToOpen(java.lang.String title,
IOFlavor acceptableFlavor)
chooseFileToSave
public FileChooserResult chooseFileToSave(java.lang.String title,
IOFlavor flavor,
FileTypeItem.Filter selectedfilter)
- Parameters:
title
- flavor
- selectedfilter
- - the selected file filter type
- Returns:
clearProgress
public void clearProgress(java.lang.Object owner)
clearStatusAndProgress
public void clearStatusAndProgress(java.lang.Object owner)
copy
public static void copy(Item item,
java.lang.Object info,
Context ctx)
current
public static Workbench current()
current
public static Workbench current(ThreadContext tc)
cut
public static void cut(Item item,
java.lang.Object info,
Context ctx)
delete
public static void delete(Item item,
java.lang.Object info,
Context ctx)
export
public void export(FilterSource src)
export
public void export(FilterSource src,
MimeType mt,
java.io.File file)
get
public static Workbench get(RegistryContext ctx)
getChartPanel
public ChartPanel getChartPanel(java.lang.String chart,
Map params)
getComponent
public final java.lang.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
getFile
public java.io.File getFile()
getJobManager
public final JobManager getJobManager()
getLogger
public final java.util.logging.Logger getLogger()
getMainWorkbench
public abstract Workbench getMainWorkbench()
getName
public java.lang.String getName()
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
getProperty
public java.lang.Object getProperty(java.lang.String key)
getRegistry
public final Registry getRegistry()
- Description copied from interface:
RegistryContext
- Returns the
Registry
which is linked with this instance.
- Specified by:
getRegistry
in interface RegistryContext
- Returns:
- the registry linked with this instance
getState
protected void getState(Item state)
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
ignoreIfModified
public void ignoreIfModified()
initializeWindow
protected void initializeWindow(Window w)
isCopyEnabled
public static boolean isCopyEnabled(Context ctx)
isCutEnabled
public static boolean isCutEnabled(Context ctx)
isDeleteEnabled
public static boolean isDeleteEnabled(Context ctx)
isHeadless
public boolean isHeadless()
isModified
public final boolean isModified()
isWorkbenchThread
public boolean isWorkbenchThread()
log
public static void log(java.lang.Throwable thrown)
logGUIInfo
public void logGUIInfo(java.lang.String msg)
logGUIInfo
public void logGUIInfo(java.lang.String msg,
java.lang.Throwable thrown)
logInfo
public void logInfo(java.lang.String msg)
logInfo
public void logInfo(java.lang.String msg,
java.lang.Throwable thrown)
lostOwnership
public void lostOwnership(java.awt.datatransfer.Clipboard c,
java.awt.datatransfer.Transferable t)
- Specified by:
lostOwnership
in interface java.awt.datatransfer.ClipboardOwner
open
public abstract Workbench open(FilterSource fs,
Map initParams)
open
public static void open(Item item,
java.lang.Object info,
Context ctx)
openAsDemo
public static void openAsDemo(Item item,
java.lang.Object info,
Context ctx)
openRecent
public static void openRecent(Item item,
java.lang.Object info,
Context ctx)
paste
public static void paste(Item item,
java.lang.Object info,
Context ctx)
readObject
public java.lang.Object readObject(FileChooserResult src,
IOFlavor flavor)
readObject
public java.lang.Object readObject(FilterSource src,
IOFlavor flavor)
refreshLastUsed
public static void refreshLastUsed(Registry r,
Workbench mwb)
removeStatusChangeListener
public void removeStatusChangeListener(java.beans.PropertyChangeListener l)
runAsCurrent
public void runAsCurrent(java.lang.Runnable r)
save
public boolean save(boolean allowSaveAs)
save
public static void save(Item item,
java.lang.Object info,
Context ctx)
saveAs
public boolean saveAs()
saveAs
public static void saveAs(Item item,
java.lang.Object info,
Context ctx)
select
public void select(Node[] nodes)
setCurrent
public static void setCurrent(Workbench w)
setFile
public void setFile(java.io.File file,
MimeType mimeType)
setIndeterminateProgress
public void setIndeterminateProgress(java.lang.Object owner)
setModified
public final void setModified()
setModified
protected void setModified(boolean modified)
setName
public void setName(java.lang.String name)
setProgress
public void setProgress(java.lang.Object owner,
float progress)
setProperty
public void setProperty(java.lang.String key,
java.lang.Object value)
setStatus
public void setStatus(java.lang.Object owner,
java.lang.String text)
setStatus
public void setStatus(java.lang.Object owner,
java.lang.String text,
float progress)
setStatusClearProgress
public void setStatusClearProgress(java.lang.Object owner,
java.lang.String text)
showAboutAppDialog
public void showAboutAppDialog(PluginDescriptor plugin)
showAboutPluginDialog
public void showAboutPluginDialog(PluginDescriptor plugin)
showConfigurationDialog
public boolean showConfigurationDialog(ConfigurationSet config)
showConfigurationDialog
public boolean showConfigurationDialog(Selection properties)
showViewerPanel
public void showViewerPanel(java.lang.String viewerId,
java.lang.String systemId,
Map params)
showViewerPanel
public void showViewerPanel(java.lang.String viewerId,
java.net.URL url,
Map params)
updateName
protected void updateName()