public class ToggleImage extends JPanel implements FormComponent, AccessForm, IdentifiedElement
JPanel.AccessibleJPanelJComponent.AccessibleJComponentContainer.AccessibleAWTContainerComponent.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy| Modifier and Type | Field and Description |
|---|---|
static int |
ALARM |
protected ImageField |
alarmImage |
protected com.ontimize.gui.field.ToggleImage.AlarmImageObserver |
alarmImageObserver |
protected URL |
alarmImageURL |
static String |
ALIGN |
protected int |
alignment |
protected String |
attribute |
protected JLabel |
attributeLabel |
protected static int |
BOTTOM |
static String |
CENTER_STR |
protected int |
dim |
static String |
DIM |
protected ImageField |
disabledImage |
protected com.ontimize.gui.field.ToggleImage.DisabledImageObserver |
disabledImageObserver |
protected URL |
disabledImageURL |
protected FormPermission |
enabledPermission |
protected int |
high |
protected boolean |
isAlarmImage |
protected JPanel |
labelPanel |
protected int |
labelPosition |
protected String |
labelText |
static String |
LABELVISIBLE |
protected static int |
LEFT |
static String |
LEFT_STR |
protected int |
loadStatusAlarm |
protected int |
loadStatusDisabled |
protected int |
loadStatusOff |
protected int |
loadStatusOn |
static int |
NO |
static String |
NO_STR |
static int |
OFF |
protected ImageField |
offImage |
protected com.ontimize.gui.field.ToggleImage.OffImageObserver |
offImageObserver |
protected URL |
offImageURL |
static int |
ON |
protected ImageField |
onImage |
protected com.ontimize.gui.field.ToggleImage.OnImageObserver |
onImageObserver |
protected URL |
onImageURL |
protected JImage |
panelImage |
protected Form |
parentForm |
protected int |
preferredStatus |
protected boolean |
restricted |
protected static int |
RIGHT |
static String |
RIGHT_STR |
protected boolean |
show |
protected boolean |
showLabel |
protected int |
status |
static int |
TEXT |
static String |
TEXT_STR |
protected static int |
TOP |
static String |
VALIGN |
protected int |
valignment |
static String |
VISIBLE |
protected FormPermission |
visiblePermission |
protected int |
width |
static int |
YES |
static String |
YES_STR |
accessibleContext, 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_TIPABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH| Constructor and Description |
|---|
ToggleImage(Hashtable parameters) |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
checkEnabledPermission() |
protected boolean |
checkVisiblePermission() |
protected void |
finalize() |
Object |
getAttribute()
Gets the object attribute.
|
Object |
getConstraints(LayoutManager layout)
Description method to return the
constraints component to
place correctly in parent container. |
Point |
getImageOffset() |
Insets |
getInsets() |
int |
getStatus() |
Vector |
getTextsToTranslate()
Returns all the texts in the element suitable for being translated.
|
void |
init(Hashtable parameters)
Initializes parameters.
|
void |
initPermissions() |
boolean |
isHidden() |
boolean |
isLabelVisible() |
boolean |
isRestricted() |
void |
setCallFormAlarm(boolean callAlarmForma) |
void |
setComponentLocale(Locale l) |
void |
setEnabled(boolean enabled)
Description method to set enabled or not the component according the
boolean condition in parameter.
|
void |
setParentForm(Form parentForm)
Method declaration to set the form that contains the component.
|
void |
setResourceBundle(ResourceBundle resources)
Sets the language resource bundle.
|
void |
setStatus(int status)
This method sets the component status and update the image
|
void |
setVisible(boolean visible)
Description method to set visible or not the component according the
boolean condition in parameter.
|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUIaddAncestorListener, 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, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, 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, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, 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, unregisterKeyboardAction, updateadd, add, add, add, add, addContainerListener, addImpl, 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, setLayout, 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, imageUpdate, 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, getClass, hashCode, notify, notifyAll, wait, wait, waitisEnabledpublic static final int ON
public static final int OFF
public static final int ALARM
protected static final int TOP
protected static final int LEFT
protected static final int BOTTOM
protected static final int RIGHT
public static final String RIGHT_STR
public static final String LEFT_STR
public static final String CENTER_STR
public static final String LABELVISIBLE
public static final String VISIBLE
public static final int NO
public static final int YES
public static final int TEXT
public static final String DIM
public static final String YES_STR
public static final String TEXT_STR
public static final String NO_STR
public static final String ALIGN
public static final String VALIGN
protected int alignment
protected int valignment
protected int labelPosition
protected int status
protected int preferredStatus
protected int loadStatusOn
protected int loadStatusOff
protected int loadStatusAlarm
protected int loadStatusDisabled
protected ImageField onImage
protected ImageField offImage
protected ImageField alarmImage
protected ImageField disabledImage
protected URL onImageURL
protected URL offImageURL
protected URL alarmImageURL
protected URL disabledImageURL
protected String attribute
protected String labelText
protected int width
protected int high
protected int dim
protected JLabel attributeLabel
protected JPanel labelPanel
protected JImage panelImage
protected boolean isAlarmImage
protected Form parentForm
protected FormPermission visiblePermission
protected FormPermission enabledPermission
protected boolean showLabel
protected boolean show
protected com.ontimize.gui.field.ToggleImage.OnImageObserver onImageObserver
protected com.ontimize.gui.field.ToggleImage.OffImageObserver offImageObserver
protected com.ontimize.gui.field.ToggleImage.AlarmImageObserver alarmImageObserver
protected com.ontimize.gui.field.ToggleImage.DisabledImageObserver disabledImageObserver
protected boolean restricted
public ToggleImage(Hashtable parameters)
public void init(Hashtable parameters)
| attribute | values | default | required | meaning |
| attr | yes | The field attribute. | ||
| alarm | on/off | no | When enabled image blinks between state image and alarm image. | |
| align | center/left/right | center | no | The alignment for field. |
| valign | center/top/bottom | top | no | The vertical alignment for field. |
| dim | no/text/yes | no | no | The resize possibilities (no resize, resize the insertion space, resize the space between label and text ). |
| imgOn | no | The image for on state. | ||
| imgOff | no | The image for off state | ||
| imgAlarm | no | The image for alarm state. | ||
| imgDisabled | no | The image for disabled state. | ||
| rotate | yes/no | no | no | Rotation of field. When this feature is enabled, height and width for image are interchanged. |
| status | on/off | no | Initial state for component. | |
| width | no | Width of field. | ||
| height | no | Height of field. | ||
| label | left/right/top/bottom | bottom | Position of label respect of text. | |
| labelvisible | yes/no | yes | The label visibility. | |
| text | yes/no | yes | Alternative for attr text. |
init in interface FormComponentparameters - the hashtable with pairs (Key,Value). For example:
| Key | Value |
| align | center |
| attr | attribute |
| ... | ... |
public void setComponentLocale(Locale l)
setComponentLocale in interface Internationalizationpublic Vector getTextsToTranslate()
InternationalizationgetTextsToTranslate in interface Internationalizationpublic void setResourceBundle(ResourceBundle resources)
InternationalizationsetResourceBundle in interface Internationalizationresources - the new language bundle.public Object getConstraints(LayoutManager layout)
FormComponentconstraints component to
place correctly in parent container.
getConstraints in interface FormComponentlayout - the parent container referencepublic Object getAttribute()
IdentifiedElementgetAttribute in interface IdentifiedElementpublic Insets getInsets()
getInsets in class JComponentpublic void setStatus(int status)
status - public int getStatus()
public void setParentForm(Form parentForm)
AccessFormsetParentForm in interface AccessFormparentForm - the form referencepublic void setCallFormAlarm(boolean callAlarmForma)
protected void finalize()
throws Throwable
public void setEnabled(boolean enabled)
FormComponentsetEnabled in interface FormComponentsetEnabled in class JComponentenabled - the enabled conditionpublic Point getImageOffset()
public void setVisible(boolean visible)
FormComponentsetVisible in interface FormComponentsetVisible in class JComponentvisible - the visibility conditionpublic void initPermissions()
initPermissions in interface SecureElementprotected boolean checkVisiblePermission()
protected boolean checkEnabledPermission()
public boolean isRestricted()
isRestricted in interface SecureElementpublic boolean isLabelVisible()
public boolean isHidden()
Copyright © 2016 Imatia Innovation S.L.. All rights reserved.