Package jadex.bpmn.editor.gui
Class Settings
- java.lang.Object
-
- jadex.bpmn.editor.gui.Settings
-
public class Settings extends java.lang.ObjectThe editor settings.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSettings.BpmnClassFilter
-
Field Summary
Fields Modifier and Type Field Description protected BackgroundProgressBarbgprogressbarThe progress bar for background tasks.protected static java.lang.StringCLASS_CACHE_FILE_NAMEThe class cache file name.protected booleandataedgesData edge enabled flag.protected booleandirectsequenceautoconnectFlag if simple direct sequence edge auto-connect is enabled.protected java.util.List<ClassInfo>globalallclassesGlobal allclassesprotected java.util.List<ClassInfo>globalexceptionsGlobal exceptions.protected java.util.List<ClassInfo>globalinterfacesGlobal interfacesprotected java.util.List<ClassInfo>globaltaskclassesGlobal task classesprotected ImageProviderimageproviderThe image provider.protected booleanjadexextensionsFlag if Jadex extensions are enabled.protected java.io.FilelastfileThe last file opened or saved.protected java.lang.StringlfnameThe name of the look and feelprotected java.lang.ClassLoaderlibclassloaderThe library class loader.protected java.io.File[]libentriesThe library class loader entries.protected booleannametypedataautoconnectFlag if simple name/type data edge auto-connect is enabled.protected java.io.File[]openedfilesFiles that were opened when editor was closed.protected PropertyPanelFactorypropertypanelfactoryThe property panel factoryprotected booleansavesettingsonexitFlag if save settings on exit is enabled.protected booleanscanningFlag if a scan is in progressprotected java.lang.StringselectedsheetThe selected style sheetprotected booleansequenceedgesSequence edge enabled flag.protected static java.lang.StringSETTINGS_FILE_NAMEThe settings file name.protected booleansmoothzoomSmooth zoom flag.protected inttoolbariconsizeThe last file opened or saved.
-
Constructor Summary
Constructors Constructor Description Settings()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<ClassInfo>getGlobalAllClasses()Get the allclasses.java.util.List<ClassInfo>getGlobalExceptions()Gets the globalexceptions.java.util.List<ClassInfo>getGlobalInterfaces()Get the globalinterfaces.java.util.List<ClassInfo>getGlobalTaskClasses()Get the globaltaskclasses.ImageProvidergetImageProvider()Returns the image provider.protected static java.util.Set<java.lang.String>getInterfaces(java.lang.String cname, java.net.URLClassLoader rcl, java.util.Map<java.lang.String,java.util.Set<java.lang.String>> cache)java.io.FilegetLastFile()Gets the last file.java.lang.StringgetLfName()Gets the look and feel name.java.lang.ClassLoadergetLibraryClassLoader()Gets the library class loader.java.io.File[]getLibraryEntries()Sets the library entries.java.io.File[]getOpenedFiles()Gets the opened files.BackgroundProgressBargetProgressBar()Gets the progress bar.PropertyPanelFactorygetPropertyPanelFactory()Gets the property panel factory.java.lang.StringgetSelectedSheet()Gets the selected style sheet.protected static java.util.Set<java.lang.String>getSuperClasses(java.lang.String cname, java.net.URLClassLoader rcl)intgetToolbarIconSize()booleanisDataEdges()Gets the dataedges.booleanisDirectSequenceAutoConnect()Gets the directsequenceautoconnect.booleanisJadexExtensions()booleanisNameTypeDataAutoConnect()Gets the nametypedataautoconnect.booleanisSaveSettingsOnExit()Gets the save settings on exit setting.booleanisSequenceEdges()Gets the sequenceedges.booleanisSmoothZoom()static Settingsload()Loads the settings.voidsave()Save the settings.IFuture<java.lang.Void>scanForClasses()Scans for the global classes.protected static IFuture<java.lang.Void>scanForClasses(Settings settings, java.lang.ClassLoader cl, IFilter<java.lang.Object> filefilter, IFilter<java.lang.Class<?>> classfilter, boolean includeboot)Scan for task classes.protected static IFuture<java.lang.Void>scanForClasses(Settings settings, java.net.URL[] urls, IFilter<java.lang.Object> filefilter, IFilter<java.lang.Class<?>> classfilter, boolean includeboot)Scan for task classes.voidsetDataEdges(boolean dataedges)Sets the dataedges.voidsetDirectSequenceAutoConnect(boolean directsequenceautoconnect)Sets the directsequenceautoconnect.voidsetGlobalAllClasses(java.util.List<ClassInfo> allclasses)Set all classes.voidsetGlobalExceptions(java.util.List<ClassInfo> globalexceptions)Sets the globalexceptions.voidsetGlobalInterfaces(java.util.List<ClassInfo> globalinterfaces)Set the globalinterfaces.voidsetGlobalTaskClasses(java.util.List<ClassInfo> globaltaskclasses)Set the globaltaskclasses.voidsetJadexExtensions(boolean jadexextensions)voidsetLastFile(java.io.File lastfile)Sets the last file.voidsetLfName(java.lang.String lfname)Sets the look and feel name.voidsetLibraryEntries(java.util.Collection<java.io.File> entries)Sets the library entries.voidsetNameTypeDataAutoConnect(boolean nametypedataautoconnect)Sets the nametypedataautoconnect.voidsetOpenedFiles(java.io.File[] openedfiles)Sets the opened files.voidsetProgressBar(BackgroundProgressBar progressbar)Sets the progress bar.voidsetPropertyPanelFactory(PropertyPanelFactory propertypanelfactory)Sets the property panel factory.voidsetSaveSettingsOnExit(boolean savesettingsonexit)Sets the save settings on exit setting.voidsetSelectedSheet(java.lang.String selectedsheet)Sets the selected style sheet.voidsetSequenceEdges(boolean sequenceedges)Sets the sequenceedges.voidsetSmoothZoom(boolean smoothzoom)voidsetToolbarIconSize(int toolbariconsize)
-
-
-
Field Detail
-
SETTINGS_FILE_NAME
protected static final java.lang.String SETTINGS_FILE_NAME
The settings file name.- See Also:
- Constant Field Values
-
CLASS_CACHE_FILE_NAME
protected static final java.lang.String CLASS_CACHE_FILE_NAME
The class cache file name.- See Also:
- Constant Field Values
-
propertypanelfactory
protected PropertyPanelFactory propertypanelfactory
The property panel factory
-
bgprogressbar
protected BackgroundProgressBar bgprogressbar
The progress bar for background tasks.
-
imageprovider
protected ImageProvider imageprovider
The image provider.
-
lastfile
protected java.io.File lastfile
The last file opened or saved.
-
openedfiles
protected java.io.File[] openedfiles
Files that were opened when editor was closed.
-
toolbariconsize
protected int toolbariconsize
The last file opened or saved.
-
lfname
protected java.lang.String lfname
The name of the look and feel
-
sequenceedges
protected boolean sequenceedges
Sequence edge enabled flag.
-
dataedges
protected boolean dataedges
Data edge enabled flag.
-
nametypedataautoconnect
protected boolean nametypedataautoconnect
Flag if simple name/type data edge auto-connect is enabled.
-
directsequenceautoconnect
protected boolean directsequenceautoconnect
Flag if simple direct sequence edge auto-connect is enabled.
-
savesettingsonexit
protected boolean savesettingsonexit
Flag if save settings on exit is enabled.
-
jadexextensions
protected boolean jadexextensions
Flag if Jadex extensions are enabled.
-
smoothzoom
protected boolean smoothzoom
Smooth zoom flag.
-
selectedsheet
protected java.lang.String selectedsheet
The selected style sheet
-
libentries
protected java.io.File[] libentries
The library class loader entries.
-
libclassloader
protected java.lang.ClassLoader libclassloader
The library class loader.
-
globaltaskclasses
protected java.util.List<ClassInfo> globaltaskclasses
Global task classes
-
globalinterfaces
protected java.util.List<ClassInfo> globalinterfaces
Global interfaces
-
globalexceptions
protected java.util.List<ClassInfo> globalexceptions
Global exceptions.
-
globalallclasses
protected java.util.List<ClassInfo> globalallclasses
Global allclasses
-
scanning
protected boolean scanning
Flag if a scan is in progress
-
-
Method Detail
-
getProgressBar
public BackgroundProgressBar getProgressBar()
Gets the progress bar.- Returns:
- The progress bar.
-
setProgressBar
public void setProgressBar(BackgroundProgressBar progressbar)
Sets the progress bar.- Parameters:
bgprogressbar- The progress bar.
-
getImageProvider
public ImageProvider getImageProvider()
Returns the image provider.- Returns:
- The image provider.
-
getSelectedSheet
public java.lang.String getSelectedSheet()
Gets the selected style sheet.- Returns:
- The selected sheet.
-
setSelectedSheet
public void setSelectedSheet(java.lang.String selectedsheet)
Sets the selected style sheet.- Parameters:
selectedsheet- The selected sheet.
-
getOpenedFiles
public java.io.File[] getOpenedFiles()
Gets the opened files.- Returns:
- The opened files.
-
setOpenedFiles
public void setOpenedFiles(java.io.File[] openedfiles)
Sets the opened files.- Parameters:
openedfiles- The opened files.
-
getLfName
public java.lang.String getLfName()
Gets the look and feel name.- Returns:
- The name.
-
setLfName
public void setLfName(java.lang.String lfname)
Sets the look and feel name.- Parameters:
lfname- The name.
-
getToolbarIconSize
public int getToolbarIconSize()
- Returns:
-
setToolbarIconSize
public void setToolbarIconSize(int toolbariconsize)
- Parameters:
toolbariconsize-
-
isSmoothZoom
public boolean isSmoothZoom()
-
setSmoothZoom
public void setSmoothZoom(boolean smoothzoom)
-
isJadexExtensions
public boolean isJadexExtensions()
-
setJadexExtensions
public void setJadexExtensions(boolean jadexextensions)
-
isSequenceEdges
public boolean isSequenceEdges()
Gets the sequenceedges.- Returns:
- The sequenceedges.
-
setSequenceEdges
public void setSequenceEdges(boolean sequenceedges)
Sets the sequenceedges.- Parameters:
sequenceedges- The sequenceedges.
-
isDataEdges
public boolean isDataEdges()
Gets the dataedges.- Returns:
- The dataedges.
-
setDataEdges
public void setDataEdges(boolean dataedges)
Sets the dataedges.- Parameters:
dataedges- The dataedges.
-
isNameTypeDataAutoConnect
public boolean isNameTypeDataAutoConnect()
Gets the nametypedataautoconnect.- Returns:
- The nametypedataautoconnect.
-
setNameTypeDataAutoConnect
public void setNameTypeDataAutoConnect(boolean nametypedataautoconnect)
Sets the nametypedataautoconnect.- Parameters:
nametypedataautoconnect- The nametypedataautoconnect.
-
isDirectSequenceAutoConnect
public boolean isDirectSequenceAutoConnect()
Gets the directsequenceautoconnect.- Returns:
- The directsequenceautoconnect.
-
setDirectSequenceAutoConnect
public void setDirectSequenceAutoConnect(boolean directsequenceautoconnect)
Sets the directsequenceautoconnect.- Parameters:
directsequenceautoconnect- The directsequenceautoconnect.
-
getLastFile
public java.io.File getLastFile()
Gets the last file.- Returns:
- The last file.
-
setLastFile
public void setLastFile(java.io.File lastfile)
Sets the last file.- Parameters:
lastfile- The last file.
-
getLibraryEntries
public java.io.File[] getLibraryEntries()
Sets the library entries.- Parameters:
entries- The entries.
-
scanForClasses
public IFuture<java.lang.Void> scanForClasses()
Scans for the global classes.
-
setLibraryEntries
public void setLibraryEntries(java.util.Collection<java.io.File> entries)
Sets the library entries.- Parameters:
entries- The entries.
-
getGlobalTaskClasses
public java.util.List<ClassInfo> getGlobalTaskClasses()
Get the globaltaskclasses.- Returns:
- The globaltaskclasses.
-
setGlobalTaskClasses
public void setGlobalTaskClasses(java.util.List<ClassInfo> globaltaskclasses)
Set the globaltaskclasses.- Parameters:
globaltaskclasses- The globaltaskclasses to set.
-
getGlobalInterfaces
public java.util.List<ClassInfo> getGlobalInterfaces()
Get the globalinterfaces.- Returns:
- The globalinterfaces.
-
setGlobalInterfaces
public void setGlobalInterfaces(java.util.List<ClassInfo> globalinterfaces)
Set the globalinterfaces.- Parameters:
globalinterfaces- The globalinterfaces to set.
-
getGlobalExceptions
public java.util.List<ClassInfo> getGlobalExceptions()
Gets the globalexceptions.- Returns:
- The globalexceptions.
-
setGlobalExceptions
public void setGlobalExceptions(java.util.List<ClassInfo> globalexceptions)
Sets the globalexceptions.- Parameters:
globalexceptions- The globalexceptions.
-
getGlobalAllClasses
public java.util.List<ClassInfo> getGlobalAllClasses()
Get the allclasses.- Returns:
- The allclasses.
-
setGlobalAllClasses
public void setGlobalAllClasses(java.util.List<ClassInfo> allclasses)
Set all classes.- Parameters:
allclasses- The classes to set.
-
isSaveSettingsOnExit
public boolean isSaveSettingsOnExit()
Gets the save settings on exit setting.- Returns:
- The save settings on exit setting.
-
setSaveSettingsOnExit
public void setSaveSettingsOnExit(boolean savesettingsonexit)
Sets the save settings on exit setting.- Parameters:
savesettingsonexit- The save settings on exit setting.
-
getLibraryClassLoader
public java.lang.ClassLoader getLibraryClassLoader()
Gets the library class loader.- Returns:
- The library class loader.
-
getPropertyPanelFactory
public PropertyPanelFactory getPropertyPanelFactory()
Gets the property panel factory.- Returns:
- The property panel factory.
-
setPropertyPanelFactory
public void setPropertyPanelFactory(PropertyPanelFactory propertypanelfactory)
Sets the property panel factory.- Parameters:
propertypanelfactory- The property panel factory.
-
save
public void save() throws java.io.IOExceptionSave the settings.- Throws:
java.io.IOException
-
load
public static final Settings load()
Loads the settings.- Returns:
- The settings.
-
scanForClasses
protected static final IFuture<java.lang.Void> scanForClasses(Settings settings, java.lang.ClassLoader cl, IFilter<java.lang.Object> filefilter, IFilter<java.lang.Class<?>> classfilter, boolean includeboot)
Scan for task classes.
-
scanForClasses
protected static final IFuture<java.lang.Void> scanForClasses(Settings settings, java.net.URL[] urls, IFilter<java.lang.Object> filefilter, IFilter<java.lang.Class<?>> classfilter, boolean includeboot)
Scan for task classes. Note: This uses ASM for inspecting classes for the following reason: Generally, if a class is loaded through a classloader and the classloader is garbage-collected at a later point, the class will be unloaded as well. However, some Java base classes are loaded through some sort of implicit classloader, even if the parent of the classloader is null. Since that classloader cannot be unloaded, the classes are permanently stored in memory once loaded. Since we potentially scan all classes here, even Java system classes, this results in a huge baggage in memory after scanning which cannot be unloaded. Therefore we have to use an arms-length approach for touching classes, i.e. inspect them without loading them, which is what ASM provides here.
-
getSuperClasses
protected static final java.util.Set<java.lang.String> getSuperClasses(java.lang.String cname, java.net.URLClassLoader rcl)
-
getInterfaces
protected static final java.util.Set<java.lang.String> getInterfaces(java.lang.String cname, java.net.URLClassLoader rcl, java.util.Map<java.lang.String,java.util.Set<java.lang.String>> cache)
-
-