org.pentaho.di.ui.core
Class PropsUI

java.lang.Object
  extended by org.pentaho.di.core.Props
      extended by org.pentaho.di.ui.core.PropsUI
All Implemented Interfaces:
Cloneable

public class PropsUI
extends 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 inherited from class org.pentaho.di.core.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_REPLACE_DATABASES, STRING_SASH_W1, STRING_SASH_W2, STRING_SAVE_CONF, STRING_SHADOW_SIZE, STRING_SHOW_EXIT_WARNING, STRING_SHOW_OS_LOOK, STRING_SHOW_TIPS, STRING_SIZE_H, STRING_SIZE_MAX, STRING_SIZE_W, STRING_SIZE_X, STRING_SIZE_Y, STRING_START_SHOW_REPOSITORIES, STRING_TAB_COLOR_B, STRING_TAB_COLOR_G, STRING_TAB_COLOR_R, STRING_TIP_NR, STRING_USE_DB_CACHE, 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
 
Method Summary
 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 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.
static Point calculateGridPosition(Point p)
           
 boolean getAutoCollapseCoreObjectsTree()
           
 boolean getAutoSave()
           
 boolean getAutoSplit()
           
 RGB getBackgroundRGB()
           
 RGB getBackupgroundRGB()
          Deprecated.  
 int getCanvasGridSize()
           
 FontData getDefaultFont()
           
 FontData getDefaultFontData()
           
 int getDefaultPreviewSize()
           
 int getDialogStyle(String styleProperty)
           
static Display getDisplay()
           
 String getFilename()
           
 FontData getFixedFont()
           
 RGB getGraphColorRGB()
           
 FontData getGraphFont()
           
 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<LastUsedFile> getLastUsedFiles()
           
 int getLineWidth()
           
 int getMaxUndo()
           
 int getMiddlePct()
           
 FontData getNoteFont()
           
 List<LastUsedFile> getOpenTabFiles()
           
 List<GUIOption<Object>> getRegisteredEditableComponents()
           
 int[] getSashWeights()
           
 boolean getSaveConfirmation()
           
 WindowProperty getScreen(String windowname)
           
 int getShadowSize()
           
 RGB getTabColorRGB()
           
 int getTipNr()
           
static void init(Display d, int t)
          Initialize the properties: load from disk.
static void init(Display d, String filename)
          Initialize the properties: load from disk.
 boolean isAntiAliasingEnabled()
           
 boolean isBrandingActive()
           
 boolean isIndicateSlowTransStepsEnabled()
           
static boolean isInitialized()
          Check to see whether the Kettle properties where loaded.
 boolean isOnlyActiveFileShownInTree()
           
 boolean isOSLookShown()
           
 boolean isShowingHelpToolTips()
           
 void loadLastUsedFiles()
           
 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(RGB c)
           
 void setBrandingActive(boolean active)
           
 void setCanvasGridSize(int gridSize)
           
 void setDefault()
           
 void setDefaultFont(FontData fd)
           
 void setDefaultPreviewSize(int size)
           
 void setDialogSize(Shell shell, String styleProperty)
           
static void setDisplay(Display d)
           
 void setExitWarningShown(boolean show)
           
 void setFixedFont(FontData fd)
           
static void setGCFont(GC gc, Device device, FontData fontData)
           
 void setGraphColorRGB(RGB c)
           
 void setGraphFont(FontData fd)
           
 void setGridFont(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<LastUsedFile> lastUsedFiles)
           
 void setLineWidth(int width)
           
static void setLocation(GUIPositionInterface guiElement, int x, int y)
           
 void setLook(Control widget)
           
 void setLook(Control control, int style)
           
 void setMaxUndo(int max)
           
 void setMiddlePct(int pct)
           
 void setNoteFont(FontData fd)
           
 void setOnlyActiveFileShownInTree(boolean show)
           
 void setOpenLastFile(boolean open)
           
 void setOpenTabFiles()
           
 void setOpenTabFiles(List<LastUsedFile> openTabFiles)
           
 void setOSLookShown(boolean show)
           
 void setRepositoriesDialogAtStartupShown(boolean show)
           
 void setSashWeights(int[] w)
           
 void setSaveConfirmation(boolean saveconf)
           
 void setScreen(WindowProperty winprop)
           
 void setShadowSize(int size)
           
 void setShowCopyOrDistributeWarning(boolean show)
           
 void setShowingHelpToolTips(boolean show)
           
 void setShowTips(boolean show)
           
 void setShowToolTips(boolean show)
           
 void setShowWelcomePageOnStartup(boolean show)
           
 void setTabColorRGB(RGB c)
           
static void setTableItemLook(TableItem item, Display disp)
           
 void setTipNr(int nr)
           
 boolean showCopyOrDistributeWarning()
           
 boolean showExitWarning()
           
 boolean showRepositoriesDialogAtStartup()
           
 boolean showTips()
           
 boolean showToolTips()
           
 boolean showWelcomePageOnStartup()
           
 void storeScreens()
           
 
