org.pentaho.di.ui.core
Class ConstUI

java.lang.Object
  extended by org.pentaho.di.ui.core.ConstUI

public class ConstUI
extends Object

This class is used to define a number of default values for various settings throughout Kettle. It also contains a number of static final methods to make your life easier.

Since:
07-05-2003
Author:
Matt

Field Summary
static int COLOR_BACKGROUND_BLUE
          The default blue-component of the background color
static int COLOR_BACKGROUND_GREEN
          The default green-component of the background color
static int COLOR_BACKGROUND_RED
          The default red-component of the background color
static int COLOR_GRAPH_BLUE
          The default blue-component of the graph background color
static int COLOR_GRAPH_GREEN
          The default green-component of the graph background color
static int COLOR_GRAPH_RED
          The default red-component of the graph background color
static int COLOR_TAB_BLUE
          The default blue-component of the tab selected color
static int COLOR_TAB_GREEN
          The default green-component of the tab selected color
static int COLOR_TAB_RED
          The default red-component of the tab selected color
static String FONT_FIXED_NAME
          Default font name for the fixed width font
static int FONT_FIXED_SIZE
          Default font size for the fixed width font
static int FONT_FIXED_TYPE
          Default font type for the fixed width font
static int GRID_SIZE
          Default grid size to which the graphical views snap.
static int ICON_SIZE
          Default icon size
static int INTERVAL_MS_TRANS_CANVAS_REFRESH
          the default canvas refresh interval for running transformations
static int LINE_WIDTH
          Default line width for arrows & around icons
static int NOTE_MIN_SIZE
          The minimal size of a note on a graphical view (width & height)
static int TOOLTIP_OFFSET
          Offset between pointer and tooltip position.
 
Constructor Summary
ConstUI()
           
 
Method Summary
static void displayMenu(Menu menu, Control control)
           
static TreeItem findTreeItem(TreeItem parent, String name)
           
static TreeItem findTreeItem(TreeItem parent, String parentName, String name)
          Finds a TreeItem with a certain label (name) in a (part of a) tree.
static void flipExpanded(TreeItem ti)
          Flips the TreeItem from expanded to not expanded or vice-versa.
static int getTreeLevel(TreeItem ti)
          Determine the level of where the TreeItem is position in a tree.
static String getTreePath(TreeItem ti, int from)
          Return the tree path seperated by Const.FILE_SEPARATOR, starting from a certain depth in the tree.
static String[] getTreeStrings(TreeItem ti)
          Get an array of strings containing the path from the given TreeItem to the parent.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FONT_FIXED_NAME

public static final String FONT_FIXED_NAME
Default font name for the fixed width font

See Also:
Constant Field Values

FONT_FIXED_SIZE

public static final int FONT_FIXED_SIZE
Default font size for the fixed width font

See Also:
Constant Field Values

FONT_FIXED_TYPE

public static final int FONT_FIXED_TYPE
Default font type for the fixed width font


ICON_SIZE

public static final int ICON_SIZE
Default icon size

See Also:
Constant Field Values

LINE_WIDTH

public static final int LINE_WIDTH
Default line width for arrows & around icons

See Also:
Constant Field Values

GRID_SIZE

public static final int GRID_SIZE
Default grid size to which the graphical views snap.

See Also:
Constant Field Values

NOTE_MIN_SIZE

public static final int NOTE_MIN_SIZE
The minimal size of a note on a graphical view (width & height)

See Also:
Constant Field Values

TOOLTIP_OFFSET

public static final int TOOLTIP_OFFSET
Offset between pointer and tooltip position.

See Also:
Constant Field Values

COLOR_BACKGROUND_RED

public static final int COLOR_BACKGROUND_RED
The default red-component of the background color

See Also:
Constant Field Values

COLOR_BACKGROUND_GREEN

public static final int COLOR_BACKGROUND_GREEN
The default green-component of the background color

See Also:
Constant Field Values

COLOR_BACKGROUND_BLUE

public static final int COLOR_BACKGROUND_BLUE
The default blue-component of the background color

See Also:
Constant Field Values

COLOR_GRAPH_RED

public static final int COLOR_GRAPH_RED
The default red-component of the graph background color

See Also:
Constant Field Values

COLOR_GRAPH_GREEN

public static final int COLOR_GRAPH_GREEN
The default green-component of the graph background color

See Also:
Constant Field Values

COLOR_GRAPH_BLUE

public static final int COLOR_GRAPH_BLUE
The default blue-component of the graph background color

See Also:
Constant Field Values

COLOR_TAB_RED

public static final int COLOR_TAB_RED
The default red-component of the tab selected color

See Also:
Constant Field Values

COLOR_TAB_GREEN

public static final int COLOR_TAB_GREEN
The default green-component of the tab selected color

See Also:
Constant Field Values

COLOR_TAB_BLUE

public static final int COLOR_TAB_BLUE
The default blue-component of the tab selected color

See Also:
Constant Field Values

INTERVAL_MS_TRANS_CANVAS_REFRESH

public static final int INTERVAL_MS_TRANS_CANVAS_REFRESH
the default canvas refresh interval for running transformations

See Also:
Constant Field Values
Constructor Detail

ConstUI

public ConstUI()
Method Detail

getTreeLevel

public static final int getTreeLevel(TreeItem ti)
Determine the level of where the TreeItem is position in a tree.

Parameters:
ti - The TreeItem
Returns:
The level of the item in the tree

getTreeStrings

public static final String[] getTreeStrings(TreeItem ti)
Get an array of strings containing the path from the given TreeItem to the parent.

Parameters:
ti - The TreeItem to look at
Returns:
An array of string describing the path to the TreeItem.

getTreePath

public static final String getTreePath(TreeItem ti,
                                       int from)
Return the tree path seperated by Const.FILE_SEPARATOR, starting from a certain depth in the tree.

Parameters:
ti - The TreeItem to get the path for
from - The depth to start at, use 0 to get the complete tree.
Returns:
The tree path.

flipExpanded

public static final void flipExpanded(TreeItem ti)
Flips the TreeItem from expanded to not expanded or vice-versa.

Parameters:
ti - The TreeItem to flip.

findTreeItem

public static final TreeItem findTreeItem(TreeItem parent,
                                          String name)

findTreeItem

public static final TreeItem findTreeItem(TreeItem parent,
                                          String parentName,
                                          String name)
Finds a TreeItem with a certain label (name) in a (part of a) tree.

Parameters:
parent - The TreeItem where we start looking.
parentName - The name of the parent to match as well (null=not used)
name - The name or item label to look for.
Returns:
The TreeItem if the label was found, null if nothing was found.

displayMenu

public static void displayMenu(Menu menu,
                               Control control)