Ontimize 5.2072EN

com.ontimize.gui.field
Class HyperlinkLabel

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended byjavax.swing.JComponent
              extended byjavax.swing.JPanel
                  extended bycom.ontimize.gui.field.Label
                      extended bycom.ontimize.gui.field.HyperlinkLabel
All Implemented Interfaces:
AccessForm, javax.accessibility.Accessible, FormComponent, HyperlinkComponent, IdentifiedElement, java.awt.image.ImageObserver, Internationalization, java.awt.MenuContainer, SecureElement, java.io.Serializable

public class HyperlinkLabel
extends Label
implements HyperlinkComponent

This class implements a sensitive hyperlink label. It allows developers to open a detail form from a normal field (in this case a label) which is inserted in the source form. Several parameters can be set to show different layouts, such as, icon, background color, underlined option, and so on.

s

Author:
Imatia Innovation
See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class com.ontimize.gui.field.Label
Label.EJLabel
 
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
protected  CreateFormInDialog action
          The reference to create a form in a dialog.
protected  boolean activated
          The activated condition.
protected static java.awt.Color DISABLE_COLOR
          The disabled color.
protected  java.util.Hashtable equivalences
          The equivalences Hashtable.
protected  java.lang.String formName
          A reference for the name of form.
protected  java.lang.String formsManagerName
          The name of forms manager.
protected  java.lang.String keyTitle
          The key for the title.
protected  java.awt.event.MouseListener mouseListener
          The reference to mouse listener.
 
Fields inherited from class com.ontimize.gui.field.Label
ALIGN, alignment, alignmentV, ATTR, attribute, bold, BOLD, BOTTOM, CENTER, DEFAULT_BOTTOM_MARGIN, DEFAULT_LABEL_LEFT_MARGIN, DEFAULT_LABEL_RIGHT_MARGIN, DEFAULT_PARENT_MARGIN, DEFAULT_TOP_MARGIN, dim, FONT, fontColor, FONTCOLOR, fontSize, FONTSIZE, incrementalFont, label, labelSize, LEFT, MARGIN, originalSize, parentForm, permissionsActived, permissionVisible, resourceFile, restricted, RIGHT, SIZE, TEXT, textLabel, VALIGN
 
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
HyperlinkLabel(java.util.Hashtable parameters)
          The class constructor.
 
Method Summary
protected  void activateLink()
           
protected  java.awt.event.MouseAdapter createMouseListener()
           
 void init(java.util.Hashtable parameters)
          Calls to super() to initialize parameters.
 boolean isEnabled()
          Description method to check when a component is or not enabled.
 void setEnabled(boolean enabled)
          Activates the label component.
 
Methods inherited from class com.ontimize.gui.field.Label
checkEnabledPermission, checkVisiblePermission, getAttribute, getConstraints, getLabel, getText, getTextsToTranslate, initPermissions, isFocusable, isRestricted, setBold, setComponentLocale, setFontColor, setFontSize, setParentForm, setResourceBundle, setText, setVisible, updateFont, updateUI
 
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, 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
 

Field Detail

mouseListener

protected java.awt.event.MouseListener mouseListener
The reference to mouse listener. By default, null.


action

protected CreateFormInDialog action
The reference to create a form in a dialog. By default, null.


formName

protected java.lang.String formName
A reference for the name of form. By default, null.


formsManagerName

protected java.lang.String formsManagerName
The name of forms manager. By default, null.


keyTitle

protected java.lang.String keyTitle
The key for the title. By default, " ".


DISABLE_COLOR

protected static java.awt.Color DISABLE_COLOR
The disabled color. By default, black.

See Also:
Color.brighter()

activated

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


equivalences

protected java.util.Hashtable equivalences
The equivalences Hashtable.

Constructor Detail

HyperlinkLabel

public HyperlinkLabel(java.util.Hashtable parameters)
               throws java.lang.IllegalArgumentException
The class constructor. Calls to super() with parameters.

Throws:
java.lang.IllegalArgumentException - when an Exception occurs
Method Detail

createMouseListener

protected java.awt.event.MouseAdapter createMouseListener()

isEnabled

public boolean isEnabled()
Description copied from interface: FormComponent
Description method to check when a component is or not enabled.

Specified by:
isEnabled in interface FormComponent

setEnabled

public void setEnabled(boolean enabled)
Description copied from class: Label
Activates the label component.

Specified by:
setEnabled in interface FormComponent
Overrides:
setEnabled in class Label
Parameters:
enabled - the boolean to activate

activateLink

protected void activateLink()

init

public void init(java.util.Hashtable parameters)
Calls to super() to initialize parameters.

Specified by:
init in interface FormComponent
Overrides:
init in class Label
Parameters:
parameters - the Hashtable with parameters.

attribute values default required meaning
fmanager yes Name of form manager responsible of the form creation.
form yes Form name. Keys are needed in form.
title no The title of form. Do not confuse with the text parameter, which is the text for this label
underlined yes/no yes no underlined text option
equivalences no The equivalences between navigation form fields and the form where component is placed. For instance, it can be useful when alias are used
The format must be:
nav1=val1
nav2=val2

Ontimize