Example #1
0
  /**
   * Set Field/WindowNo for ValuePreference
   *
   * @param mField field
   */
  public void setField(GridField mField) {
    m_mField = mField;

    if (m_mField != null && MRole.getDefault().isShowPreference())
      ValuePreference.addMenu(this, popupMenu);

    if (m_mField != null) FieldRecordInfo.addMenu(this, popupMenu);
  } //  setField
Example #2
0
  /**
   * ************************************************************************ Action Listener
   *
   * @param e event
   */
  public void actionPerformed(ActionEvent e) {
    log.config(e.getActionCommand());
    if (ValuePreference.NAME.equals(e.getActionCommand())) {
      if (MRole.getDefault().isShowPreference()) ValuePreference.start(m_mField, getValue());
      return;
    } else if (e.getActionCommand().equals(FieldRecordInfo.CHANGE_LOG_COMMAND)) {
      FieldRecordInfo.start(m_mField);
      return;
    }

    if (e.getSource() == m_button) {
      m_button.setEnabled(false);
      String str = startCalculator(this, m_text.getText(), m_format, m_displayType, m_title, ' ');
      m_text.setText(str);
      m_button.setEnabled(true);
      try {
        fireVetoableChange(m_columnName, m_oldText, getValue());
      } catch (PropertyVetoException pve) {
      }
      m_text.requestFocus();
    }
  } //	actionPerformed