Package net.helipilot50.stocktrade.framework

Examples of net.helipilot50.stocktrade.framework.TextData$qq_Resolver


    public static void setTextValue(JTextComponent comp, String value) {
        setTextValue(comp, new TextData(value));
    }

    public static void setTextValue(ListField comp, String value) {
        setTextValue(comp, new TextData(value));
    }
View Full Code Here


      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();
View Full Code Here

                    }

                }
                else if (comp instanceof GridField) {
                    GridField gf = (GridField) comp;
                    TextData cap = gf.getCaption();
                    if (cap != null) {
                        gf.setCaption(new TextData(mcat.getString(msgSet, msgNumber, gf.getCaption().asString())));
                    }
                    else {
                        gf.setCaption(new TextData(mcat.getString(msgSet, msgNumber)));
                    }

                }
                else if (comp instanceof JPanel) {
                    JPanel gf = (JPanel) comp;
View Full Code Here

    public void mouseEntered(MouseEvent e) {
      updateStatusText(e);
    }

    private void updateStatusText(MouseEvent e) {
      TextData statusTextValue = null;

      int columnAtPoint = columnAtPoint(e.getPoint());
      TableColumn column = getColumnModel().getColumn(columnAtPoint);
      if (column instanceof ArrayColumn) {
        ArrayColumn arrayColumn = (ArrayColumn) column;
View Full Code Here

        //  Some test code to see if code below could be simplified
        if (this.getSorter().isSorting())  {
            int column = this.getSorter().getSortColumn();
            ArrayColumnModel columnModel = this.getColumnModel();
            ArrayColumn arrayColumn = columnModel.getRealColumn(column);
            TextData name = new TextData();
            name.setValue(arrayColumn.getName());
            if (name.moveToString("Item")) {
                name = name.copyRange(name.getOffset());
            }
            boolean ascending = (this.getSorter().getSortDirection() == TableSorter.ASCENDING);

            DynamicArray<Object> theArray = (DynamicArray<Object>)(this.tableModel.getData().clone());
            theArray.sort(name.asString(),false,ascending);
            index = theArray.indexOf(node);
        }
        return this.getSelectionModel().isSelectedIndex(index);
    }
View Full Code Here

    }

    public TextData getValueAt(int pLine, int pColumn) {
        Object o = tableModel.getValueAt(pLine, pColumn);
        if (o instanceof String)
            return new TextData((String)o);
        else if (o instanceof TextData)
            return (TextData)o;
        else
            return null;
    }
View Full Code Here

//        }
//        EventManager.endEventChain();
    }

    public TextData getTextValue() {
        final TextData target = new TextData();
        final BooleanData isNull = new BooleanData(false);
        UIutils.invokeOnGuiThread(new Runnable () {
            public void run() {
                if (cb.isEditable()) {
                        target.setValue(cb.getEditor().getItem().toString());
                }
                else {
                    if (cb.getSelectedIndex() == -1)
                      isNull.setValue( true );
                    else
                        target.setValue(cb.getSelectedItem().toString());
                }
            }
        });
        if (!isNull.getBooleanValue()) {
          return target;
View Full Code Here

    public void setValue(Object newValue) {
        try {
            subject.setValue(newValue);
        }
        catch (PropertyAccessException pae) {
            subject.setValue(new TextData((String)newValue));
        }
    }
View Full Code Here

        regex = Pattern.compile(pattern, Pattern.DOTALL);

    }

    public TextData getTextValue(){
        return new TextData((getValue() == null) ? "" : getValue().toString());
    }
View Full Code Here

            this.setValue(new TextNullable());
            fireAfterValueChangeEvents();
        }
        // CraigM:26/11/2008 - Allow clearing of TextDatas.  DET-55.
        else if (this.getValue() instanceof TextData) {
            this.setValue(new TextData());
            fireAfterValueChangeEvents();
        }
        else if (this.getValue() instanceof DateTimeNullable) {
            this.setValue(new DateTimeNullable());
            fireAfterValueChangeEvents();
View Full Code Here

TOP

Related Classes of net.helipilot50.stocktrade.framework.TextData$qq_Resolver

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.