Package net.helipilot50.stocktrade.framework

Examples of net.helipilot50.stocktrade.framework.MsgCatalog


    public Array_Of_ListElement<ListElement> getElementList() {
        return kids;
    }

    public ListElement extractListElementByIndex(int index) {
        ListElement le = null;
        if ((kids != null) && (index > 0) && (index <= kids.size())) {
            le = kids.get(index - 1);
        }
        return le;
    }
View Full Code Here


        return le;
    }

    public ListElement extractListElement(int value) {
        for (Iterator<ListElement> it = kids.iterator(); it.hasNext();) {
            ListElement le = it.next();
            if (le.getIntegerValue() == value)
                return le;
        }
        return null;
    }
View Full Code Here

        return ((ListElement) getSelectedValue()).getObjectValue();
    }

    public void setIntegerValue(int value) {
        for (int i = 0; i < this.getRadioListModel().getSize(); i++) {
            ListElement le = ((ListElement)this.getRadioListModel().getElementAt(i));
            if (le.equals(value)){
                this.setSelectedIndex(i);
                break;
            }
        }
    }
View Full Code Here

        }
    }

    public void setObjectValue(Object value) {
        for (int i = 0; i < this.getRadioListModel().getSize(); i++) {
            ListElement le = ((ListElement)this.getRadioListModel().getElementAt(i));
            if (le.getObjectValue() == null)
                continue;
            if (le.getObjectValue().equals(value)){
                this.setSelectedIndex(i);
                break;
            }
        }
    }
View Full Code Here

    public void setTextValue(TextData value) {
        this.setTextValue(value.toString());
    }
    public void setTextValue(String value) {
        for (int i = 0; i < this.getRadioListModel().getSize(); i++) {
            ListElement le = ((ListElement)this.getRadioListModel().getElementAt(i));
            if (le.equals(value)){
                this.setSelectedIndex(i);
                break;
            }
        }
    }
View Full Code Here

      // widget based on the message catalog
      // TF:Mar 8, 2010:Re-used methods to reduce dependency on hard-coded strings
      int msgNum = getMsgNumber(comp);
      int msgSet = getMsgSet(comp);
      if (msgNum > 0 && msgSet > 0) {
        MsgCatalog catalog = MsgCatalog.getInstance();
        if (catalog != null) {
          if (comp instanceof JTextComponent) {
            TextData value = TextValue.get((JTextComponent)comp);
            String text = catalog.getString(msgSet, msgNum, value == null ? null : value.toString());
            TextValue.set((JTextComponent)comp, text);
          }
          else if (comp instanceof JLabel) {
            TextData value = TextValue.get((JLabel)comp);
            String text = catalog.getString(msgSet, msgNum, value == null ? null : value.toString());
            TextValue.set((JLabel)comp, text);
          }
          else if (comp instanceof JMenuItem) {
            TextData value = MenuText.get((JMenuItem)comp);
            String text = catalog.getString(msgSet, msgNum, value == null ? null : value.toString());
            MenuText.set((JMenuItem)comp, text);
          }
          else if (comp instanceof JButton) {
            TextData value = TextValue.get((JButton)comp);
            String text = catalog.getString(msgSet, msgNum, value == null ? null : value.toString());
            TextValue.set((JButton)comp, text);
          }
          //PM:24/4/08 added support for Panel and GridField
          else if (comp instanceof Panel) {
            TextData value = Caption.get((Panel)comp);
            String text = catalog.getString(msgSet, msgNum, value == null ? null : value.toString());
            Caption.set((Panel)comp, text);
          }
          else if (comp instanceof GridField) {
            TextData value = Caption.get((GridField)comp);
            String text = catalog.getString(msgSet, msgNum, value == null ? null : value.toString());
            Caption.set((GridField)comp, text);
          }
          // CraigM:28/04/2008: Added support for check boxes
          else if (comp instanceof JCheckBox) {
            String value = ((JCheckBox)comp).getText();
            String text = catalog.getString(msgSet, msgNum, value);
            ((JCheckBox)comp).setText(text);
          }
          // TF:26/06/2008:Added support for radio lists
          else if (comp instanceof JCheckBox) {
            String value = ((JCheckBox)comp).getText();
            String text = catalog.getString(msgSet, msgNum, value);
            ((JCheckBox)comp).setText(text);
          }
        }
      }
        //PM:2/5/08
View Full Code Here

     * @param comp
     * @param msgSet
     */
    public static void reloadTitle(JFrame frame, int titleSet, int titleNum) {
      if (titleSet != 0 && titleNum != 0) {
        MsgCatalog catalog = MsgCatalog.getInstance();
        if (catalog != null) {
          String value = frame.getTitle();
          String text = catalog.getString(titleSet, titleNum, value);
          frame.setTitle(text);
        }
      }
    }
View Full Code Here

*/
public class ActivateActionListener implements ActionListener {
    public void actionPerformed(ActionEvent e) {
        List<EventHandle> eventsToPost = new ArrayList<EventHandle>();
        Hashtable<String, Object> qq_Params = new Hashtable<String, Object>();
        qq_Params.put("x", new ParameterHolder(0));
        qq_Params.put("y", new ParameterHolder(0));
        int modifiers = 0;
        if ((e.getModifiers() & ActionEvent.CTRL_MASK) > 0)
            modifiers = modifiers | 1;
        if ((e.getModifiers() & ActionEvent.SHIFT_MASK) > 0)
            modifiers = modifiers | 2;
        if ((e.getModifiers() & ActionEvent.ALT_MASK) > 0)
            modifiers = modifiers | 4;
        if ((e.getModifiers() & ActionEvent.META_MASK) > 0)
            modifiers = modifiers | 8;
        qq_Params.put("modifier", new ParameterHolder(modifiers));
        qq_Params.put("node", new ParameterHolder(null));
        qq_Params.put("row", new ParameterHolder(0));
        qq_Params.put("column", new ParameterHolder(0));
        if (e.getSource() instanceof JRadioButtonMenuItem) {
            ButtonGroup bg = ((DefaultButtonModel) ((JRadioButtonMenuItem) e
                    .getSource()).getModel()).getGroup();
            eventsToPost.add(new EventHandle(bg, "Activate", qq_Params));
        } else {
View Full Code Here

        public void postAfterFocusGain() {
            EventManager.startEventChain();
            int reason = ForteKeyboardFocusManager.getTraversalReason();
            if (reason != Constants.FC_SUPRESS) {
                Hashtable<String, Object> params = createParams();
                params.put("reason", new ParameterHolder(reason));
                ClientEventManager.postEvent( FillInField.this, "AfterFocusGain", params );
            }
            EventManager.endEventChain();
        }
View Full Code Here

            FocusHelper.addSetFocusPurgeAction(FillInField.this);
//                FocusHelper.addPurgeAction(new RollbackAction());
            Hashtable<String, Object> params = createParams();
            int reason = ForteKeyboardFocusManager.getTraversalReason();
            if (reason != Constants.FC_SUPRESS) {
                params.put("reason", new ParameterHolder(reason));
                ClientEventManager.postEvent( FillInField.this, "BeforeFocusLoss", params );
            }
            EventManager.endEventChain();
        }
View Full Code Here

TOP

Related Classes of net.helipilot50.stocktrade.framework.MsgCatalog

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.