Methods inherited from class org.pentaho.di.core.Props
addPluginHistory, areOnlyUsedConnectionsSavedToXML, askAboutReplacingDatabaseConnections, clearCustomParameters, convertArguments, disableInitialExecutionHistory, fileExists, getArgumentNumber, getCustomParameter, getLastArguments, getLastRepository, getLastRepositoryLogin, getLicenseFilename, getLinesInHistoryFetchSize, getLogFilter, getLogLevel, getMaxLogLineTimeoutMinutes, getMaxNrLinesInHistory, getMaxNrLinesInLog, getOnlyActiveSteps, getPluginHistory, getProperty, getType, increasePluginHistory, init, init, loadProps, replaceExistingDatabaseConnections, setAskAboutReplacingDatabaseConnections, setCustomParameter, setDisableInitialExecutionHistory, setLastArguments, setLastRepository, setLastRepositoryLogin, setLinesInHistoryFetchSize, setLogFilter, setLogLevel, setMaxLogLineTimeoutMinutes, setMaxNrLinesInHistory, setMaxNrLinesInLog, setOnlyActiveSteps, setOnlyUsedConnectionsSavedToXML, setProperty, setReplaceDatabaseConnections, setType, setUseDBCache, toString, useDBCache
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

init

public static final void init(Display d,
                              int t)
Initialize the properties: load from disk.

Parameters:
display - The Display
t - The type of properties file.

init

public static final void init(Display d,
                              String filename)
Initialize the properties: load from disk.

Parameters:
display - The Display
filename - the filename to use

isInitialized

public static final boolean isInitialized()
Check to see whether the Kettle properties where loaded.

Returns:
true if the Kettle properties where loaded.

getInstance

public static final PropsUI getInstance()

setDefault

public void setDefault()

storeScreens

public void storeScreens()

loadScreens

public void loadScreens()

saveProps

public void saveProps()
Overrides:
saveProps in class Props

setLastFiles

public void setLastFiles()

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 LastUsedFile
filename - The name of the file or transformation
directory - The repository directory path, null in case lf is an XML file
sourceRepository - 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)
Add a last opened file to the top of the recently used list.

Parameters:
fileType - the type of file to use @see LastUsedFile
filename - The name of the file or transformation
directory - The repository directory path, null in case lf is an XML file
sourceRepository - 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()

loadOpenTabFiles

public void loadOpenTabFiles()

getLastUsedFiles

public List<LastUsedFile> getLastUsedFiles()

setLastUsedFiles

public void setLastUsedFiles(List<LastUsedFile> lastUsedFiles)

getLastFileTypes

public String[] getLastFileTypes()

getLastFiles

public String[] getLastFiles()

getFilename

public String getFilename()
Overrides:
getFilename in class Props

getLastDirs

public String[] getLastDirs()

getLastTypes

public boolean[] getLastTypes()

getLastRepositories

public String[] getLastRepositories()

setFixedFont

public void setFixedFont(FontData fd)

getFixedFont

public FontData getFixedFont()

setDefaultFont

public void setDefaultFont(FontData fd)

getDefaultFont

public FontData getDefaultFont()

setGraphFont

public void setGraphFont(FontData fd)

getGraphFont

public FontData getGraphFont()

setGridFont

public void setGridFont(FontData fd)

getGridFont

public FontData getGridFont()

setNoteFont

public void setNoteFont(FontData fd)

getNoteFont

public FontData getNoteFont()

setBackgroundRGB

public void setBackgroundRGB(RGB c)

getBackgroundRGB

public RGB getBackgroundRGB()

getBackupgroundRGB

public RGB getBackupgroundRGB()
Deprecated. 

Returns:
The background RGB color.

setGraphColorRGB

public void setGraphColorRGB(RGB c)

getGraphColorRGB

public RGB getGraphColorRGB()

setTabColorRGB

public void setTabColorRGB(RGB c)

getTabColorRGB

public RGB getTabColorRGB()

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 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()

setTipNr

public void setTipNr(int nr)

getTipNr

public int getTipNr()

setShowTips

public void setShowTips(boolean show)

showTips

public boolean showTips()

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)

showExitWarning

public boolean showExitWarning()

setRepositoriesDialogAtStartupShown

public void setRepositoriesDialogAtStartupShown(boolean show)

isOSLookShown

public boolean isOSLookShown()

setOSLookShown

public void setOSLookShown(boolean show)

setGCFont

public static final void setGCFont(GC gc,
                                   Device device,
                                   FontData fontData)

setLook

public void setLook(Control widget)

setLook

public void setLook(Control control,
                    int style)

setTableItemLook

public static void setTableItemLook(TableItem item,
                                    Display disp)

getDisplay

public static Display getDisplay()
Returns:
Returns the display.

setDisplay

public static void setDisplay(Display d)
Parameters:
display - 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(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<GUIOption<Object>> getRegisteredEditableComponents()

isShowingHelpToolTips

public boolean isShowingHelpToolTips()

setShowingHelpToolTips

public void setShowingHelpToolTips(boolean show)

getOpenTabFiles

public List<LastUsedFile> getOpenTabFiles()
Returns:
the openTabFiles

setOpenTabFiles

public void setOpenTabFiles(List<LastUsedFile> openTabFiles)
Parameters:
openTabFiles - the openTabFiles to set

getCanvasGridSize

public int getCanvasGridSize()

setCanvasGridSize

public void setCanvasGridSize(int gridSize)

setLocation

public static final void setLocation(GUIPositionInterface guiElement,
                                     int x,
                                     int y)

calculateGridPosition

public static final Point calculateGridPosition(Point p)

isIndicateSlowTransStepsEnabled

public boolean isIndicateSlowTransStepsEnabled()

setIndicateSlowTransStepsEnabled

public void setIndicateSlowTransStepsEnabled(boolean indicate)