Ontimize 5.2072EN

com.ontimize.gui.button
Class Button

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended byjavax.swing.JComponent
              extended byjavax.swing.AbstractButton
                  extended byjavax.swing.JButton
                      extended bycom.ontimize.gui.button.Button
All Implemented Interfaces:
AccessForm, javax.accessibility.Accessible, java.util.EventListener, FormComponent, Freeable, HasHelpIdComponent, java.awt.image.ImageObserver, Internationalization, java.awt.ItemSelectable, java.awt.MenuContainer, java.awt.event.MouseListener, SecureElement, java.io.Serializable, javax.swing.SwingConstants
Direct Known Subclasses:
AttachmentFileButton, DeleteAttachmentButton, DownloadAttachmentFileButton, FormHeaderButton, GenerateReportButton, HelpButton, MoveBetweenTablesButton, OpenAppWindowsButton, OpenTemplateButton, QueryButton, RefreshTableButton

public class Button
extends javax.swing.JButton
implements FormComponent, AccessForm, Freeable, java.awt.event.MouseListener, SecureElement, HasHelpIdComponent

The class to create a button whose text changes in function of language.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class javax.swing.JButton
javax.swing.JButton.AccessibleJButton
 
Nested classes inherited from class javax.swing.AbstractButton
javax.swing.AbstractButton.AccessibleAbstractButton, javax.swing.AbstractButton.ButtonChangeListener
 
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
           
protected  int alignment
          The alignment.
protected  int alignmentV
          The vertical alignment.
protected  java.lang.String altIcon
          The reference to icon with alt key pressed.
protected  boolean altMode
          The alt mode state condition.
protected  java.lang.String alttext
          The reference to text with alt key pressed.
protected  java.lang.String altTip
          The reference to tip with alt key pressed.
protected  boolean bold
          The bold font condition.
static java.lang.String BORDERVISIBLE
           
protected  java.lang.String buttonKey
          The key to manages the button.
static java.lang.String DISABLEDICON
           
protected  FormPermission enabledPermission
          A enable permission reference.
protected  boolean focusable
          Condition about focusable.
protected  java.awt.Color fontColor
          The font color.
protected  int fontSize
          The font size.
protected  java.lang.String helpId
          The help identifier.
static java.lang.String HIGHLIGHT
           
protected  java.lang.String icon
          The icon reference.
static java.lang.String ICON
           
static java.lang.String ICONALIGN
           
static java.lang.String KEY
           
protected  java.lang.String keyStrokeText
          The text to show when key pressed from keyboard.
protected  int labelSize
          The label size.
static java.lang.String MARGIN
           
static java.lang.String OPAQUE
           
static java.lang.String PAINTFOCUS
           
protected  Form parentForm
          A reference to parent form.
protected  int preferredHeight
          The preferred height.
static java.lang.String PRESSEDICON
           
protected  java.util.ResourceBundle resourcesFileName
          A reference to resource bundle file.
protected  boolean restricted
          The restricted condition.
protected  boolean rollover
          The roll over condition.
static java.lang.String ROLLOVERICON
           
protected  boolean specifiedTooltip
          A condition to check if tooltip is specified.
protected  java.lang.String text
          The text to show in button.
static java.lang.String TEXT
           
static java.lang.String TIP
           
protected  java.lang.String tooltip
          The tooltip key.
static java.lang.String VALIGN
           
protected  FormPermission visiblePermission
          A visible permission reference.
 
Fields inherited from class javax.swing.AbstractButton
actionListener, BORDER_PAINTED_CHANGED_PROPERTY, changeEvent, changeListener, CONTENT_AREA_FILLED_CHANGED_PROPERTY, DISABLED_ICON_CHANGED_PROPERTY, DISABLED_SELECTED_ICON_CHANGED_PROPERTY, FOCUS_PAINTED_CHANGED_PROPERTY, HORIZONTAL_ALIGNMENT_CHANGED_PROPERTY, HORIZONTAL_TEXT_POSITION_CHANGED_PROPERTY, ICON_CHANGED_PROPERTY, itemListener, MARGIN_CHANGED_PROPERTY, MNEMONIC_CHANGED_PROPERTY, model, MODEL_CHANGED_PROPERTY, PRESSED_ICON_CHANGED_PROPERTY, ROLLOVER_ENABLED_CHANGED_PROPERTY, ROLLOVER_ICON_CHANGED_PROPERTY, ROLLOVER_SELECTED_ICON_CHANGED_PROPERTY, SELECTED_ICON_CHANGED_PROPERTY, TEXT_CHANGED_PROPERTY, VERTICAL_ALIGNMENT_CHANGED_PROPERTY, VERTICAL_TEXT_POSITION_CHANGED_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 javax.swing.SwingConstants
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
Button(java.util.Hashtable parameters)
          The class constructor.
 
