|
Ontimize 5.2072EN | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
com.ontimize.gui.field.DataField
com.ontimize.gui.field.TextFieldDataField
com.ontimize.gui.field.DateDataField
The main class for creating a field to introduce a date. It adds the
parameter calendar. that indicates if a dialog box with the
calendar to set the date.
| Nested Class Summary | |
class |
DateDataField.CloseAction
Class to define the action performed to close the window. |
| Nested classes inherited from class com.ontimize.gui.field.TextFieldDataField |
TextFieldDataField.EJTextField, TextFieldDataField.InnerDocumentListener |
| Nested classes inherited from class com.ontimize.gui.field.DataField |
DataField.AuxPanel, DataField.CopyActionListener, DataField.ELabel, DataField.FieldButton, DataField.FieldFocusListener, DataField.InfoMouseListener, DataField.ToggleButton |
| 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 javax.swing.JMenuItem |
advancedHelpBMenu
A reference to a possible advance help menu. |
protected javax.swing.JButton |
calendarButton
A reference to calendar button |
protected boolean |
calendarChange
Indicates the form to notify the calendar change event. |
protected VisualCalendarComponent |
calendarComp
Implements a calendar with selectable year, month and day. |
protected java.lang.String |
calendarTitleKey
Indicates to set the title to the calendar, by default "calendar". |
static boolean |
DEBUG_DATE
Uses only in case of debug mode. |
protected boolean |
emphasizeInvalidDate
Indicates if the date must be emphasized with a different color when it is invalid. |
protected java.awt.Frame |
frame
A reference to the parent frame used to select a date. |
protected java.util.Locale |
locale
A reference to the default locale. |
protected java.util.GregorianCalendar |
mainCalendar
A reference to the Gregorian Calendar. |
protected EJDialog |
vCalendar
Especial dialog with the functionality that Esc key throws the event WINDOW_CLOSING. |
| Fields inherited from class com.ontimize.gui.field.TextFieldDataField |
disabledTextColor, innerListener |
| 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.AdvancedDataComponent |
ADVANCED_QUERY |
| Fields inherited from interface com.ontimize.gui.field.DataComponent |
COMP_FOCUS_YELLOW, GREEN_VERY_LIGHT, LIGHT_GRAY_BLUE, LIGHT_GREYISH_BLUE, VERY_LIGHT_BLUE, VERY_LIGHT_GRAY, VERY_LIGHT_PINK, VERY_LIGHT_RED, VERY_LIGHT_SKYBLUE, VERY_LIGHT_YELLOW, VERY_LIGHT_YELLOW_2 |
| 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, PROPERTIES, SOMEBITS |
| Constructor Summary | |
DateDataField(java.util.Hashtable parameters)
The class constructor. |
|
| Method Summary | |
protected void |
colorSelection(javax.swing.event.DocumentEvent e)
Selects the text color in function of field content. |
protected void |
createPopupMenu()
Creates a Pop-up Menu to advanced search help. |
void |
deleteData()
Deletes the date of the data field. |
void |
format()
Creates the correct representation for the date in data field. |
void |
free()
Releases the frame. |
java.awt.Dimension |
getDataFieldPreferredSize()
This method returns the preferred size for data field to contain a date in correct format. |
java.lang.Object |
getDateValue()
Gets the Date value. |
static java.util.Locale |
getSameCountryLocale(java.util.Locale loc)
|
int |
getSQLDataType()
Gets the SQL data type for specified data types. |
java.lang.Object |
getValue()
Gets the Timestamp value. |
void |
hiddenCalendar()
Hidden the calendar. |
void |
init(java.util.Hashtable parameters)
This method gets the Hashtable and creates the calendar,
the access button and implements the listeners.
|
protected void |
installInnerListener()
Installs a inner listener to get events by program. |
boolean |
isEmpty()
Checks the presence and validity of data. |
boolean |
isModified()
Returns true when data component has been modified. |
void |
setAdvancedQueryMode(boolean enable)
Sets the Component to support the advanced query mode state. |
void |
setComponentLocale(java.util.Locale loc)
Sets the Component Locale, to format date, specified in parameter. |
void |
setDocument(javax.swing.text.Document dateDocument)
|
void |
setEmphasizeInvalidDate(boolean highlight)
|
void |
setEnabled(boolean enabled)
Checks the variable that indicates if user has permission to introduce values into the datafield. |
void |
setParentFrame(java.awt.Frame parentFrame)
Sets the parent Frame. |
void |
setResourceBundle(java.util.ResourceBundle res)
Sets the resource bundle. |
void |
setValue(java.lang.Object auxValue)
Sets the field value by program when auxValue is a instance
of java.sql.timestamp or java.util. |
void |
setValueFromComponent(java.lang.Object auxValue)
Sets the field value by user when auxValue is a instance of
java.sql.timestamp or java.util. |
void |
showCalendar(java.awt.Component c)
Shows the calendar. |
protected void |
showPopupMenu(java.awt.Component c,
int x,
int y)
Shows the Pop-up Menu. |
| Methods inherited from class com.ontimize.gui.field.TextFieldDataField |
createDataField, getAttribute, getInnerListenerEnabled, getInnerValue, getLabelComponentText, getText, isInnerValueEqual, isModifiable, isRequired, setInnerListenerEnabled, setInnerValue |
| 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, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, 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, 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, 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, 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, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface com.ontimize.gui.field.DataComponent |
getLabelComponentText, isHidden, isModifiable, isRequired, setModifiable, setRequired |
| Methods inherited from interface com.ontimize.gui.field.FormComponent |
getConstraints, isEnabled, setVisible |
| Methods inherited from interface com.ontimize.gui.i18n.Internationalization |
getTextsToTranslate |
| Methods inherited from interface com.ontimize.gui.field.IdentifiedElement |
getAttribute |
| Methods inherited from interface com.ontimize.gui.SecureElement |
initPermissions, isRestricted |
| Field Detail |
protected java.lang.String calendarTitleKey
protected java.awt.Frame frame
protected java.util.GregorianCalendar mainCalendar
protected boolean calendarChange
protected javax.swing.JButton calendarButton
protected java.util.Locale locale
protected boolean emphasizeInvalidDate
protected javax.swing.JMenuItem advancedHelpBMenu
public static boolean DEBUG_DATE
protected EJDialog vCalendar
protected VisualCalendarComponent calendarComp
| Constructor Detail |
public DateDataField(java.util.Hashtable parameters)
Document Listener.
parameters - a Hashtable with calendar and
calendarchange parameters| Method Detail |
public void setDocument(javax.swing.text.Document dateDocument)
public void init(java.util.Hashtable parameters)
Hashtable and creates the calendar,
the access button and implements the listeners.
init in interface FormComponentinit in class TextFieldDataFieldparameters - the Hashtable with parameters
| attribute | values | default | required | meaning |
| calendar | yes/no | no | Indicates whether a dialog box with a calendar will be showed. | |
| calendarchange | yes/no | no | no | Indicates the form to notify the change event in calendar values. By default, its value is 'no' and so, the changes are only showed when you abandon the calendar. |
| calendaricon | ImageManager.CALENDAR | no | Indicates the path to icon that shows the calendar. | |
| 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 |
public void hiddenCalendar()
public void showCalendar(java.awt.Component c)
c - Component to create graphical representation and user
interactionpublic void setEnabled(boolean enabled)
setEnabled in interface FormComponentsetEnabled in class DataFieldenabled - boolean to change permissionsprotected void colorSelection(javax.swing.event.DocumentEvent e)
e - public void format()
public void setValueFromComponent(java.lang.Object auxValue)
auxValue is a instance of
java.sql.timestamp or java.util. During the method execution the inner
Listener is disabled.
auxValue - Date or Timestamp ObjectValueEvent.USER_CHANGEpublic void setValue(java.lang.Object auxValue)
auxValue is a instance
of java.sql.timestamp or java.util. During the method execution the inner
Listener is disabled.
setValue in interface DataComponentauxValue - Date or Timestamp ObjectValueEvent.PROGRAMMATIC_CHANGEpublic java.lang.Object getValue()
getValue in interface DataComponentjava.lang.RuntimeException - if any exception occurspublic java.lang.Object getDateValue()
java.lang.RuntimeException - if any exception occurspublic java.awt.Dimension getDataFieldPreferredSize()
public boolean isEmpty()
isEmpty in interface DataComponentisEmpty in class TextFieldDataFieldpublic void setParentFrame(java.awt.Frame parentFrame)
setParentFrame in interface OpenDialogparentFrame - the framepublic static java.util.Locale getSameCountryLocale(java.util.Locale loc)
public void setComponentLocale(java.util.Locale loc)
setComponentLocale in interface InternationalizationsetComponentLocale in class DataFieldpublic void free()
free in interface Freeablepublic int getSQLDataType()
getSQLDataType in interface DataComponentpublic void setAdvancedQueryMode(boolean enable)
setAdvancedQueryMode in interface AdvancedDataComponentenable - the condition to enable this statepublic boolean isModified()
isModified in interface DataComponentisModified in class DataFieldprotected void createPopupMenu()
createPopupMenu in class DataField
protected void showPopupMenu(java.awt.Component c,
int x,
int y)
showPopupMenu in class DataFieldc - the Component to showx - The x coordinatey - The y coordinatepublic void setResourceBundle(java.util.ResourceBundle res)
setResourceBundle in interface InternationalizationsetResourceBundle in class DataFieldres - the resource bundle to changepublic void deleteData()
deleteData in interface DataComponentdeleteData in class TextFieldDataFieldpublic void setEmphasizeInvalidDate(boolean highlight)
highlight - whether or not the emphasizeInvalidDate is enabledprotected void installInnerListener()
installInnerListener in class TextFieldDataField
|
Ontimize | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||