Package org.apache.hop.ui.core
Class ConstUi
- java.lang.Object
-
- org.apache.hop.ui.core.ConstUi
-
public class ConstUi extends Object
This class is used to define a number of default values for various settings throughout Hop. It also contains a number of static final methods to make your life easier.
-
-
Field Summary
Fields Modifier and Type Field Description static intCHECKBOX_WIDTHDefault checkbox widthstatic intCOLOR_BACKGROUND_BLUEThe default blue-component of the background colorstatic intCOLOR_BACKGROUND_GREENThe default green-component of the background colorstatic intCOLOR_BACKGROUND_REDThe default red-component of the background colorstatic intCOLOR_GRAPH_BLUEThe default blue-component of the graph background colorstatic intCOLOR_GRAPH_GREENThe default green-component of the graph background colorstatic intCOLOR_GRAPH_REDThe default red-component of the graph background colorstatic intCOLOR_TAB_BLUEThe default blue-component of the tab selected colorstatic intCOLOR_TAB_GREENThe default green-component of the tab selected colorstatic intCOLOR_TAB_REDThe default red-component of the tab selected colorstatic intDOCUMENTATION_ICON_SIZEstatic intGRID_SIZEDefault grid size to which the graphical views snap.static StringHOP_GUI_HIDE_MENUThis option allows you to hide the menu bar from Hop GUI.static StringHOP_GUI_ZOOM_FACTORThis is the global zoom factor.static intICON_SIZEDefault icon sizestatic intINTERVAL_MS_PIPELINE_CANVAS_REFRESHthe default canvas refresh interval for running pipelinesstatic intLARGE_ICON_SIZEstatic intLINE_WIDTHDefault line width for arrows & around iconsstatic intMEDIUM_ICON_SIZEstatic intMEDIUM_MARGINmargin between points of controlsstatic intNOTE_MIN_SIZEThe minimal size of a note on a graphical view (width & height)static intSMALL_ICON_SIZEstatic intSMALL_MARGINmargin between points of controlsstatic intTOOLTIP_OFFSETOffset between pointer and tooltip position.
-
Constructor Summary
Constructors Constructor Description ConstUi()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voiddisplayMenu(org.eclipse.swt.widgets.Menu menu, org.eclipse.swt.widgets.Control control)static org.eclipse.swt.widgets.TreeItemfindTreeItem(org.eclipse.swt.widgets.TreeItem parent, String name)static org.eclipse.swt.widgets.TreeItemfindTreeItem(org.eclipse.swt.widgets.TreeItem parent, String parentName, String name)Finds a TreeItem with a certain label (name) in a (part of a) tree.static voidflipExpanded(org.eclipse.swt.widgets.TreeItem ti)Flips the TreeItem from expanded to not expanded or vice-versa.static intgetTreeLevel(org.eclipse.swt.widgets.TreeItem ti)Determine the level of where the TreeItem is position in a tree.static StringgetTreePath(org.eclipse.swt.widgets.TreeItem ti, int from)Return the tree path seperated by Const.FILE_SEPARATOR, starting from a certain depth in the tree.static String[]getTreeStrings(org.eclipse.swt.widgets.TreeItem ti)Get an array of strings containing the path from the given TreeItem to the parent.static String[]sortFieldNames(List<String> names)Sort field names if options is enabled
-
-
-
Field Detail
-
ICON_SIZE
public static final int ICON_SIZE
Default icon size- See Also:
- Constant Field Values
-
LARGE_ICON_SIZE
public static final int LARGE_ICON_SIZE
- See Also:
- Constant Field Values
-
SMALL_ICON_SIZE
public static final int SMALL_ICON_SIZE
- See Also:
- Constant Field Values
-
MEDIUM_ICON_SIZE
public static final int MEDIUM_ICON_SIZE
- See Also:
- Constant Field Values
-
DOCUMENTATION_ICON_SIZE
public static final int DOCUMENTATION_ICON_SIZE
- See Also:
- Constant Field Values
-
CHECKBOX_WIDTH
public static final int CHECKBOX_WIDTH
Default checkbox width- 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_PIPELINE_CANVAS_REFRESH
public static final int INTERVAL_MS_PIPELINE_CANVAS_REFRESH
the default canvas refresh interval for running pipelines- See Also:
- Constant Field Values
-
SMALL_MARGIN
public static final int SMALL_MARGIN
margin between points of controls- See Also:
- Constant Field Values
-
MEDIUM_MARGIN
public static final int MEDIUM_MARGIN
margin between points of controls- See Also:
- Constant Field Values
-
HOP_GUI_ZOOM_FACTOR
public static final String HOP_GUI_ZOOM_FACTOR
This is the global zoom factor. When set it takes precedence over what is entered in the GUI options. A number smaller than 1 makes everything smaller. A factor larger than 1 makes the UI widgets look bigger.- See Also:
- Constant Field Values
-
HOP_GUI_HIDE_MENU
public static final String HOP_GUI_HIDE_MENU
This option allows you to hide the menu bar from Hop GUI. Set the value of this variable to Y and see it go away.- See Also:
- Constant Field Values
-
-
Method Detail
-
getTreeLevel
public static final int getTreeLevel(org.eclipse.swt.widgets.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(org.eclipse.swt.widgets.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(org.eclipse.swt.widgets.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 forfrom- The depth to start at, use 0 to get the complete tree.- Returns:
- The tree path.
-
flipExpanded
public static final void flipExpanded(org.eclipse.swt.widgets.TreeItem ti)
Flips the TreeItem from expanded to not expanded or vice-versa.- Parameters:
ti- The TreeItem to flip.
-
findTreeItem
public static final org.eclipse.swt.widgets.TreeItem findTreeItem(org.eclipse.swt.widgets.TreeItem parent, String name)
-
findTreeItem
public static final org.eclipse.swt.widgets.TreeItem findTreeItem(org.eclipse.swt.widgets.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(org.eclipse.swt.widgets.Menu menu, org.eclipse.swt.widgets.Control control)
-
-