Method Summary
protected  boolean checkEnabledPermission()
          Checks the enabled permission condition.
protected  boolean checkVisiblePermission()
          Checks the visible permission condition.
 void free()
          Makes the object to release the resources.
 java.lang.Object getAttribute()
          Gets the button attribute.
 java.lang.Object getConstraints(java.awt.LayoutManager parentLayout)
          Description method to return the constraints component to place correctly in parent container.
 java.lang.String getHelpIdString()
          Gets the help id string.
 java.lang.String getKey()
          Gets the button key.
 Form getParentForm()
           
 java.awt.Dimension getPreferredSize()
           
 java.lang.String getText(boolean translated)
          Gets the text button.
 java.util.Vector getTextsToTranslate()
          Gets the text to translate.
protected  java.lang.String getTextWithKeyStroke(java.lang.String text)
          Gets the keystroke text.
 void init(java.util.Hashtable parameters)
          Initializes parameters.
 void initPermissions()
          Initialize permissions.
 void installHelpId()
          Installs a help id.
protected  void installHighlight(java.util.Hashtable params)
           
 boolean isAltMode()
          Checks the alt mode state.
 boolean isFocusTraversable()
           
 boolean isRequestFocusEnabled()
           
 boolean isRestricted()
          Checks the restricted value.
 void mouseClicked(java.awt.event.MouseEvent e)
           
 void mouseEntered(java.awt.event.MouseEvent e)
           
 void mouseExited(java.awt.event.MouseEvent e)
           
 void mousePressed(java.awt.event.MouseEvent e)
           
 void mouseReleased(java.awt.event.MouseEvent e)
           
 void repaint()
           
 void setAltMode(boolean mode)
          Sets the alt mode state.
 void setBold(boolean bold)
          Sets the bold condition.
 void setBorderPainted(boolean border)
           
 void setComponentLocale(java.util.Locale l)
          Sets the locale component.
 void setEnabled(boolean enabled)
          Description method to set enabled or not the component according the boolean condition in parameter.
 void setFontColor(java.awt.Color fontColor)
          Sets the font color.
 void setFontSize(int fontSize)
          Sets the font size.
 void setKeyStrokeText(java.lang.String keyStrokeText)
          Sets the keystroke text and updates the tip.
 void setParentForm(Form f)
          Method declaration to set the form that contains the component.
 void setResourceBundle(java.util.ResourceBundle resources)
          Sets the language resource bundle.
 void setRollover(boolean rollover)
          Sets rollover.
 void setText(java.lang.String sText)
          Sets the text button. if text exists in resources file name, button text will be that file equivalence.
 void setTooltipKey(java.lang.String key)
          Sets the tooltip to a button.
 void setVisible(boolean vis)
          Description method to set visible or not the component according the boolean condition in parameter.
protected  void updateTip()
          Updates the tip.
 void updateUI()
           
 
Methods inherited from class javax.swing.JButton
configurePropertiesFromAction, getAccessibleContext, getUIClassID, isDefaultButton, isDefaultCapable, paramString, removeNotify, setDefaultCapable
 
