Class VDate

    • Field Detail

      • m_displayType

        protected int m_displayType
    • Constructor Detail

      • VDate

        public VDate()
        IDE Bean Constructor
      • VDate

        public VDate​(int displayType)
        Simple Constructor
        Parameters:
        displayType - display Type
      • VDate

        public VDate​(String columnName,
                     boolean mandatory,
                     boolean isReadOnly,
                     boolean isUpdateable,
                     int displayType,
                     String title)
        Create right aligned Date field
        Parameters:
        columnName - column name
        mandatory - mandatory
        isReadOnly - read only
        isUpdateable - updateable
        displayType - display type
        title - title
    • Method Detail

      • dispose

        public void dispose()
        Dispose
        Specified by:
        dispose in interface VEditor
      • setDocument

        protected void setDocument​(Document doc)
        Set Document
        Parameters:
        doc - doc
      • setReadWrite

        public void setReadWrite​(boolean value)
        Set ReadWrite - field is always r/o for Time or DateTime
        Specified by:
        setReadWrite in interface CEditor
        Parameters:
        value - value
      • isReadWrite

        public boolean isReadWrite()
        IsReadWrite
        Specified by:
        isReadWrite in interface CEditor
        Returns:
        true if rw
      • setMandatory

        public void setMandatory​(boolean mandatory)
        Set Mandatory (and back bolor)
        Specified by:
        setMandatory in interface CEditor
        Parameters:
        mandatory - mandatory
      • isMandatory

        public boolean isMandatory()
        Is it mandatory
        Specified by:
        isMandatory in interface CEditor
        Returns:
        true if mandatory
      • setBackground

        public void setBackground​(boolean error)
        Set Background based on ReadWrite / mandatory / error
        Specified by:
        setBackground in interface CEditor
        Parameters:
        error - if true, set background to error color, otherwise mandatory/ReadWrite
      • setFormat

        public void setFormat()
        Set Format Required when Format/Locale changed
      • requestFocusInWindow

        public boolean requestFocusInWindow()
        Request Focus In Window
        Overrides:
        requestFocusInWindow in class JComponent
        Returns:
        focus request
      • setValue

        public void setValue​(Object value)
        Set Editor to value
        Specified by:
        setValue in interface CEditor
        Parameters:
        value - timestamp/date or String to be parsed
      • getTimestamp

        public Timestamp getTimestamp()
        Return Editor value
        Returns:
        value
      • getValue

        public Object getValue()
        Return Editor value (Timestamp)
        Specified by:
        getValue in interface CEditor
        Returns:
        value
      • getDisplay

        public String getDisplay()
        Return Display Value
        Specified by:
        getDisplay in interface CEditor
        Returns:
        display value
      • keyTyped

        public void keyTyped​(KeyEvent e)
        Key Listener Interface
        Specified by:
        keyTyped in interface KeyListener
        Parameters:
        e - Event
      • keyReleased

        public void keyReleased​(KeyEvent e)
        Key Listener. - Escape - Restore old Text - firstChange - signal change
        Specified by:
        keyReleased in interface KeyListener
        Parameters:
        e - event
      • focusLost

        public void focusLost​(FocusEvent e)
        Data Binding to to GridController.
        Specified by:
        focusLost in interface FocusListener
        Parameters:
        e - event
      • startCalendar

        public static Timestamp startCalendar​(Container jc,
                                              Timestamp value,
                                              SimpleDateFormat format,
                                              int displayType,
                                              String title)
        Invalid Entry - Start Calendar
        Parameters:
        jc - parent
        value - value
        format - format
        displayType - display type
        title - title
        Returns:
        formatted Date
      • setField

        public void setField​(GridField mField)
        Set Field/WindowNo for ValuePreference
        Specified by:
        setField in interface VEditor
        Parameters:
        mField - MField
      • getField

        public GridField getField()
        Description copied from interface: VEditor
        Get Field/WindowNo for ValuePreference
        Specified by:
        getField in interface VEditor
        Returns:
        mField
      • setEnabled

        public void setEnabled​(boolean enabled)
        Set Enabled
        Overrides:
        setEnabled in class JComponent
        Parameters:
        enabled - enabled
      • removeActionListener

        public void removeActionListener​(ActionListener l)
        Remove Action Listner
        Parameters:
        l - Action Listener
      • setBackground

        public void setBackground​(Color bg)
        Fire Action Event to listeners protected void fireActionPerformed() { int modifiers = 0; AWTEvent currentEvent = EventQueue.getCurrentEvent(); if (currentEvent instanceof InputEvent) modifiers = ((InputEvent)currentEvent).getModifiers(); else if (currentEvent instanceof ActionEvent) modifiers = ((ActionEvent)currentEvent).getModifiers(); ActionEvent ae = new ActionEvent (this, ActionEvent.ACTION_PERFORMED, "VDate", EventQueue.getMostRecentEventTime(), modifiers); // Guaranteed to return a non-null array Object[] listeners = listenerList.getListenerList(); // Process the listeners last to first, notifying those that are interested in this event for (int i = listeners.length-2; i>=0; i-=2) { if (listeners[i]==ActionListener.class) { ((ActionListener)listeners[i+1]).actionPerformed(ae); } } } // fireActionPerformed /
        Overrides:
        setBackground in class JComponent