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.Props
We 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>
lastUsedFiles
protected String
lastUsedLocalFile
protected Map<String,List<org.pentaho.di.core.LastUsedFile>>
lastUsedRepoFiles
protected List<org.pentaho.di.core.LastUsedFile>
openTabFiles
protected String
overriddenFileName
-
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 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.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.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.void
addOpenTabFile(String fileType, String filename, String directory, boolean sourceRepository, String repositoryName, int openTypes, String connection)
static org.pentaho.di.core.gui.Point
calculateGridPosition(org.pentaho.di.core.gui.Point p)
boolean
getAutoCollapseCoreObjectsTree()
boolean
getAutoSave()
boolean
getAutoSplit()
org.eclipse.swt.graphics.RGB
getBackgroundRGB()
int
getCanvasGridSize()
org.eclipse.swt.graphics.FontData
getDefaultFont()
org.eclipse.swt.graphics.FontData
getDefaultFontData()
int
getDefaultPreviewSize()
int
getDialogStyle(String styleProperty)
static org.eclipse.swt.widgets.Display
getDisplay()
String
getFilename()
org.eclipse.swt.graphics.FontData
getFixedFont()
org.eclipse.swt.graphics.RGB
getGraphColorRGB()
org.eclipse.swt.graphics.FontData
getGraphFont()
org.eclipse.swt.graphics.FontData
getGridFont()
int
getIconSize()
static PropsUI
getInstance()
int
getJobsDialogStyle()
String[]
getLastDirs()
String[]
getLastFiles()
String[]
getLastFileTypes()
String[]
getLastPreview()
int[]
getLastPreviewSize()
String[]
getLastRepositories()
String
getLastTrans()
boolean[]
getLastTypes()
List<org.pentaho.di.core.LastUsedFile>
getLastUsedFiles()
String
getLastUsedLocalFile()
Map<String,List<org.pentaho.di.core.LastUsedFile>>
getLastUsedRepoFiles()
int
getLineWidth()
int
getMaxUndo()
int
getMiddlePct()
org.eclipse.swt.graphics.FontData
getNoteFont()
List<org.pentaho.di.core.LastUsedFile>
getOpenTabFiles()
String
getRecentSearches()
List<org.pentaho.di.core.gui.GUIOption<Object>>
getRegisteredEditableComponents()
int[]
getSashWeights()
boolean
getSaveConfirmation()
WindowProperty
getScreen(String windowname)
int
getShadowSize()
int
getSupportedVersion(String property)
Gets the supported version of the requested software.org.eclipse.swt.graphics.RGB
getTabColorRGB()
protected void
init()
static void
init(org.eclipse.swt.widgets.Display d, int t)
Initialize the properties: load from disk.static void
init(org.eclipse.swt.widgets.Display d, String filename)
Initialize the properties: load from disk.boolean
isAntiAliasingEnabled()
boolean
isBrandingActive()
boolean
isBrowserEnvironmentCheckDisabled()
Ask if the browsing environment checks are disabled.boolean
isIndicateSlowTransStepsEnabled()
static boolean
isInitialized()
Check to see whether the Kettle properties where loaded.boolean
isLegacyPerspectiveMode()
boolean
isOnlyActiveFileShownInTree()
boolean
isOSLookShown()
boolean
isShowCanvasGridEnabled()
boolean
isShowingHelpToolTips()
boolean
isSVGEnabled()
void
loadLastUsedFiles()
void
loadLastUsedRepoFiles()
void
loadOpenTabFiles()
void
loadScreens()
boolean
openLastFile()
void
saveProps()
void
setAntiAliasingEnabled(boolean anti)
void
setAutoCollapseCoreObjectsTree(boolean autoCollapse)
void
setAutoSave(boolean autosave)
void
setAutoSplit(boolean autosplit)
void
setBackgroundRGB(org.eclipse.swt.graphics.RGB c)
void
setBrandingActive(boolean active)
void
setCanvasGridSize(int gridSize)
void
setDefault()
void
setDefaultFont(org.eclipse.swt.graphics.FontData fd)
void
setDefaultPreviewSize(int size)
void
setDialogSize(org.eclipse.swt.widgets.Shell shell, String styleProperty)
static void
setDisplay(org.eclipse.swt.widgets.Display d)
void
setExitWarningShown(boolean show)
void
setFixedFont(org.eclipse.swt.graphics.FontData fd)
static void
setGCFont(org.eclipse.swt.graphics.GC gc, org.eclipse.swt.graphics.Device device, org.eclipse.swt.graphics.FontData fontData)
void
setGraphColorRGB(org.eclipse.swt.graphics.RGB c)
void
setGraphFont(org.eclipse.swt.graphics.FontData fd)
void
setGridFont(org.eclipse.swt.graphics.FontData fd)
void
setIconSize(int size)
void
setIndicateSlowTransStepsEnabled(boolean indicate)
void
setLastFiles()
void
setLastPreview(String[] lastpreview, int[] stepsize)
void
setLastTrans(String trans)
void
setLastUsedFiles(List<org.pentaho.di.core.LastUsedFile> lastUsedFiles)
void
setLastUsedLocalFile(String filePath)
void
setLastUsedRepoFiles()
void
setLineWidth(int width)
static void
setLocation(org.pentaho.di.core.gui.GUIPositionInterface guiElement, int x, int y)
void
setLook(org.eclipse.swt.widgets.Control widget)
void
setLook(org.eclipse.swt.widgets.Control control, int style)
void
setMaxUndo(int max)
void
setMiddlePct(int pct)
void
setNoteFont(org.eclipse.swt.graphics.FontData fd)
void
setOnlyActiveFileShownInTree(boolean show)
void
setOpenLastFile(boolean open)
void
setOpenTabFiles()
void
setOpenTabFiles(List<org.pentaho.di.core.LastUsedFile> openTabFiles)
void
setOSLookShown(boolean show)
void
setRecentSearches(String recentSearches)
void
setRepositoriesDialogAtStartupShown(boolean show)
void
setSashWeights(int[] w)
void
setSaveConfirmation(boolean saveconf)
void
setScreen(WindowProperty winprop)
void
setShadowSize(int size)
void
setShowCanvasGridEnabled(boolean anti)
void
setShowCopyOrDistributeWarning(boolean show)
void
setShowingHelpToolTips(boolean show)
void
setShowToolTips(boolean show)
void
setShowWelcomePageOnStartup(boolean show)
void
setSVGEnabled(boolean svg)
void
setTabColorRGB(org.eclipse.swt.graphics.RGB c)
static void
setTableItemLook(org.eclipse.swt.widgets.TableItem item, org.eclipse.swt.widgets.Display disp)
boolean
showCopyOrDistributeWarning()
boolean
showExitWarning()
boolean
showRepositoriesDialogAtStartup()
boolean
showToolTips()
boolean
showWelcomePageOnStartup()
void
storeScreens()
-
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:
init
in classorg.pentaho.di.core.Props
-
setDefault
public void setDefault()
-
storeScreens
public void storeScreens()
-
loadScreens
public void loadScreens()
-
saveProps
public void saveProps()
- Overrides:
saveProps
in 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.
-
setLastUsedLocalFile
public void setLastUsedLocalFile(String filePath)
-
getLastUsedLocalFile
public String getLastUsedLocalFile()
-
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:
getFilename
in 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()
-
-