Methods inherited from class javax.swing.AbstractButton
addActionListener, addChangeListener, addItemListener, checkHorizontalKey, checkVerticalKey, createActionListener, createActionPropertyChangeListener, createChangeListener, createItemListener, doClick, doClick, fireActionPerformed, fireItemStateChanged, fireStateChanged, getAction, getActionCommand, getActionListeners, getChangeListeners, getDisabledIcon, getDisabledSelectedIcon, getDisplayedMnemonicIndex, getHorizontalAlignment, getHorizontalTextPosition, getIcon, getIconTextGap, getItemListeners, getLabel, getMargin, getMnemonic, getModel, getMultiClickThreshhold, getPressedIcon, getRolloverIcon, getRolloverSelectedIcon, getSelectedIcon, getSelectedObjects, getText, getUI, getVerticalAlignment, getVerticalTextPosition, imageUpdate, init, isBorderPainted, isContentAreaFilled, isFocusPainted, isRolloverEnabled, isSelected, paintBorder, removeActionListener, removeChangeListener, removeItemListener, setAction, setActionCommand, setContentAreaFilled, setDisabledIcon, setDisabledSelectedIcon, setDisplayedMnemonicIndex, setFocusPainted, setHorizontalAlignment, setHorizontalTextPosition, setIcon, setIconTextGap, setLabel, setMargin, setMnemonic, setMnemonic, setModel, setMultiClickThreshhold, setPressedIcon, setRolloverEnabled, setRolloverIcon, setRolloverSelectedIcon, setSelected, setSelectedIcon, setUI, setVerticalAlignment, setVerticalTextPosition
 
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, 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, isValidateRoot, paint, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, 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, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, 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, 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

MARGIN

public static final java.lang.String MARGIN
See Also:
Constant Field Values

HIGHLIGHT

public static final java.lang.String HIGHLIGHT
See Also:
Constant Field Values

OPAQUE

public static final java.lang.String OPAQUE
See Also:
Constant Field Values

BORDERVISIBLE

public static final java.lang.String BORDERVISIBLE
See Also:
Constant Field Values

PAINTFOCUS

public static final java.lang.String PAINTFOCUS
See Also:
Constant Field Values

PRESSEDICON

public static final java.lang.String PRESSEDICON
See Also:
Constant Field Values

DISABLEDICON

public static final java.lang.String DISABLEDICON
See Also:
Constant Field Values

ROLLOVERICON

public static final java.lang.String ROLLOVERICON
See Also:
Constant Field Values

ICON

public static final java.lang.String ICON
See Also:
Constant Field Values

ICONALIGN

public static final java.lang.String ICONALIGN
See Also:
Constant Field Values

TIP

public static final java.lang.String TIP
See Also:
Constant Field Values

TEXT

public static final java.lang.String TEXT
See Also:
Constant Field Values

KEY

public static final java.lang.String KEY
See Also:
Constant Field Values

VALIGN

public static final java.lang.String VALIGN
See Also:
Constant Field Values

ALIGN

public static final java.lang.String ALIGN
See Also:
Constant Field Values

text

protected java.lang.String text
The text to show in button. By default, null.


alignment

protected int alignment
The alignment. By default, centered.


alignmentV

protected int alignmentV
The vertical alignment. By default, at top.


buttonKey

protected java.lang.String buttonKey
The key to manages the button. By default, null.


focusable

protected boolean focusable
Condition about focusable. By default, true.


tooltip

protected java.lang.String tooltip
The tooltip key.


specifiedTooltip

protected boolean specifiedTooltip
A condition to check if tooltip is specified. By default, false.


rollover

protected boolean rollover
The roll over condition. By default, false.


resourcesFileName

protected java.util.ResourceBundle resourcesFileName
A reference to resource bundle file. By default, null.


parentForm

protected Form parentForm
A reference to parent form. By default, null.


visiblePermission

protected FormPermission visiblePermission
A visible permission reference. By default, null.


enabledPermission

protected FormPermission enabledPermission
A enable permission reference. By default, null.


labelSize

protected int labelSize
The label size. By default, -1.


preferredHeight

protected int preferredHeight
The preferred height. By default, -1.


fontSize

protected int fontSize
The font size. By default, 12 pt.


fontColor

protected java.awt.Color fontColor
The font color. By default, black.


bold

protected boolean bold
The bold font condition. By default, false.


keyStrokeText

protected java.lang.String keyStrokeText
The text to show when key pressed from keyboard. By default, null.


helpId

protected java.lang.String helpId
The help identifier. By default, null.


icon

protected java.lang.String icon
The icon reference. By default, null.


altIcon

protected java.lang.String altIcon
The reference to icon with alt key pressed. By default, null.


alttext

protected java.lang.String alttext
The reference to text with alt key pressed. By default, null.


altTip

protected java.lang.String altTip
The reference to tip with alt key pressed. By default, null.


restricted

protected boolean restricted
The restricted condition. By default, false.


altMode

protected boolean altMode
The alt mode state condition. By default, false.

Constructor Detail

Button

public Button(java.util.Hashtable parameters)
The class constructor. It inits the parameters, sets text and updates tips and adds a mouse listener.

