Package org.pentaho.di.ui.core
Class PropsUI
- java.lang.Object
-
- org.pentaho.di.core.Props
-
- org.pentaho.di.ui.core.PropsUI
-
- All Implemented Interfaces:
Cloneable
public class PropsUI extends org.pentaho.di.core.PropsWe use Props to store all kinds of user interactive information such as the selected colors, fonts, positions of windows, etc.- Since:
- 15-12-2003
- Author:
- Matt
-
-
Field Summary
Fields Modifier and Type Field Description protected List<org.pentaho.di.core.LastUsedFile>lastUsedFilesprotected Map<String,List<org.pentaho.di.core.LastUsedFile>>lastUsedRepoFilesprotected List<org.pentaho.di.core.LastUsedFile>openTabFilesprotected StringoverriddenFileName-
Fields inherited from class org.pentaho.di.core.Props
filename, log, pluginHistory, properties, props, STRING_ANTI_ALIASING, STRING_ARGUMENT_NAME_PREFIX, STRING_ASK_ABOUT_REPLACING_DATABASES, STRING_AUTO_COLLAPSE_CORE_TREE, STRING_AUTO_SAVE, STRING_AUTO_SPLIT, STRING_BACKGROUND_COLOR_B, STRING_BACKGROUND_COLOR_G, STRING_BACKGROUND_COLOR_R, STRING_CUSTOM_PARAMETER, STRING_DEFAULT_PREVIEW_SIZE, STRING_DISABLE_INITIAL_EXECUTION_HISTORY, STRING_FONT_DEFAULT_NAME, STRING_FONT_DEFAULT_SIZE, STRING_FONT_DEFAULT_STYLE, STRING_FONT_FIXED_NAME, STRING_FONT_FIXED_SIZE, STRING_FONT_FIXED_STYLE, STRING_FONT_GRAPH_NAME, STRING_FONT_GRAPH_SIZE, STRING_FONT_GRAPH_STYLE, STRING_FONT_GRID_NAME, STRING_FONT_GRID_SIZE, STRING_FONT_GRID_STYLE, STRING_FONT_NOTE_NAME, STRING_FONT_NOTE_SIZE, STRING_FONT_NOTE_STYLE, STRING_GRAPH_COLOR_B, STRING_GRAPH_COLOR_G, STRING_GRAPH_COLOR_R, STRING_ICON_SIZE, STRING_INDICATE_SLOW_TRANS_STEPS, STRING_LAST_ARGUMENT, STRING_LAST_PREVIEW_SIZE, STRING_LAST_PREVIEW_STEP, STRING_LAST_PREVIEW_TRANS, STRING_LAST_REPOSITORY, STRING_LAST_REPOSITORY_LOGIN, STRING_LINE_WIDTH, STRING_LOG_FILTER, STRING_LOG_LEVEL, STRING_MAX_UNDO, STRING_MIDDLE_PCT, STRING_ONLY_ACTIVE_STEPS, STRING_ONLY_USED_DB_TO_XML, STRING_OPEN_LAST_FILE, STRING_PLUGIN_HISTORY, STRING_RECENT_SEARCHES, STRING_REPLACE_DATABASES, STRING_SASH_W1, STRING_SASH_W2, STRING_SAVE_CONF, STRING_SHADOW_SIZE, STRING_SHOW_CANVAS_GRID, STRING_SHOW_EXIT_WARNING, STRING_SHOW_NEW_SUBTRANS_POPUP, STRING_SHOW_OS_LOOK, STRING_SIZE_H, STRING_SIZE_MAX, STRING_SIZE_W, STRING_SIZE_X, STRING_SIZE_Y, STRING_START_SHOW_REPOSITORIES, STRING_SVG_ENABLED, STRING_TAB_COLOR_B, STRING_TAB_COLOR_G, STRING_TAB_COLOR_R, STRING_USE_DB_CACHE, type, TYPE_PROPERTIES_CHEF, TYPE_PROPERTIES_EMPTY, TYPE_PROPERTIES_KITCHEN, TYPE_PROPERTIES_MENU, TYPE_PROPERTIES_PAN, TYPE_PROPERTIES_PLATE, TYPE_PROPERTIES_SPOON, WIDGET_STYLE_DEFAULT, WIDGET_STYLE_FIXED, WIDGET_STYLE_GRAPH, WIDGET_STYLE_NOTEPAD, WIDGET_STYLE_TAB, WIDGET_STYLE_TABLE, WIDGET_STYLE_TOOLBAR
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddLastFile(String fileType, String filename, String directory, boolean sourceRepository, String repositoryName)Add a last opened file to the top of the recently used list.voidaddLastFile(String fileType, String filename, String directory, boolean sourceRepository, String repositoryName, String username, Date lastOpened, String connection)Add a last opened file to the top of the recently used list.voidaddOpenTabFile(String fileType, String filename, String directory, boolean sourceRepository, String repositoryName, int openTypes)Add a last opened file to the top of the recently used list.voidaddOpenTabFile(String fileType, String filename, String directory, boolean sourceRepository, String repositoryName, int openTypes, String connection)static org.pentaho.di.core.gui.PointcalculateGridPosition(org.pentaho.di.core.gui.Point p)booleangetAutoCollapseCoreObjectsTree()booleangetAutoSave()booleangetAutoSplit()org.eclipse.swt.graphics.RGBgetBackgroundRGB()intgetCanvasGridSize()org.eclipse.swt.graphics.FontDatagetDefaultFont()org.eclipse.swt.graphics.FontDatagetDefaultFontData()intgetDefaultPreviewSize()intgetDialogStyle(String styleProperty)static org.eclipse.swt.widgets.DisplaygetDisplay()StringgetFilename()org.eclipse.swt.graphics.FontDatagetFixedFont()org.eclipse.swt.graphics.RGBgetGraphColorRGB()org.eclipse.swt.graphics.FontDatagetGraphFont()org.eclipse.swt.graphics.FontDatagetGridFont()intgetIconSize()static PropsUIgetInstance()intgetJobsDialogStyle()String[]getLastDirs()String[]getLastFiles()String[]getLastFileTypes()String[]getLastPreview()int[]getLastPreviewSize()String[]getLastRepositories()StringgetLastTrans()boolean[]getLastTypes()List<org.pentaho.di.core.LastUsedFile>getLastUsedFiles()Map<String,List<org.pentaho.di.core.LastUsedFile>>getLastUsedRepoFiles()intgetLineWidth()intgetMaxUndo()intgetMiddlePct()org.eclipse.swt.graphics.FontDatagetNoteFont()List<org.pentaho.di.core.LastUsedFile>getOpenTabFiles()StringgetRecentSearches()List<org.pentaho.di.core.gui.GUIOption<Object>>getRegisteredEditableComponents()int[]getSashWeights()booleangetSaveConfirmation()WindowPropertygetScreen(String windowname)intgetShadowSize()intgetSupportedVersion(String property)Gets the supported version of the requested software.org.eclipse.swt.graphics.RGBgetTabColorRGB()protected voidinit()static voidinit(org.eclipse.swt.widgets.Display d, int t)Initialize the properties: load from disk.static voidinit(org.eclipse.swt.widgets.Display d, String filename)Initialize the properties: load from disk.booleanisAntiAliasingEnabled()booleanisBrandingActive()booleanisBrowserEnvironmentCheckDisabled()Ask if the browsing environment checks are disabled.booleanisIndicateSlowTransStepsEnabled()static booleanisInitialized()Check to see whether the Kettle properties where loaded.booleanisLegacyPerspectiveMode()booleanisOnlyActiveFileShownInTree()booleanisOSLookShown()booleanisShowCanvasGridEnabled()booleanisShowingHelpToolTips()booleanisSVGEnabled()voidloadLastUsedFiles()voidloadLastUsedRepoFiles()voidloadOpenTabFiles()voidloadScreens()booleanopenLastFile()voidsaveProps()voidsetAntiAliasingEnabled(boolean anti)voidsetAutoCollapseCoreObjectsTree(boolean autoCollapse)voidsetAutoSave(boolean autosave)voidsetAutoSplit(boolean autosplit)voidsetBackgroundRGB(org.eclipse.swt.graphics.RGB c)voidsetBrandingActive(boolean active)voidsetCanvasGridSize(int gridSize)voidsetDefault()voidsetDefaultFont(org.eclipse.swt.graphics.FontData fd)voidsetDefaultPreviewSize(int size)voidsetDialogSize(org.eclipse.swt.widgets.Shell shell, String styleProperty)static voidsetDisplay(org.eclipse.swt.widgets.Display d)voidsetExitWarningShown(boolean show)voidsetFixedFont(org.eclipse.swt.graphics.FontData fd)static voidsetGCFont(org.eclipse.swt.graphics.GC gc, org.eclipse.swt.graphics.Device device, org.eclipse.swt.graphics.FontData fontData)voidsetGraphColorRGB(org.eclipse.swt.graphics.RGB c)voidsetGraphFont(org.eclipse.swt.graphics.FontData fd)voidsetGridFont(org.eclipse.swt.graphics.FontData fd)voidsetIconSize(int size)voidsetIndicateSlowTransStepsEnabled(boolean indicate)voidsetLastFiles()voidsetLastPreview(String[] lastpreview, int[] stepsize)voidsetLastTrans(String trans)voidsetLastUsedFiles(List<org.pentaho.di.core.LastUsedFile> lastUsedFiles)voidsetLastUsedRepoFiles()voidsetLineWidth(int width)static voidsetLocation(org.pentaho.di.core.gui.GUIPositionInterface guiElement, int x, int y)voidsetLook(org.eclipse.swt.widgets.Control widget)voidsetLook(org.eclipse.swt.widgets.Control control, int style)voidsetMaxUndo(int max)voidsetMiddlePct(int pct)voidsetNoteFont(org.eclipse.swt.graphics.FontData fd)voidsetOnlyActiveFileShownInTree(boolean show)voidsetOpenLastFile(boolean open)voidsetOpenTabFiles()voidsetOpenTabFiles(List<org.pentaho.di.core.LastUsedFile> openTabFiles)voidsetOSLookShown(boolean show)voidsetRecentSearches(String recentSearches)voidsetRepositoriesDialogAtStartupShown(boolean show)voidsetSashWeights(int[] w)voidsetSaveConfirmation(boolean saveconf)voidsetScreen(WindowProperty winprop)voidsetShadowSize(int size)voidsetShowCanvasGridEnabled(boolean anti)voidsetShowCopyOrDistributeWarning(boolean show)voidsetShowingHelpToolTips(boolean show)voidsetShowToolTips(boolean show)voidsetShowWelcomePageOnStartup(boolean show)voidsetSVGEnabled(boolean svg)voidsetTabColorRGB(org.eclipse.swt.graphics.RGB c)static voidsetTableItemLook(org.eclipse.swt.widgets.TableItem item, org.eclipse.swt.widgets.Display disp)booleanshowCopyOrDistributeWarning()booleanshowExitWarning()booleanshowRepositoriesDialogAtStartup()booleanshowToolTips()booleanshowWelcomePageOnStartup()voidstoreScreens()-
Methods inherited from class org.pentaho.di.core.Props
addDefaultEntries, addPluginHistory, areOnlyUsedConnectionsSavedToXML, askAboutReplacingDatabaseConnections, clearCustomParameters, convertArguments, createLogChannel, disableInitialExecutionHistory, fileExists, getArgumentNumber, getCustomParameter, getLastArguments, getLastRepository, getLastRepositoryLogin, getLicenseFilename, getLinesInHistoryFetchSize, getLogFilter, getLogLevel, getMaxLogLineTimeoutMinutes, getMaxNrLinesInHistory, getMaxNrLinesInLog, getOnlyActiveSteps, getPluginHistory, getProperty, getType, increasePluginHistory, init, init, loadPluginHistory, loadProps, replaceExistingDatabaseConnections, reset, setAskAboutReplacingDatabaseConnections, setCustomParameter, setDisableInitialExecutionHistory, setLastArguments, setLastRepository, setLastRepositoryLogin, setLinesInHistoryFetchSize, setLogFilter, setLogLevel, setMaxLogLineTimeoutMinutes, setMaxNrLinesInHistory, setMaxNrLinesInLog, setOnlyActiveSteps, setOnlyUsedConnectionsSavedToXML, setProperty, setReplaceDatabaseConnections, setShowNewSubtransPopup, setType, setUseDBCache, showNewSubtransPopup, toString, useDBCache
-
-
-
-
Method Detail
-
init
public static void init(org.eclipse.swt.widgets.Display d, int t)Initialize the properties: load from disk.- Parameters:
d- The Displayt- The type of properties file.
-
init
public static void init(org.eclipse.swt.widgets.Display d, String filename)Initialize the properties: load from disk.- Parameters:
d- The Displayfilename- the filename to use
-
isInitialized
public static boolean isInitialized()
Check to see whether the Kettle properties where loaded.- Returns:
- true if the Kettle properties where loaded.
-
getInstance
public static PropsUI getInstance()
-
init
protected void init()
- Overrides:
initin classorg.pentaho.di.core.Props
-
setDefault
public void setDefault()
-
storeScreens
public void storeScreens()
-
loadScreens
public void loadScreens()
-
saveProps
public void saveProps()
- Overrides:
savePropsin classorg.pentaho.di.core.Props
-
setLastFiles
public void setLastFiles()
-
setLastUsedRepoFiles
public void setLastUsedRepoFiles()
-
setOpenTabFiles
public void setOpenTabFiles()
-
addLastFile
public void addLastFile(String fileType, String filename, String directory, boolean sourceRepository, String repositoryName)
Add a last opened file to the top of the recently used list.- Parameters:
fileType- the type of file to use @see LastUsedFilefilename- The name of the file or transformationdirectory- The repository directory path, null in case lf is an XML filesourceRepository- True if the file was loaded from repository, false if ld is an XML file.repositoryName- The name of the repository the file was loaded from or save to.
-
addLastFile
public void addLastFile(String fileType, String filename, String directory, boolean sourceRepository, String repositoryName, String username, Date lastOpened, String connection)
Add a last opened file to the top of the recently used list.- Parameters:
fileType- the type of file to use @see LastUsedFilefilename- The name of the file or transformationdirectory- The repository directory path, null in case lf is an XML filesourceRepository- True if the file was loaded from repository, false if ld is an XML file.repositoryName- The name of the repository the file was loaded from or save to.
-
addOpenTabFile
public void addOpenTabFile(String fileType, String filename, String directory, boolean sourceRepository, String repositoryName, int openTypes, String connection)
-
addOpenTabFile
public void addOpenTabFile(String fileType, String filename, String directory, boolean sourceRepository, String repositoryName, int openTypes)
Add a last opened file to the top of the recently used list.- Parameters:
fileType- the type of file to use @see LastUsedFilefilename- The name of the file or transformationdirectory- The repository directory path, null in case lf is an XML filesourceRepository- True if the file was loaded from repository, false if ld is an XML file.repositoryName- The name of the repository the file was loaded from or save to.
-
loadLastUsedFiles
public void loadLastUsedFiles()
-
loadLastUsedRepoFiles
public void loadLastUsedRepoFiles()
-
loadOpenTabFiles
public void loadOpenTabFiles()
-
getLastUsedRepoFiles
public Map<String,List<org.pentaho.di.core.LastUsedFile>> getLastUsedRepoFiles()
-
getLastUsedFiles
public List<org.pentaho.di.core.LastUsedFile> getLastUsedFiles()
-
setLastUsedFiles
public void setLastUsedFiles(List<org.pentaho.di.core.LastUsedFile> lastUsedFiles)
-
getLastFileTypes
public String[] getLastFileTypes()
-
getLastFiles
public String[] getLastFiles()
-
getFilename
public String getFilename()
- Overrides:
getFilenamein classorg.pentaho.di.core.Props
-
getLastDirs
public String[] getLastDirs()
-
getLastTypes
public boolean[] getLastTypes()
-
getLastRepositories
public String[] getLastRepositories()
-
setFixedFont
public void setFixedFont(org.eclipse.swt.graphics.FontData fd)
-
getFixedFont
public org.eclipse.swt.graphics.FontData getFixedFont()
-
setDefaultFont
public void setDefaultFont(org.eclipse.swt.graphics.FontData fd)
-
getDefaultFont
public org.eclipse.swt.graphics.FontData getDefaultFont()
-
setGraphFont
public void setGraphFont(org.eclipse.swt.graphics.FontData fd)
-
getGraphFont
public org.eclipse.swt.graphics.FontData getGraphFont()
-
setGridFont
public void setGridFont(org.eclipse.swt.graphics.FontData fd)
-
getGridFont
public org.eclipse.swt.graphics.FontData getGridFont()
-
setNoteFont
public void setNoteFont(org.eclipse.swt.graphics.FontData fd)
-
getNoteFont
public org.eclipse.swt.graphics.FontData getNoteFont()
-
setBackgroundRGB
public void setBackgroundRGB(org.eclipse.swt.graphics.RGB c)
-
getBackgroundRGB
public org.eclipse.swt.graphics.RGB getBackgroundRGB()
-
setGraphColorRGB
public void setGraphColorRGB(org.eclipse.swt.graphics.RGB c)
-
getGraphColorRGB
public org.eclipse.swt.graphics.RGB getGraphColorRGB()
-
setTabColorRGB
public void setTabColorRGB(org.eclipse.swt.graphics.RGB c)
-
getTabColorRGB
public org.eclipse.swt.graphics.RGB getTabColorRGB()
-
isSVGEnabled
public boolean isSVGEnabled()
-
setSVGEnabled
public void setSVGEnabled(boolean svg)
-
setIconSize
public void setIconSize(int size)
-
getIconSize
public int getIconSize()
-
setLineWidth
public void setLineWidth(int width)
-
getLineWidth
public int getLineWidth()
-
setShadowSize
public void setShadowSize(int size)
-
getShadowSize
public int getShadowSize()
-
setLastTrans
public void setLastTrans(String trans)
-
getLastTrans
public String getLastTrans()
-
setLastPreview
public void setLastPreview(String[] lastpreview, int[] stepsize)
-
getLastPreview
public String[] getLastPreview()
-
getLastPreviewSize
public int[] getLastPreviewSize()
-
getDefaultFontData
public org.eclipse.swt.graphics.FontData getDefaultFontData()
-
setMaxUndo
public void setMaxUndo(int max)
-
getMaxUndo
public int getMaxUndo()
-
setMiddlePct
public void setMiddlePct(int pct)
-
getMiddlePct
public int getMiddlePct()
-
setScreen
public void setScreen(WindowProperty winprop)
-
getScreen
public WindowProperty getScreen(String windowname)
-
setSashWeights
public void setSashWeights(int[] w)
-
getSashWeights
public int[] getSashWeights()
-
setOpenLastFile
public void setOpenLastFile(boolean open)
-
openLastFile
public boolean openLastFile()
-
setAutoSave
public void setAutoSave(boolean autosave)
-
getAutoSave
public boolean getAutoSave()
-
setSaveConfirmation
public void setSaveConfirmation(boolean saveconf)
-
getSaveConfirmation
public boolean getSaveConfirmation()
-
setAutoSplit
public void setAutoSplit(boolean autosplit)
-
getAutoSplit
public boolean getAutoSplit()
-
setAutoCollapseCoreObjectsTree
public void setAutoCollapseCoreObjectsTree(boolean autoCollapse)
-
getAutoCollapseCoreObjectsTree
public boolean getAutoCollapseCoreObjectsTree()
-
showRepositoriesDialogAtStartup
public boolean showRepositoriesDialogAtStartup()
-
setExitWarningShown
public void setExitWarningShown(boolean show)
-
isAntiAliasingEnabled
public boolean isAntiAliasingEnabled()
-
setAntiAliasingEnabled
public void setAntiAliasingEnabled(boolean anti)
-
isShowCanvasGridEnabled
public boolean isShowCanvasGridEnabled()
-
setShowCanvasGridEnabled
public void setShowCanvasGridEnabled(boolean anti)
-
showExitWarning
public boolean showExitWarning()
-
setRepositoriesDialogAtStartupShown
public void setRepositoriesDialogAtStartupShown(boolean show)
-
isOSLookShown
public boolean isOSLookShown()
-
setOSLookShown
public void setOSLookShown(boolean show)
-
setGCFont
public static void setGCFont(org.eclipse.swt.graphics.GC gc, org.eclipse.swt.graphics.Device device, org.eclipse.swt.graphics.FontData fontData)
-
setLook
public void setLook(org.eclipse.swt.widgets.Control widget)
-
setLook
public void setLook(org.eclipse.swt.widgets.Control control, int style)
-
setTableItemLook
public static void setTableItemLook(org.eclipse.swt.widgets.TableItem item, org.eclipse.swt.widgets.Display disp)
-
getDisplay
public static org.eclipse.swt.widgets.Display getDisplay()
- Returns:
- Returns the display.
-
setDisplay
public static void setDisplay(org.eclipse.swt.widgets.Display d)
- Parameters:
d- The display to set.
-
setDefaultPreviewSize
public void setDefaultPreviewSize(int size)
-
getDefaultPreviewSize
public int getDefaultPreviewSize()
-
showCopyOrDistributeWarning
public boolean showCopyOrDistributeWarning()
-
setShowCopyOrDistributeWarning
public void setShowCopyOrDistributeWarning(boolean show)
-
showWelcomePageOnStartup
public boolean showWelcomePageOnStartup()
-
setShowWelcomePageOnStartup
public void setShowWelcomePageOnStartup(boolean show)
-
getJobsDialogStyle
public int getJobsDialogStyle()
-
getDialogStyle
public int getDialogStyle(String styleProperty)
-
setDialogSize
public void setDialogSize(org.eclipse.swt.widgets.Shell shell, String styleProperty)
-
isBrandingActive
public boolean isBrandingActive()
-
setBrandingActive
public void setBrandingActive(boolean active)
-
isOnlyActiveFileShownInTree
public boolean isOnlyActiveFileShownInTree()
-
setOnlyActiveFileShownInTree
public void setOnlyActiveFileShownInTree(boolean show)
-
showToolTips
public boolean showToolTips()
-
setShowToolTips
public void setShowToolTips(boolean show)
-
getRegisteredEditableComponents
public List<org.pentaho.di.core.gui.GUIOption<Object>> getRegisteredEditableComponents()
-
isShowingHelpToolTips
public boolean isShowingHelpToolTips()
-
setShowingHelpToolTips
public void setShowingHelpToolTips(boolean show)
-
getOpenTabFiles
public List<org.pentaho.di.core.LastUsedFile> getOpenTabFiles()
- Returns:
- the openTabFiles
-
setOpenTabFiles
public void setOpenTabFiles(List<org.pentaho.di.core.LastUsedFile> openTabFiles)
- Parameters:
openTabFiles- the openTabFiles to set
-
getCanvasGridSize
public int getCanvasGridSize()
-
setCanvasGridSize
public void setCanvasGridSize(int gridSize)
-
getSupportedVersion
public int getSupportedVersion(String property)
Gets the supported version of the requested software.- Parameters:
property- the key for the software version- Returns:
- an integer that represents the supported version for the software.
-
isBrowserEnvironmentCheckDisabled
public boolean isBrowserEnvironmentCheckDisabled()
Ask if the browsing environment checks are disabled.- Returns:
- 'true' if disabled 'false' otherwise.
-
isLegacyPerspectiveMode
public boolean isLegacyPerspectiveMode()
-
setLocation
public static void setLocation(org.pentaho.di.core.gui.GUIPositionInterface guiElement, int x, int y)
-
calculateGridPosition
public static org.pentaho.di.core.gui.Point calculateGridPosition(org.pentaho.di.core.gui.Point p)
-
isIndicateSlowTransStepsEnabled
public boolean isIndicateSlowTransStepsEnabled()
-
setIndicateSlowTransStepsEnabled
public void setIndicateSlowTransStepsEnabled(boolean indicate)
-
setRecentSearches
public void setRecentSearches(String recentSearches)
-
getRecentSearches
public String getRecentSearches()
-
-