|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.ceryle.ui.G27y
public class G27y
A Graphical User Interface Factory ("G27y") class containing static methods for creating consistent interface objects.
This includes a set of colors, based on the idea of warmer colors for attention, cooler colors for static or background objects, lower saturation for less attention. The human eye is most sensitive to yellow-green.
(It was a bit unclear in naming this class, as at first I thought it might be more correct as "G30y", if one counted the spaces between words.)
| Field Summary | |
|---|---|
static boolean |
buttonBordersPainted
When true, paint the borders of toolbar buttons. |
static Color |
COLOR_BASE
The set of standard UI colors available to the application. |
static Color |
COLOR_DASHED
The set of standard UI colors available to the application. |
static Color |
COLOR_DIFF_ADDED
The set of standard UI colors available to the application. |
static Color |
COLOR_DIFF_REMOVED
The set of standard UI colors available to the application. |
static Color |
COLOR_DIM
The set of standard UI colors available to the application. |
static Color |
COLOR_DIMMER
The set of standard UI colors available to the application. |
static Color |
COLOR_ED_TEXT_BG
The set of standard UI colors available to the application. |
static Color |
COLOR_ED_TEXT_CARET
The set of standard UI colors available to the application. |
static Color |
COLOR_ED_TEXT_FG
The set of standard UI colors available to the application. |
static Color |
COLOR_ED_TEXT_SBG
The set of standard UI colors available to the application. |
static Color |
COLOR_ED_TEXT_SFG
The set of standard UI colors available to the application. |
static Color |
COLOR_MESSAGE_BACK
The set of standard UI colors available to the application. |
static Color |
COLOR_MESSAGE_FORE
The set of standard UI colors available to the application. |
static Color |
COLOR_NOTICEABLE
The set of standard UI colors available to the application. |
static Color |
COLOR_PROGRESS
The set of standard UI colors available to the application. |
static Color |
COLOR_PROGRESS_DIM
The set of standard UI colors available to the application. |
static Color |
COLOR_SKY_BLUE
The set of standard UI colors available to the application. |
static Color |
COLOR_STATUS
The set of standard UI colors available to the application. |
static Color |
COLOR_STATUS_DIM
The set of standard UI colors available to the application. |
static Color |
COLOR_TEXT_BG
The set of standard UI colors available to the application. |
static Color |
COLOR_TEXT_CARET
The set of standard UI colors available to the application. |
static Color |
COLOR_TEXT_FG
The set of standard UI colors available to the application. |
static Color |
COLOR_TEXT_SBG
The set of standard UI colors available to the application. |
static Color |
COLOR_TEXT_SFG
The set of standard UI colors available to the application. |
static Color |
COLOR_TRANSPARENT
The set of standard UI colors available to the application. |
static Color |
COLOR_UI
The set of standard UI colors available to the application. |
static Color |
COLOR_UI_DARK
The set of standard UI colors available to the application. |
static Color |
COLOR_UI_DARKGRAY
The set of standard UI colors available to the application. |
static Color |
COLOR_UI_DIM
The set of standard UI colors available to the application. |
static Color |
COLOR_UI_GRAY
The set of standard UI colors available to the application. |
static Color |
COLOR_UI_LIGHT
The set of standard UI colors available to the application. |
static Color |
COLOR_UI_LIGHTGRAY
The set of standard UI colors available to the application. |
static Color |
COLOR_UI_TINT
The set of standard UI colors available to the application. |
static int |
DEFAULT_ROW_COUNT
The default number of rows to show in the text display lists. |
static String |
DEFAULT_SKIN_NAME
The default UI skin name. |
static boolean |
editorLineWrap
When true, generated editor text areas follow a line-wrapping policy. |
static int |
FONT_EDIT
An indicator of the editor font (#6). |
static int |
FONT_GRAPH
An indicator of the graph font (#10). |
static int |
FONT_HELP
An indicator of the help font (#8). |
static int |
FONT_LABEL
An indicator of the label font (#3). |
static int |
FONT_MENU
An indicator of the menu font (#2). |
static int |
FONT_MONO
An indicator of the monospaced font (#5). |
static int |
FONT_MSG
An indicator of the message font (#4). |
static int |
FONT_NOTE
An indicator of the note font (#9). |
static int |
FONT_SMALL
An indicator of the small font (#7). |
static int |
FONT_TINY
An indicator of the tiny font (#11). |
static int |
FONT_TITLE
An indicator of the title font (#1). |
static boolean |
halfVerticalGutter
When true, the editor's vertical gutter is set to half of the horizontal value. |
static String |
ICON_DEF
The extension string for default icons. |
static String |
ICON_DIS
The extension string for disabled icons. |
static String |
ICON_PRS
The extension string for pressed icons. |
static String |
ICON_SEL
The extension string for selected icons. |
static boolean |
initialNotes
When true, notes are initially visible upon opening the application. |
static int |
maxGutter
Maximum permitted editor gutter value. |
static String |
PROPERTY_diffTextAddedColor
Ceryle property determining the diff text added color. |
static String |
PROPERTY_diffTextRemovedColor
Ceryle property determining the diff text removed color. |
static String |
PROPERTY_editorBGColor
Ceryle property determining the editor background color. |
static String |
PROPERTY_editorCaretColor
Ceryle property determining the editor caret color. |
static String |
PROPERTY_editorFGColor
Ceryle property determining the editor foreground color. |
static String |
PROPERTY_editorFontFamily
Ceryle property determining the editor font family. |
static String |
PROPERTY_editorFontSize
Ceryle property determining the editor font size. |
static String |
PROPERTY_editorGutter
Ceryle property determining the editor gutter. |
static String |
PROPERTY_editorLineWrap
Ceryle property determining the editor line wrapping policy. |
static String |
PROPERTY_editorSBGColor
Ceryle property determining the editor selection (BG) color. |
static String |
PROPERTY_editorSFGColor
Ceryle property determining the editor selected text (FG) color. |
static String |
PROPERTY_pageLayout
Ceryle property determining the choice of displaying the eidtor view as a "page layout". |
static File |
skinDirectory
The default skin directory ("resource/skin/"). |
static boolean |
usePageLayout
When true, add an additional dim border around the editor text area, similar to the "page layout" view of a word processor. |
protected static boolean |
useToolTips
When true, use ToolTips. |
| Method Summary | |
|---|---|
static void |
borderize(JComponent component,
String title)
Attaches a titled, line border around the JComponent component, using the String title. |
static Border |
createBevelBorder()
Returns a Lowered BevelBorder with colors compatible with the rest of the layout. |
static JCheckBox |
createCheckBox(String name,
String tooltip,
boolean checked,
ItemListener listener)
Return a checkbox button provided with its features. |
static JCheckBoxMenuItem |
createCheckBoxMenuItem(String name,
String labelId,
String descId,
boolean enabled,
int key,
boolean checked,
EventListener listener)
Return a checkbox menu item provided with its features. |
static JPanel |
createComboBoxPanel(String title,
String tooltipText,
JComboBox combobox,
EventListener listener,
ListCellRenderer renderer)
Returns a labeled combobox provided its label text, etc. |
static JButton |
createDialogButton(String label,
String tooltip,
boolean enabled,
boolean small,
EventListener listener)
Returns a dialog button provided its parameters. |
static JTextField |
createEditableField(String content,
int columns,
EventListener listener)
Return an editable text field with width columns and optional String content (provide either an empty string or null if unwanted). |
static JPanel |
createFlowPanel()
Returns a JPanel managed by an left-aligned FlowLayout with color COLOR_BASE. |
static JFormattedTextField |
createFormattedField(String content,
int columns,
Format format,
PropertyChangeListener listener)
Return a editable text field with width columns and optional String content (provide either an empty string or null if unwanted). |
static JPanel |
createHelpPanel(JEditorPane ep,
String text)
Creates and returns a help panel, optionally supplied with its JEditorPane and help text. |
static Component |
createHpad()
A GUI utility that returns a horizontal padding of a default fixed width and no height. |
static ImageIcon |
createImageIcon(String basename)
Returns an ImageIcon given its base name basename (to, which "_def.gif" will be suffixed) or null if this should fail. |
static ImageIcon |
createImageIcon(String basename,
String ext)
Returns an ImageIcon given its base name basename and extension (which are simply concatenated to form the filename). |
static JLabel |
createLabel(String title,
String tooltip)
Returns a label, provided an optional title and optional tooltip text. |
static JMenu |
createMenu(String name,
int mnemonic)
Return a menu provided with an name and optional mnemonic. |
static JMenuItem |
createMenuItem(Action action,
String labelId,
String descId,
boolean enabled)
Return a menu item provided with an Action. |
static JMenuItem |
createMenuItem(String name,
String labelId,
String descId,
boolean enabled,
int key,
Object o)
Return a menu item provided with its features. |
static JPanel |
createPanel()
Returns a JPanel managed by a BorderLayout with color COLOR_BASE. |
static JRadioButton |
createRadioButton(String id,
String label,
String toolTip,
EventListener listener,
ButtonGroup group)
Creates a radio button, provided with its properties, IDs, labels, etc. |
static JRadioButtonMenuItem |
createRadioButtonMenuItem(String id,
String label,
String toolTip,
int key,
ActionListener listener,
ButtonGroup group)
Creates a radio button, provided with its properties, IDs, labels, etc. |
static JScrollPane |
createScrollableTextArea(JTextArea textArea,
Document doc)
Provided with a JTextArea, sets up some default attributes and surrounds it with a scrollable pane, returning the scrollPane. |
static JScrollPane |
createScrollableTextArea(JTextArea textArea,
Document doc,
int vsbPolicy,
int hsbPolicy)
Provided with a JTextArea, sets up some default attributes and surrounds it with a scrollable pane, returning the scrollPane. |
static JScrollPane |
createScrollableTextPane(JTextPane textPane)
This calls createScrollableTextPane(JTextPane,int,int)
with defaults for the scrollbars (vertical always, horizontal as needed). |
static JScrollPane |
createScrollableTextPane(JTextPane textPane,
int vsbPolicy,
int hsbPolicy)
Provided with a JTextPane, sets up some default attributes and surrounds it with a scrollable pane, returning the scrollPane. |
static Component |
createVpad()
A GUI utility that returns a vertical padding of a default fixed height and no width. |
static JPanel |
createXBoxPanel()
Returns a JPanel managed by an X axis BoxLayout with color COLOR_BASE. |
static JPanel |
createYBoxPanel()
Returns a JPanel managed by a Y axis BoxLayout with color COLOR_BASE. |
static JScrollPane |
decorateEditableTextArea(JTextArea textarea)
Decorates a JTextArea as an editable field, returning a JScrollPane wrapper around it. |
static Font |
getFont(int number)
Returns a font, given its number (1-10). |
static int |
getGutter()
Returns the current setting of the gutter (the space between the edge of the "page" and the text in text areas). |
static String |
getStyleString(int number,
String source)
Returns the source String, wrapped by a <div> element containing the font style information for the font having number (1-10). |
static boolean |
isSkinned()
Returns true if the UI is skinned. |
static int |
setGutter(int value)
Sets the the gutter (the space between the edge of the "page" and the text in text areas). |
static void |
setLookAndFeel()
Set the Look and Feel of the GUI window according to properties from the PropertyManager. |
static void |
setSkin(String name)
Sets the application skin colors to the skin named name (based on an external properties file). |
static void |
setSkinned(boolean state)
Set the skinned state to the provided boolean. |
static void |
setToolTip(JComponent component,
String tip)
If useToolTips is true, sets the tool tip on JComponent component to the String tip. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int FONT_TITLE
getFont(int).
public static final int FONT_MENU
getFont(int).
public static final int FONT_LABEL
getFont(int).
public static final int FONT_MSG
getFont(int).
public static final int FONT_MONO
getFont(int).
public static final int FONT_EDIT
getFont(int).
public static final int FONT_SMALL
getFont(int).
public static final int FONT_HELP
getFont(int).
public static final int FONT_NOTE
getFont(int).
public static final int FONT_GRAPH
getFont(int).
public static final int FONT_TINY
getFont(int).
public static Color COLOR_TRANSPARENT
public static Color COLOR_BASE
public static Color COLOR_UI
public static Color COLOR_UI_TINT
public static Color COLOR_UI_LIGHT
public static Color COLOR_UI_DIM
public static Color COLOR_UI_DARK
public static Color COLOR_UI_GRAY
public static Color COLOR_UI_LIGHTGRAY
public static Color COLOR_UI_DARKGRAY
public static Color COLOR_MESSAGE_FORE
public static Color COLOR_MESSAGE_BACK
public static Color COLOR_DIM
public static Color COLOR_DIMMER
public static Color COLOR_STATUS
public static Color COLOR_STATUS_DIM
public static Color COLOR_PROGRESS
public static Color COLOR_PROGRESS_DIM
public static Color COLOR_NOTICEABLE
public static Color COLOR_SKY_BLUE
public static Color COLOR_DIFF_ADDED
public static Color COLOR_DIFF_REMOVED
public static Color COLOR_TEXT_FG
public static Color COLOR_TEXT_BG
public static Color COLOR_TEXT_SFG
public static Color COLOR_TEXT_SBG
public static Color COLOR_TEXT_CARET
public static Color COLOR_ED_TEXT_FG
public static Color COLOR_ED_TEXT_BG
public static Color COLOR_ED_TEXT_SFG
public static Color COLOR_ED_TEXT_SBG
public static Color COLOR_ED_TEXT_CARET
public static Color COLOR_DASHED
public static final String PROPERTY_editorFGColor
public static final String PROPERTY_editorBGColor
public static final String PROPERTY_editorSFGColor
public static final String PROPERTY_editorSBGColor
public static final String PROPERTY_editorCaretColor
public static final String PROPERTY_pageLayout
public static final String PROPERTY_editorGutter
public static final String PROPERTY_editorFontFamily
public static final String PROPERTY_editorFontSize
public static final String PROPERTY_editorLineWrap
public static final String PROPERTY_diffTextAddedColor
public static final String PROPERTY_diffTextRemovedColor
public static boolean editorLineWrap
protected static boolean useToolTips
public static boolean buttonBordersPainted
public static boolean initialNotes
public static boolean usePageLayout
public static int maxGutter
public static boolean halfVerticalGutter
public static int DEFAULT_ROW_COUNT
public static String ICON_DEF
public static final String ICON_DIS
public static final String ICON_SEL
public static final String ICON_PRS
public static File skinDirectory
public static final String DEFAULT_SKIN_NAME
| Method Detail |
|---|
public static int getGutter()
public static int setGutter(int value)
maxGutter
will simply be ignored. The current gutter setting is returned.
public static Font getFont(int number)
Services.getFont(int)public static boolean isSkinned()
public static void setSkinned(boolean state)
public static void setSkin(String name)
public static String getStyleString(int number,
String source)
Services.getFont(int)public static JPanel createPanel()
COLOR_BASE.
public static JPanel createFlowPanel()
COLOR_BASE. Uses default x=8, y=4 gaps.
public static JPanel createXBoxPanel()
COLOR_BASE.
public static JPanel createYBoxPanel()
COLOR_BASE.
public static JLabel createLabel(String title,
String tooltip)
public static JButton createDialogButton(String label,
String tooltip,
boolean enabled,
boolean small,
EventListener listener)
public static JRadioButton createRadioButton(String id,
String label,
String toolTip,
EventListener listener,
ButtonGroup group)
id - the optional identifier for the button, also used as the action command.label - the optional label used in lieu of a button icon.toolTip - the optional String text used for the tool tip.listener - the optional ActionListener used to listen for button and mouse events.group - the button group of which this button is a member.
public static JRadioButtonMenuItem createRadioButtonMenuItem(String id,
String label,
String toolTip,
int key,
ActionListener listener,
ButtonGroup group)
id - the optional identifier for the button, also used as the action command.label - the label used as the menu item texttoolTip - the optional String text used for the tool tip.key - the menu item accelerator keystrokelistener - the optional ActionListener used to listen for button and mouse events.group - the button group of which this button is a member.
public static JCheckBox createCheckBox(String name,
String tooltip,
boolean checked,
ItemListener listener)
name - the menu item mnemonic identifiertooltip - the optional tool tip textchecked - the initial checked statelistener - the item listener used to respond to activity
public static JMenuItem createMenuItem(String name,
String labelId,
String descId,
boolean enabled,
int key,
Object o)
name - the menu item mnemonic identifierlabelId - the i18n label iddescId - the i18n tooltip idenabled - the initial enabled statekey - the menu item accelerator keystrokeo - either an ActionListener or an Action used to respond to activity
public static JMenu createMenu(String name,
int mnemonic)
public static JMenuItem createMenuItem(Action action,
String labelId,
String descId,
boolean enabled)
action - the action upon which to base this menu itemlabelId - the ID of the menu item textdescId - the ID of the menu item accessible description textenabled - the initial enabled state
public static JCheckBoxMenuItem createCheckBoxMenuItem(String name,
String labelId,
String descId,
boolean enabled,
int key,
boolean checked,
EventListener listener)
name - the menu item mnemonic identifierlabelId - the i18n label iddescId - the i18n tooltip idenabled - the initial enabled statekey - the menu item accelerator keystrokelistener - the ItemListener or ActionListener used to respond to activitychecked - the initial checked state
public static void borderize(JComponent component,
String title)
public static Border createBevelBorder()
public static JTextField createEditableField(String content,
int columns,
EventListener listener)
public static JFormattedTextField createFormattedField(String content,
int columns,
Format format,
PropertyChangeListener listener)
public static JScrollPane createScrollableTextArea(JTextArea textArea,
Document doc)
textArea - the JTextArea to usedoc - optionally, the text area's intended document content
public static JScrollPane createScrollableTextArea(JTextArea textArea,
Document doc,
int vsbPolicy,
int hsbPolicy)
textArea - the JTextArea to usedoc - optionally, the text area's intended document contentvsbPolicy - the vertical scrollbar policyhsbPolicy - the horizontal scrollbar policyJScrollPanepublic static JScrollPane decorateEditableTextArea(JTextArea textarea)
textarea - the JTextArea to decorate
public static JScrollPane createScrollableTextPane(JTextPane textPane)
createScrollableTextPane(JTextPane,int,int)
with defaults for the scrollbars (vertical always, horizontal as needed).
textPane - the JTextPane to use
public static JScrollPane createScrollableTextPane(JTextPane textPane,
int vsbPolicy,
int hsbPolicy)
Note that JTextPanes differ from JTextAreas in that the former can handle plaintext, HTML and RTF.
textPane - the JTextPane to usevsbPolicy - the vertical scrollbar policyhsbPolicy - the horizontal scrollbar policyJScrollPane
public static JPanel createHelpPanel(JEditorPane ep,
String text)
public static JPanel createComboBoxPanel(String title,
String tooltipText,
JComboBox combobox,
EventListener listener,
ListCellRenderer renderer)
public static Component createHpad()
public static Component createVpad()
public static void setToolTip(JComponent component,
String tip)
This property is "http://purl.org/ceryle/prop/#useToolTips".
public static void setLookAndFeel()
public static ImageIcon createImageIcon(String basename)
public static ImageIcon createImageIcon(String basename,
String ext)
ICON_DEF will be used.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||