Parameters:
parameters - the hashtable with parameters from XML definition.
Method Detail

getConstraints

public java.lang.Object getConstraints(java.awt.LayoutManager parentLayout)
Description copied from interface: FormComponent
Description method to return the constraints component to place correctly in parent container.

Specified by:
getConstraints in interface FormComponent
Parameters:
parentLayout - the parent container reference
Returns:
the constraints for the component

getAttribute

public java.lang.Object getAttribute()
Gets the button attribute.

Returns:
the button key

init

public void init(java.util.Hashtable parameters)
Initializes parameters.

Specified by:
init in interface FormComponent
Parameters:
parameters - initialization parameters from XML file:

attribute values default required meaning
text empty string no Initial text is shown in button, before locale is established. By default, an empty string.
align left, right, center center no The button alignment.
key yes The reference to the button. It is used by form to return a button reference, so it must be unique in a FORM.
tip no The key used by bundle to translation. So, It must be present in bundle file.
labelsize no The size of label
fontsize 12 no The font size.
fontcolor black no The font color.
bold yes/no no The condition to use bold font.
border raised/lowered no The border definition style.
iconalign left, right,top, bottom left no Alignment for icon with respect to the text. Only important when icon and text are both presents.
mnemonic no The mnemonic for button.
rollover yes/no no The roll-over condition.
helpid no
height -1 no Preferred height in pixels for button.
disabledicon no The icon for button when is disabled
textalign left, center, right center no The text alignment.
alticon no Auxiliary icon when setAltMode is enabled.
alttext no Auxiliary text when setAltMode is enabled.
alttip no Auxiliary tip when setAltMode is enabled.
opaque yes/no yes no The opacity condition for buttons.
bordervisible yes/no yes no Visibility of button border.
font A string like : 'Arial-BOLD-18' (See #Font.decode()) The default font for system no Font for button text.
paintfocus yes/no yes Sets the focus paint property. See AbstractButton.setFocusPainted(boolean).
highlight yes/no no no Sets the highlight property when mouse is entered. See AbstractButton#setContentAreaFilled(boolean)). This parameter requires opaque='no'.
pressedicon 'yes' or the path to icon:
  • - 'yes': i.e. if 'button_name' is the name of button icon, it is mandatory that exists a button called 'button_name_pressed' that will be showed when it is pressed.
  • - the path to the icon to show.
no The button to show when it is pressed.

-Associations:
Key Code
VK_0 48
VK_1 49
VK_2 50
VK_3 51
VK_4 52
VK_5 53
VK_6 54
VK_7 55
VK_8 56
VK_9 57
VK_A 65
VK_ACCEPT 30
VK_ADD 107
VK_AGAIN 65481
VK_ALL_CANDIDATES 256
VK_ALPHANUMERIC 240
VK_ALT 18
VK_ALT_GRAPH 65406
VK_AMPERSAND 150
VK_ASTERISK 151
VK_AT 512
VK_B 66
VK_BACK_QUOTE 192
VK_BACK_SLASH 92
VK_BACK_SPACE 8
VK_BRACELEFT 161
VK_BRACERIGHT 162
VK_C 67
VK_CANCEL 3
VK_CAPS_LOCK 20
VK_CIRCUMFLEX 514
VK_CLEAR 12
VK_CLOSE_BRACKET 93
VK_CODE_INPUT 258
VK_COLON 513
VK_COMMA 44
VK_COMPOSE 65312
VK_CONTROL 17
VK_CONVERT 28
VK_COPY 65485
VK_CUT 65489
VK_D 68
VK_DEAD_ABOVEDOT 134
VK_DEAD_ABOVERING 136
VK_DEAD_ACUTE 129
VK_DEAD_BREVE 133
VK_DEAD_CARON 138
VK_DEAD_CEDILLA 139
VK_DEAD_CIRCUMFLEX 130
VK_DEAD_DIAERESIS 135
VK_DEAD_DOUBLEACUTE 137
VK_DEAD_GRAVE 128
VK_DEAD_IOTA 141
VK_DEAD_MACRON 132
VK_DEAD_OGONEK 140
VK_DEAD_SEMIVOICED_SOUND 143
VK_DEAD_TILDE 131
VK_DEAD_VOICED_SOUND 142
VK_DECIMAL 110
VK_DELETE 127
VK_DIVIDE 111
VK_DOLLAR 515
VK_DOWN 40
VK_E 69
VK_END 35
VK_ENTER 10
VK_EQUALS 61
VK_ESCAPE 27
VK_EURO_SIGN 516
VK_EXCLAMATION_MARK 517
VK_F 70
VK_F1 112
VK_F10 121
VK_F11 122
VK_F12 123
VK_F13 61440
VK_F14 61441
VK_F15 61442
VK_F16 61443
VK_F17 61444
VK_F18 61445
VK_F19 61446
VK_F2 113
VK_F20 61447
VK_F21 61448
VK_F22 61449
VK_F23 61450
VK_F24 61451
VK_F3 114
VK_F4 115
VK_F5 116
VK_F6 117
VK_F7 118
VK_F8 119
VK_F9 120
VK_FINAL 24
VK_FIND 65488
VK_FULL_WIDTH 243
VK_G 71
VK_GREATER 160
VK_H 72
VK_HALF_WIDTH 244
VK_HELP 156
VK_HIRAGANA 242
VK_HOME 36
VK_I 73
VK_INPUT_METHOD_ON_OFF 263
VK_INSERT 155
VK_INVERTED_EXCLAMATION_MARK 518
VK_J 74
VK_JAPANESE_HIRAGANA 260
VK_JAPANESE_KATAKANA 259
VK_JAPANESE_ROMAN 261
VK_K 75
VK_KANA 21
VK_KANA_LOCK 262
VK_KANJI 25
VK_KATAKANA 241
VK_KP_DOWN 225
VK_KP_LEFT 226
VK_KP_RIGHT 227
VK_KP_UP 224
VK_L 76
VK_LEFT 37
VK_LEFT_PARENTHESIS 519
VK_LESS 153
VK_M 77
VK_META 157
VK_MINUS 45
VK_MODECHANGE 31
VK_MULTIPLY 106
VK_N 78
VK_NONCONVERT 29
VK_NUM_LOCK 144
VK_NUMBER_SIGN 520
VK_NUMPAD0 96
VK_NUMPAD1 97
VK_NUMPAD2 98
VK_NUMPAD3 99
VK_NUMPAD4 100
VK_NUMPAD5 101
VK_NUMPAD6 102
VK_NUMPAD7 103
VK_NUMPAD8 104
VK_NUMPAD9 105
VK_O 79
VK_OPEN_BRACKET 91
VK_P 80
VK_PAGE_DOWN 34
VK_PAGE_UP 33
VK_PASTE 65487
VK_PAUSE 19
VK_PERIOD 46
VK_PLUS 521
VK_PREVIOUS_CANDIDATE 257
VK_PRINTSCREEN 154
VK_PROPS 65482
VK_Q 81
VK_QUOTE 222
VK_QUOTEDBL 152
VK_R 82
VK_RIGHT 39
VK_RIGHT_PARENTHESIS 522
VK_ROMAN_CHARACTERS 245
VK_S 83
VK_SCROLL_LOCK 145
VK_SEMICOLON 59
VK_SEPARATER 108
VK_SHIFT 16
VK_SLASH 47
VK_SPACE 32
VK_STOP 65480
VK_SUBTRACT 109
VK_T 84
VK_TAB 9
VK_U 85
VK_UNDEFINED 0
VK_UNDERSCORE 523
VK_UNDO 65483
VK_UP 38
VK_V 86
VK_W 87
VK_X 88
VK_Y 89
VK_Z 90

installHighlight

protected void installHighlight(java.util.Hashtable params)

getKey

public java.lang.String getKey()
Gets the button key.

Returns:
the buttonkey parameter

getTextsToTranslate

public java.util.Vector getTextsToTranslate()
Gets the text to translate.

Specified by:
getTextsToTranslate in interface Internationalization
Returns:
the vector with text and tooltip to translate

setResourceBundle

public void setResourceBundle(java.util.ResourceBundle resources)
Description copied from interface: Internationalization
Sets the language resource bundle. When the application changes the configured language, for all the objects that implement this interface this method must be called with the new file.
The method must translate all the elements that have texts in the GUI

Specified by:
setResourceBundle in interface Internationalization
Parameters:
resources - the new language bundle.

setComponentLocale

public void setComponentLocale(java.util.Locale l)
Sets the locale component.

Specified by:
setComponentLocale in interface Internationalization
Parameters:
l - the locale

setText

public void setText(java.lang.String sText)
Sets the text button. if text exists in resources file name, button text will be that file equivalence.

Parameters:
sText - the text string.

getTextWithKeyStroke

protected java.lang.String getTextWithKeyStroke(java.lang.String text)
Gets the keystroke text.

Parameters:
text - the basic button text
Returns:
the text to show

getText

public java.lang.String getText(boolean translated)
Gets the text button. If parameter translated is true, text button will be internationalized. In other case, returns the key.

Parameters:
translated - the condition to get text
Returns:
the text button

free

public void free()
Description copied from interface: Freeable
Makes the object to release the resources.

Specified by:
free in interface Freeable

setBorderPainted

public void setBorderPainted(boolean border)

setRollover

public void setRollover(boolean rollover)
Sets rollover.

Parameters:
rollover - the roll-over condition

mouseEntered

public void mouseEntered(java.awt.event.MouseEvent e)
Specified by:
mouseEntered in interface java.awt.event.MouseListener

mouseExited

public void mouseExited(java.awt.event.MouseEvent e)
Specified by:
mouseExited in interface java.awt.event.MouseListener

mouseClicked

public void mouseClicked(java.awt.event.MouseEvent e)
Specified by:
mouseClicked in interface java.awt.event.MouseListener

mousePressed

public void mousePressed(java.awt.event.MouseEvent e)
Specified by:
mousePressed in interface java.awt.event.MouseListener

mouseReleased

public void mouseReleased(java.awt.event.MouseEvent e)
Specified by:
mouseReleased in interface java.awt.event.MouseListener

setParentForm

public void setParentForm(Form f)
Description copied from interface: AccessForm
Method declaration to set the form that contains the component. This method must be called automatically during the form building.

Specified by:
setParentForm in interface AccessForm
Parameters:
f - the form reference

getParentForm

public Form getParentForm()

setVisible

public void setVisible(boolean vis)
Description copied from interface: FormComponent
Description method to set visible or not the component according the boolean condition in parameter.

Specified by:
setVisible in interface FormComponent

setEnabled

public void setEnabled(boolean enabled)
Description copied from interface: FormComponent
Description method to set enabled or not the component according the boolean condition in parameter.

Specified by:
setEnabled in interface FormComponent

repaint

public void repaint()

checkVisiblePermission

protected boolean checkVisiblePermission()
Checks the visible permission condition.

Returns:
the condition about visibility permissions

checkEnabledPermission

protected boolean checkEnabledPermission()
Checks the enabled permission condition.

Returns:
the enable permission condition.

initPermissions

public void initPermissions()
Initialize permissions.

Specified by:
initPermissions in interface SecureElement

getPreferredSize

public java.awt.Dimension getPreferredSize()

updateUI

public void updateUI()

setKeyStrokeText

public void setKeyStrokeText(java.lang.String keyStrokeText)
Sets the keystroke text and updates the tip.

Parameters:
keyStrokeText - the keystroke text

updateTip

protected void updateTip()
Updates the tip.

See Also:
JComponent.setToolTipText(String)

setBold

public void setBold(boolean bold)
Sets the bold condition.

Parameters:
bold - the bold condition.

setFontSize

public void setFontSize(int fontSize)
Sets the font size.

Parameters:
fontSize - the font size

setFontColor

public void setFontColor(java.awt.Color fontColor)
Sets the font color.

Parameters:
fontColor - the font color

isRestricted

public boolean isRestricted()
Checks the restricted value.

Specified by:
isRestricted in interface SecureElement
Returns:
the restricted condition

getHelpIdString

public java.lang.String getHelpIdString()
Gets the help id string.

Specified by:
getHelpIdString in interface HasHelpIdComponent
Returns:
the help id string

installHelpId

public void installHelpId()
Installs a help id.

Specified by:
installHelpId in interface HasHelpIdComponent
See Also:
HelpUtilities.setHelpIdString(Component, String)

setTooltipKey

public void setTooltipKey(java.lang.String key)
Sets the tooltip to a button.

Parameters:
key - the button key

isFocusTraversable

public boolean isFocusTraversable()

isRequestFocusEnabled

public boolean isRequestFocusEnabled()

setAltMode

public void setAltMode(boolean mode)
Sets the alt mode state.

Parameters:
mode - the mode condition

isAltMode

public boolean isAltMode()
Checks the alt mode state.

Returns:
the condition

Ontimize