Ontimize 5.2072EN

com.ontimize.gui.container
Class FormHeader

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended byjavax.swing.JComponent
              extended bycom.ontimize.gui.field.AbstractFormComponent
                  extended bycom.ontimize.gui.container.FormHeader
All Implemented Interfaces:
FormComponent, java.awt.image.ImageObserver, Internationalization, java.awt.MenuContainer, java.io.Serializable

public class FormHeader
extends AbstractFormComponent

This class implements the standard form header buttons (query, insert, delete...)

Author:
Imatia Innovation
See Also:
Serialized Form

Nested Class Summary
 
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  boolean borderbuttons
           
protected static java.lang.String CONFIRM_INSERT_ICON
          The key for confirm insert icon.
protected static java.lang.String CONFIRM_QUERY_ICON
          The key for confirm query icon.
static java.lang.String confirmInsertIcon
           
static java.lang.String confirmQueryIcon
           
protected static java.lang.String DELETE_ICON
          The key for delete icon.
static java.lang.String deleteIcon
           
static java.lang.String FORMHEADER
          The name of class.
protected  boolean highlightButtons
           
protected static java.lang.String INSERT_ICON
          The key for insert icon.
static java.lang.String insertIcon
           
protected  java.awt.event.MouseListener listenerHighlightButtons
           
protected  boolean opaquebuttons
           
protected static java.lang.String QUERY_ICON
          The key for query icon.
static java.lang.String queryIcon
           
static java.lang.String separatorIcon
           
static java.lang.String STANDARD_BUTTONS
          The key for standard buttons.
protected static java.lang.String UPDATE_ICON
          The key for update icon.
static java.lang.String updateIcon
           
static boolean useTextInButtons
           
 
Fields inherited from class com.ontimize.gui.field.AbstractFormComponent
defaultBottomMargin, defaultLeftMargin, defaultRightMargin, defaultTopMargin
 
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 java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
FormHeader(java.util.Hashtable params)
          The class constructor.
 
Method Summary
protected  void changeButton(javax.swing.JButton button)
           
protected  FormHeaderButton createAvancedQueryButton()
          Creates the advanced query button.
protected  FormHeaderButton createDeleteButton()
          Creates the delete button.
protected  FormHeaderButton createInsertButton()
          Creates the insert button.
protected  FormHeaderButton createQueryButton()
          Creates the query button.
protected  FormHeaderButton createUpdateButton()
          Creates the update button.
 java.lang.Object getConstraints(java.awt.LayoutManager parentLayout)
          Description method to return the constraints component to place correctly in parent container.
 void init(java.util.Hashtable params)
          Initializes parameters.
 
Methods inherited from class com.ontimize.gui.field.AbstractFormComponent
getTextsToTranslate, setComponentLocale, setResourceBundle
 
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, getAccessibleContext, 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, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, paramString, 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, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update, updateUI
 
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, isFocusable, 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, setEnabled, setVisible
 

Field Detail

FORMHEADER

public static final java.lang.String FORMHEADER
The name of class. Used by L&F to put UI properties.

Since:
5.2062EN
See Also:
Constant Field Values

useTextInButtons

public static boolean useTextInButtons

STANDARD_BUTTONS

public static final java.lang.String STANDARD_BUTTONS
The key for standard buttons.

See Also:
Constant Field Values

QUERY_ICON

protected static final java.lang.String QUERY_ICON
The key for query icon.


CONFIRM_QUERY_ICON

protected static final java.lang.String CONFIRM_QUERY_ICON
The key for confirm query icon.


queryIcon

public static java.lang.String queryIcon

confirmQueryIcon

public static java.lang.String confirmQueryIcon

INSERT_ICON

protected static final java.lang.String INSERT_ICON
The key for insert icon.


CONFIRM_INSERT_ICON

protected static final java.lang.String CONFIRM_INSERT_ICON
The key for confirm insert icon.


insertIcon

public static java.lang.String insertIcon

confirmInsertIcon

public static java.lang.String confirmInsertIcon

UPDATE_ICON

protected static final java.lang.String UPDATE_ICON
The key for update icon.


updateIcon

public static java.lang.String updateIcon

DELETE_ICON

protected static final java.lang.String DELETE_ICON
The key for delete icon.


deleteIcon

public static java.lang.String deleteIcon

separatorIcon

public static java.lang.String separatorIcon

listenerHighlightButtons

protected java.awt.event.MouseListener listenerHighlightButtons

borderbuttons

protected boolean borderbuttons

opaquebuttons

protected boolean opaquebuttons

highlightButtons

protected boolean highlightButtons
Constructor Detail

FormHeader

public FormHeader(java.util.Hashtable params)
The class constructor. Initializes parameters.

Parameters:
params - the Hashtable with parameters
Method Detail

init

public void init(java.util.Hashtable params)
Initializes parameters. the Hashtable with parameters

attribute values default required meaning
standardbuttons yes/no or a combination of letters:
q(query),u(update),i(insert),d(delete ),a(advanced query)

For example: "qui" -> only query,update and insert buttons will be showed
yes yes The standard buttons definition. Default value could be changed with: Form#STANDARD_BUTTONS
separator yes/no no no Creates a separator for this component.
borderbuttons default/none/raised/lowered or a color defined in ColorConstants. Moreover, it is also allowed a border defined in #BorderManager no The border for buttons in Form
highlightbuttons yes/no no no Sets the highlight in button property when mouse is entered. See AbstractButton#setContentAreaFilled(boolean)). This parameter requires opaque='no'.
opaquebuttons yes/no no no Data field opacity condition for Form buttons

Parameters:
params - The Hashtable with parameters

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
Overrides:
getConstraints in class AbstractFormComponent

createAvancedQueryButton

protected FormHeaderButton createAvancedQueryButton()
Creates the advanced query button. Adds rollover, icon and tip properties.

Returns:
the button

createQueryButton

protected FormHeaderButton createQueryButton()
Creates the query button. Adds rollover, icon and tip properties.

Returns:
the button

createInsertButton

protected FormHeaderButton createInsertButton()
Creates the insert button. Adds rollover, icon, tip and alttip properties.

Returns:
the button

createUpdateButton

protected FormHeaderButton createUpdateButton()
Creates the update button. Adds rollover, icon and tip properties.

Returns:
the button

createDeleteButton

protected FormHeaderButton createDeleteButton()
Creates the delete button. Adds rollover, icon and tip properties.

Returns:
the button

changeButton

protected void changeButton(javax.swing.JButton button)

Ontimize