public class ToggleButton extends JToggleButton implements FormComponent, AccessForm, Freeable, MouseListener, SecureElement, IdentifiedElement, HasHelpIdComponent
JToggleButton.AccessibleJToggleButton, JToggleButton.ToggleButtonModelAbstractButton.AccessibleAbstractButton, AbstractButton.ButtonChangeListenerJComponent.AccessibleJComponentContainer.AccessibleAWTContainerComponent.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy| Modifier and Type | Field and Description |
|---|---|
static String |
ALIGN |
protected int |
alignment
The alignment.
|
protected int |
alignmentV
The vertical alignment.
|
protected String |
altIcon
The reference to icon with alt key pressed.
|
protected boolean |
altMode
The alt mode state condition.
|
protected String |
alttext
The reference to text with alt key pressed.
|
protected String |
altTip
The reference to tip with alt key pressed.
|
protected boolean |
bold
The bold font condition.
|
protected String |
buttonKey
The key to manages the button.
|
protected boolean |
dimtext |
protected FormPermission |
enabledPermission
A enable permission reference.
|
protected boolean |
expand |
protected boolean |
focusable
Condition about focusable.
|
protected Color |
fontColor
The font color.
|
protected int |
fontSize
The font size.
|
protected String |
helpId
The help identifier.
|
protected String |
icon
The icon reference.
|
protected Insets |
insets |
static String |
KEY |
protected String |
keyStrokeText
The text to show when key pressed from keyboard.
|
protected int |
labelSize
The label size.
|
protected Form |
parentForm
A reference to parent form.
|
protected int |
preferredHeight
The preferred height.
|
protected ResourceBundle |
resourcesFileName
A reference to resource bundle file.
|
protected boolean |
restricted
The restricted condition.
|
protected boolean |
rollover
The roll over condition.
|
protected boolean |
specifiedTooltip
A condition to check if tooltip is specified.
|
protected String |
text
The text to show in button.
|
static String |
TEXT |
static String |
TIP |
protected String |
tooltip
The tooltip key.
|
static String |
VALIGN |
protected FormPermission |
visiblePermission
A visible permission reference.
|
protected double |
weightx |
protected double |
weighty |
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_PROPERTYaccessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOWBOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENTDEBUG_LANGUAGEDESACTIVATE_COMPONENT_BY_PERMISSION_TIPBOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WESTABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH| Constructor and Description |
|---|
ToggleButton(Hashtable parameters) |
| Modifier and Type | Method and Description |
|---|---|
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.
|
Object |
getAttribute()
Gets the button attribute.
|
Object |
getConstraints(LayoutManager parentLayout)
Description method to return the
constraints component to
place correctly in parent container. |
String |
getHelpIdString() |
String |
getKey()
Gets the button key.
|
Dimension |
getPreferredSize() |
Vector |
getTextsToTranslate()
Returns all the texts in the element suitable for being translated.
|
protected String |
getTextWithKeyStroke(String text)
Gets the keystroke text.
|
void |
init(Hashtable parameters)
Main method to init an object from parameters
hashtable. |
void |
initPermissions() |
void |
installHelpId() |
protected void |
installHighlight(Hashtable params) |
boolean |
isAltMode()
Checks the alt mode state.
|
boolean |
isRestricted() |
void |
mouseClicked(MouseEvent e) |
void |
mouseEntered(MouseEvent e) |
void |
mouseExited(MouseEvent e) |
void |
mousePressed(MouseEvent e) |
void |
mouseReleased(MouseEvent e) |
void |
setAltMode(boolean mode)
Sets the alt mode state.
|
void |
setBold(boolean bold)
Sets the bold condition.
|
void |
setComponentLocale(Locale l) |
void |
setFontColor(Color fontColor)
Sets the font color.
|
void |
setFontSize(int fontSize)
Sets the font size.
|
void |
setParentForm(Form form)
Method declaration to set the form that contains the component.
|
void |
setResourceBundle(ResourceBundle resources)
Sets the language resource bundle.
|
void |
setRollover(boolean rollover)
Sets rollover.
|
protected void |
updateTip()
Updates the tip.
|
getAccessibleContext, getUIClassID, paramString, updateUIactionPropertyChanged, addActionListener, addChangeListener, addImpl, addItemListener, checkHorizontalKey, checkVerticalKey, configurePropertiesFromAction, createActionListener, createActionPropertyChangeListener, createChangeListener, createItemListener, doClick, doClick, fireActionPerformed, fireItemStateChanged, fireStateChanged, getAction, getActionCommand, getActionListeners, getChangeListeners, getDisabledIcon, getDisabledSelectedIcon, getDisplayedMnemonicIndex, getHideActionText, 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, removeNotify, setAction, setActionCommand, setBorderPainted, setContentAreaFilled, setDisabledIcon, setDisabledSelectedIcon, setDisplayedMnemonicIndex, setEnabled, setFocusPainted, setHideActionText, setHorizontalAlignment, setHorizontalTextPosition, setIcon, setIconTextGap, setLabel, setLayout, setMargin, setMnemonic, setMnemonic, setModel, setMultiClickThreshhold, setPressedIcon, setRolloverEnabled, setRolloverIcon, setRolloverSelectedIcon, setSelected, setSelectedIcon, setText, setUI, setVerticalAlignment, setVerticalTextPositionaddAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, updateadd, add, add, add, add, addContainerListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, transferFocusDownCycle, validate, validateTreeaction, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, 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, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycleclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitisEnabled, setEnabled, setVisiblepublic static final String TIP
public static final String TEXT
public static final String KEY
public static final String VALIGN
public static final String ALIGN
protected String text
protected int alignment
protected int alignmentV
protected String buttonKey
protected boolean focusable
protected String tooltip
protected boolean specifiedTooltip
protected boolean rollover
protected ResourceBundle resourcesFileName
protected Form parentForm
protected FormPermission visiblePermission
protected FormPermission enabledPermission
protected int labelSize
protected int preferredHeight
protected int fontSize
protected Color fontColor
protected boolean bold
protected String keyStrokeText
protected String helpId
protected String icon
protected String altIcon
protected String alttext
protected String altTip
protected boolean restricted
protected boolean expand
protected boolean dimtext
protected double weighty
protected double weightx
protected Insets insets
protected boolean altMode
public Object getConstraints(LayoutManager parentLayout)
FormComponentconstraints component to
place correctly in parent container.
getConstraints in interface FormComponentparentLayout - the parent container referencepublic void init(Hashtable parameters) throws Exception
FormComponenthashtable.
init in interface FormComponentparameters - the hashtable with pairs (Key,Value). For example:
| Key | Value |
| align | center |
| attr | attribute |
| ... | ... |
Exception - when Exception occurspublic Object getAttribute()
getAttribute in interface IdentifiedElementprotected void installHighlight(Hashtable params)
public String getKey()
public void setBold(boolean bold)
bold - the bold condition.public void setFontSize(int fontSize)
fontSize - the font sizepublic void setFontColor(Color fontColor)
fontColor - the font colorpublic Vector getTextsToTranslate()
InternationalizationgetTextsToTranslate in interface Internationalizationpublic void setComponentLocale(Locale l)
setComponentLocale in interface Internationalizationpublic void setResourceBundle(ResourceBundle resources)
InternationalizationsetResourceBundle in interface Internationalizationresources - the new language bundle.protected void updateTip()
JComponent.setToolTipText(String)protected String getTextWithKeyStroke(String text)
text - the basic button textpublic void setParentForm(Form form)
AccessFormsetParentForm in interface AccessFormform - the form referencepublic void free()
throws Exception
Freeablepublic void setRollover(boolean rollover)
rollover - the roll-over conditionpublic void mouseEntered(MouseEvent e)
mouseEntered in interface MouseListenerpublic void mouseExited(MouseEvent e)
mouseExited in interface MouseListenerpublic void mouseClicked(MouseEvent e)
mouseClicked in interface MouseListenerpublic void mousePressed(MouseEvent e)
mousePressed in interface MouseListenerpublic void mouseReleased(MouseEvent e)
mouseReleased in interface MouseListenerpublic Dimension getPreferredSize()
getPreferredSize in class JComponentpublic void initPermissions()
initPermissions in interface SecureElementprotected boolean checkVisiblePermission()
protected boolean checkEnabledPermission()
public boolean isRestricted()
isRestricted in interface SecureElementpublic String getHelpIdString()
getHelpIdString in interface HasHelpIdComponentpublic void installHelpId()
installHelpId in interface HasHelpIdComponentpublic void setAltMode(boolean mode)
mode - the mode conditionpublic boolean isAltMode()
Copyright © 2016 Imatia Innovation S.L.. All rights reserved.