|
Ontimize 5.2072EN | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
com.ontimize.gui.field.Label
The main class to set graphic configuration to labels.
| Nested Class Summary | |
protected class |
Label.EJLabel
The class to create the label. |
| Nested classes inherited from class javax.swing.JPanel |
javax.swing.JPanel.AccessibleJPanel |
| Nested classes inherited from class javax.swing.JComponent |
javax.swing.JComponent.AccessibleJComponent |
| Nested classes inherited from class java.awt.Container |
java.awt.Container.AccessibleAWTContainer |
| Nested classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
| Field Summary | |
static java.lang.String |
ALIGN
The align property. |
protected int |
alignment
The alignment. |
protected int |
alignmentV
The alignment. |
static java.lang.String |
ATTR
The attr property. |
protected java.lang.Object |
attribute
The param attribute. |
protected boolean |
bold
The bolt writing condition. |
static java.lang.String |
BOLD
The bold property. |
static java.lang.String |
BOTTOM
The bottom property. |
static java.lang.String |
CENTER
The center property. |
static int |
DEFAULT_BOTTOM_MARGIN
The bottom margin. |
static int |
DEFAULT_LABEL_LEFT_MARGIN
The label left margin. |
static int |
DEFAULT_LABEL_RIGHT_MARGIN
The label right margin. |
static int |
DEFAULT_PARENT_MARGIN
The parent margin. |
static int |
DEFAULT_TOP_MARGIN
The top margin. |
protected double |
dim
Variable to indicate the field resize. |
static java.lang.String |
FONT
|
protected java.awt.Color |
fontColor
The font color. |
static java.lang.String |
FONTCOLOR
The fontcolor property. |
protected int |
fontSize
The font size. |
static java.lang.String |
FONTSIZE
The fontsize property. |
protected boolean |
incrementalFont
The incremental font. |
protected javax.swing.JLabel |
label
The label. |
protected int |
labelSize
The label size. |
static java.lang.String |
LEFT
The left property. |
static java.lang.String |
MARGIN
|
protected int |
originalSize
The original size. |
protected Form |
parentForm
The parent form. |
protected FormPermission |
permissionsActived
The activation permission. |
protected FormPermission |
permissionVisible
The visibility permission. |
protected java.util.ResourceBundle |
resourceFile
The resource file. |
protected boolean |
restricted
Checks whether component is restricted. |
static java.lang.String |
RIGHT
The right property. |
static java.lang.String |
SIZE
The size property. |
static java.lang.String |
TEXT
The text property. |
protected java.lang.String |
textLabel
The text label. |
static java.lang.String |
VALIGN
The valign property. |
| Fields inherited from class javax.swing.JComponent |
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
| Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface com.ontimize.gui.field.FormComponent |
DEBUG |
| Fields inherited from interface com.ontimize.gui.i18n.Internationalization |
DEBUG_LANGUAGE |
| Fields inherited from interface com.ontimize.gui.SecureElement |
DESACTIVATE_COMPONENT_BY_PERMISSION_TIP |
| Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
Label(java.util.Hashtable parameters)
The class constructor. |
|
| Method Summary | |
protected boolean |
checkEnabledPermission()
Checks whether the component has permission to stay enabled. |
protected boolean |
checkVisiblePermission()
Checks whether visible permissions are active. |
java.lang.Object |
getAttribute()
Gets the attribute paramameter. |
java.lang.Object |
getConstraints(java.awt.LayoutManager parentLayout)
Get the alignment layout constraints. |
javax.swing.JLabel |
getLabel()
Gets the reference of a label. |
java.lang.String |
getText()
Gets the text from a label. |
java.util.Vector |
getTextsToTranslate()
Introduces in a Vector the textLabel. |
void |
init(java.util.Hashtable parameters)
This method gets the Hashtable and initializes the label with
parameters specified, also aligns the label.
|
void |
initPermissions()
Initializes the permissions. |
boolean |
isFocusable()
|
boolean |
isRestricted()
|
void |
setBold(boolean bold)
Changes the capitalization to bold. |
void |
setComponentLocale(java.util.Locale locale)
Changes the component locale. |
void |
setEnabled(boolean enabled)
Activates the label component. |
void |
setFontColor(java.awt.Color fontColor)
Changes the font color. |
void |
setFontSize(int fontSize)
Changes the font size. |
void |
setParentForm(Form f)
Sets the parent form. |
void |
setResourceBundle(java.util.ResourceBundle resources)
Changes the resource bundle. |
void |
setText(java.lang.String text)
Sets the text to a label. |
void |
setVisible(boolean visible)
Enables o disables the visualization permissions. |
void |
updateFont()
Updates the font size. |
void |
updateUI()
Updates the UI property. |
| Methods inherited from class javax.swing.JPanel |
getAccessibleContext, getUI, getUIClassID, paramString, setUI |
| Methods inherited from class javax.swing.JComponent |
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, unregisterKeyboardAction, update |
| Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, addImpl, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree |
| Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface com.ontimize.gui.field.FormComponent |
isEnabled |
| Field Detail |
public static int DEFAULT_TOP_MARGIN
DataField.DEFAULT_TOP_MARGINpublic static int DEFAULT_BOTTOM_MARGIN
DataField.DEFAULT_BOTTOM_MARGINpublic static int DEFAULT_LABEL_LEFT_MARGIN
DataField.DEFAULT_LABEL_LEFT_MARGINpublic static int DEFAULT_LABEL_RIGHT_MARGIN
DataField.DEFAULT_LABEL_RIGHT_MARGINpublic static int DEFAULT_PARENT_MARGIN
DataField.DEFAULT_PARENT_MARGINpublic static final java.lang.String ATTR
public static final java.lang.String TEXT
public static final java.lang.String ALIGN
public static final java.lang.String VALIGN
public static final java.lang.String LEFT
public static final java.lang.String RIGHT
public static final java.lang.String CENTER
public static final java.lang.String BOTTOM
public static final java.lang.String SIZE
public static final java.lang.String FONTSIZE
public static final java.lang.String FONT
public static final java.lang.String FONTCOLOR
public static final java.lang.String BOLD
public static final java.lang.String MARGIN
protected boolean bold
protected java.lang.Object attribute
getAttribute()protected java.awt.Color fontColor
Color.blackprotected int fontSize
protected int originalSize
protected boolean incrementalFont
protected int labelSize
protected java.lang.String textLabel
protected int alignment
GridBagConstraints.NORTHWESTprotected int alignmentV
GridBagConstraints.NORTHprotected Form parentForm
protected FormPermission permissionVisible
protected FormPermission permissionsActived
protected java.util.ResourceBundle resourceFile
protected javax.swing.JLabel label
protected double dim
protected boolean restricted
| Constructor Detail |
public Label(java.util.Hashtable parameters)
parameters - a Hashtable with label parameters| Method Detail |
public void init(java.util.Hashtable parameters)
Hashtable and initializes the label with
parameters specified, also aligns the label.
init in interface FormComponentparameters - the Hashtable with parameters
| attribute | values | default | required | meaning |
| attr | yes | The attribute | ||
| text | yes | The label text | ||
| align | right/left | no | The alignment | |
| valign | center/bottom | no | The vertical alignment | |
| size | no | The label size | ||
| icon | no | The icon for label | ||
| fontsize | no | The font size | ||
| fontcolor | black | no | The font color | |
| font | A string like : 'Arial-BOLD-18' (See #Font.decode()) | The default font for system | no | Font for data field. |
| bold | yes/no | no | The bold capitalization condition | |
| margin | no | The empty space around the label in its panel | ||
| dim | no/text/yes | no | no | The resize possibilities (no resize or resize, values yes and text are the same but both of them exist to maintain the same possibilities that other fields accept). |
public void updateFont()
public void setFontSize(int fontSize)
fontSize - the font sizepublic void setFontColor(java.awt.Color fontColor)
fontColor - the font colorpublic java.lang.Object getConstraints(java.awt.LayoutManager parentLayout)
getConstraints in interface FormComponentparentLayout - the layout to check
public void setComponentLocale(java.util.Locale locale)
setComponentLocale in interface Internationalizationlocale - the localepublic void setResourceBundle(java.util.ResourceBundle resources)
setResourceBundle in interface Internationalizationresources - the resourcepublic java.util.Vector getTextsToTranslate()
getTextsToTranslate in interface Internationalizationpublic java.lang.Object getAttribute()
getAttribute in interface IdentifiedElementpublic void setVisible(boolean visible)
setVisible in interface FormComponentvisible - the condition of visualizationpublic void setEnabled(boolean enabled)
setEnabled in interface FormComponentenabled - the boolean to activatepublic void initPermissions()
initPermissions in interface SecureElementprotected boolean checkVisiblePermission()
protected boolean checkEnabledPermission()
public void setParentForm(Form f)
setParentForm in interface AccessFormf - the parent formpublic void updateUI()
BOLD is true, also it calls to
updateFont()
public void setBold(boolean bold)
bold - sets bold capitalization.public void setText(java.lang.String text)
text - the text to put in the labelpublic java.lang.String getText()
public javax.swing.JLabel getLabel()
public boolean isRestricted()
isRestricted in interface SecureElementpublic boolean isFocusable()
|
Ontimize | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||