public class UIControlManager
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
UIControlManager.CommonControlID
This enum variable provides the most common controls.
|
static class |
UIControlManager.CommonMenuTitle
This enum variable provides the most common menu titles in the menu bar.
|
static class |
UIControlManager.FontType |
static class |
UIControlManager.InformationMessage
This enum variable provides the most common information messages.
|
static class |
UIControlManager.InformationMessageTitle
This enum variable provides the most common message titles.
|
| Modifier and Type | Field and Description |
|---|---|
static java.awt.image.BufferedImage |
REpiceaIcon |
| Modifier and Type | Method and Description |
|---|---|
static javax.swing.JButton |
createButtonWithRedCircleIcon()
This method returns a button with a red circle icon and no text.
|
static javax.swing.JButton |
createCommonButton(UIControlManager.CommonControlID buttonID)
This method creates a button corresponding to the buttonName parameter.
|
static javax.swing.JMenu |
createCommonMenu(UIControlManager.CommonMenuTitle menuTitle)
This method creates a menu corresponding to the menuTitle parameter.
|
static javax.swing.JMenuItem |
createCommonMenuItem(UIControlManager.CommonControlID menuItemID)
This method creates a menu item corresponding to the menuItemID parameter.
|
static REpiceaMenuItem |
createCommonMenuItem(UIControlManager.CommonControlID menuItemID,
GenericTaskFactory taskMaker)
This method creates a menu item corresponding to the menuItemID parameter.
|
static javax.swing.JPanel |
createSimpleHorizontalPanel(java.awt.Component label,
java.awt.Component control,
int margin,
boolean expandable)
This static method creates an horizontal JPanel with a label and a control.
|
static javax.swing.JPanel |
createSimpleHorizontalPanel(REpiceaTranslator.TextableEnum labelEnum,
java.awt.Component control,
int margin,
boolean expandable)
This static method creates an horizontal JPanel with a label and a control.
|
static java.awt.Dimension |
getDimensionRelativeToScreen(double widthFraction,
double heightFraction)
This method returns a Dimension instance whose width and height are the specified fraction of the screen dimension.
|
static java.awt.Font |
getFont(UIControlManager.FontType fontType)
This method returns the font associated to this FontType enum variable
|
static AutomatedHelper |
getHelper(java.lang.Class<?> clazz)
This method returns the help method for this class.
|
static javax.swing.JLabel |
getLabel(REpiceaTranslator.TextableEnum textableEnum)
This method returns a JLabel instance with no predefined width.
|
static javax.swing.JLabel |
getLabel(REpiceaTranslator.TextableEnum textableEnum,
int width)
This method returns a JLabel instance.
|
static javax.swing.JLabel |
getLabel(java.lang.String labelString)
This method returns a JLabel instance with no predefined width.
|
static javax.swing.JLabel |
getLabel(java.lang.String labelString,
int width)
This method returns a JLabel instance.
|
protected static java.awt.Point |
getLocation(java.awt.Window window)
This method returns the location of the window.
|
static java.lang.String |
getTitle(java.lang.Class<? extends java.awt.Window> clazz)
This method returns the title associated to this Window-derived class.
|
static javax.swing.border.TitledBorder |
getTitledBorder(java.lang.String title)
This static method returns a Border instance with a title.
|
protected static void |
registerLocation(java.awt.Window window)
This method registers the window location.
|
static void |
setFont(UIControlManager.FontType fontType,
java.awt.Font font)
This method makes it possible to change the fonts of the different controls.
|
static void |
setHelpMethod(java.lang.Class<? extends java.awt.Window> clazz,
AutomatedHelper helper)
This method registers the help method for this Window-derived class.
|
static void |
setLocation(java.awt.Window window,
java.awt.Point point)
This method sets the location of a particular window.
|
static void |
setTitle(java.lang.Class<? extends java.awt.Window> clazz,
java.lang.String englishTitle,
java.lang.String frenchTitle)
This method registers a title for this Window-derived class.
|
protected static void registerLocation(java.awt.Window window)
window - a Window instancepublic static void setLocation(java.awt.Window window,
java.awt.Point point)
window - a Window instancepoint - a Point instanceprotected static java.awt.Point getLocation(java.awt.Window window)
window - the window that is to be shownpublic static void setTitle(java.lang.Class<? extends java.awt.Window> clazz,
java.lang.String englishTitle,
java.lang.String frenchTitle)
clazz - the Window-derived classenglishTitle - the title in EnglishfrenchTitle - the title in Frenchpublic static java.lang.String getTitle(java.lang.Class<? extends java.awt.Window> clazz)
clazz - the Window-derived classpublic static void setHelpMethod(java.lang.Class<? extends java.awt.Window> clazz,
AutomatedHelper helper)
clazz - the Window-derived classhelper - an AutomatedHelper instancepublic static AutomatedHelper getHelper(java.lang.Class<?> clazz)
clazz - the Window-derived classpublic static javax.swing.JButton createCommonButton(UIControlManager.CommonControlID buttonID)
buttonID - a enum that represents the buttonpublic static javax.swing.JMenuItem createCommonMenuItem(UIControlManager.CommonControlID menuItemID)
menuItemID - a enum that represents the controlpublic static REpiceaMenuItem createCommonMenuItem(UIControlManager.CommonControlID menuItemID, GenericTaskFactory taskMaker)
menuItemID - a enum that represents the controltaskMaker - a GenericTaskFactory insUIControlManagertancepublic static javax.swing.JMenu createCommonMenu(UIControlManager.CommonMenuTitle menuTitle)
menuTitle - a enum that represents the controlpublic static javax.swing.JLabel getLabel(java.lang.String labelString,
int width)
labelString - the label to be displayedwidth - the width of the label (0 for no predifined width)public static javax.swing.JLabel getLabel(REpiceaTranslator.TextableEnum textableEnum, int width)
textableEnum - a TextableEnum enum varwidth - the width of the label (0 for no predefined width)public static javax.swing.JLabel getLabel(java.lang.String labelString)
labelString - the string that appears in the labelpublic static javax.swing.JLabel getLabel(REpiceaTranslator.TextableEnum textableEnum)
textableEnum - a TextableEnum enum varpublic static void setFont(UIControlManager.FontType fontType, java.awt.Font font)
fontType - a FontType instancefont - a Font instancepublic static java.awt.Font getFont(UIControlManager.FontType fontType)
fontType - a FontType enum variablepublic static java.awt.Dimension getDimensionRelativeToScreen(double widthFraction,
double heightFraction)
widthFraction - a double between 0 and 1heightFraction - a double between 0 and 1public static javax.swing.border.TitledBorder getTitledBorder(java.lang.String title)
title - the title to appear in the Border instancepublic static javax.swing.JPanel createSimpleHorizontalPanel(java.awt.Component label,
java.awt.Component control,
int margin,
boolean expandable)
label - a Component instancecontrol - a Component to be displayedmargin - the size of the horizontal strutexpandable - a boolean if true the component is located in the CENTER of the BorderLayout. Otherwise, it is put in
the EAST of the BorderLayoutpublic static javax.swing.JPanel createSimpleHorizontalPanel(REpiceaTranslator.TextableEnum labelEnum, java.awt.Component control, int margin, boolean expandable)
labelEnum - a TextableEnum instancecontrol - a Component to be displayedmargin - the size of the horizontal strutexpandable - a boolean if true the component is located in the CENTER of the BorderLayout. Otherwise, it is put in
the EAST of the BorderLayoutpublic static javax.swing.JButton createButtonWithRedCircleIcon()