Package net.helipilot50.stocktrade.framework

Examples of net.helipilot50.stocktrade.framework.ParameterHolder


        // TF:8/8/07:Made a shallow clone in case there is a really big object attached to the list element
        Array_Of_ListElement<ListElement> clonedList = CloneHelper.clone(les, false);
        Object currentValue = this.list.getValue();
        ListElement valueToReselect = null;
        if (currentValue instanceof ListElement && clonedList != null && this.list.getSelectionHolder() instanceof TypeAwareValueModel) {
          TypeAwareValueModel tavm = (TypeAwareValueModel)this.list.getSelectionHolder();
          // We need to find an item in the new list which is the same as an item in the old list,
          // depending on the type being considered. For example, if the list is mapped to an int,
          // we need to find an element in the new list with the same IntegerValue.
          Class<?> clazz = tavm.getValueType();
          ListElement currentSelection = (ListElement)currentValue;
          for (ListElement item : clonedList) {
            if (clazz.equals(Integer.TYPE) ||
                clazz.equals(Short.TYPE) ||
                NumericData.class.isAssignableFrom(clazz) ||
View Full Code Here


        for (ActionListener listener : listeners){
            if (listener instanceof PrintActionListener){
                target.addActionListener(new PrintActionListener(((PrintActionListener)listener).getWindow()));
            } else
            if (listener instanceof AboutMenuListener){
                target.addActionListener(new AboutMenuListener());
            }
        }
        CloneHelper.cloneClientProperties(source, target);
        return target;
    }
View Full Code Here

        target.setMnemonic(source.getMnemonic());
        target.setAccelerator(source.getAccelerator());
        ActionListener[] listeners = source.getActionListeners();
        for (ActionListener listener : listeners){
            if (listener instanceof PrintActionListener){
                target.addActionListener(new PrintActionListener(((PrintActionListener)listener).getWindow()));
            } else
            if (listener instanceof AboutMenuListener){
                target.addActionListener(new AboutMenuListener());
            }
        }
View Full Code Here

        this.editor = editor;
       
        // Wrap the cell editor in an ArrayFieldCellEditor to handle JTable sizing issues
        // TF:04/05/2009:If we don't have an editor (eg a listview) then we don't perform this code
        if (editor != null) {
          this.setCellEditor(new ArrayFieldCellEditor(editor));
        }
    }
View Full Code Here

        if (renderer instanceof AlignedCellRenderer) {
          this.setCellRenderer(renderer);
        }
        // For ArrayFields, wrap the cell renderer in an ArrayFieldCellRenderer to handle JTable sizing issues
        else {
          this.setCellRenderer(new ArrayFieldCellRenderer(renderer));
        }
    }
View Full Code Here

    // We're already closed, just discard the result set if any
    resultSet = null;
  }
 
  public boolean execute() throws SQLException {
    final BooleanData result = new BooleanData();
    useRealStatement(new StatementWorker() {
      public void doWork(PreparedStatement ps) throws SQLException {
        result.setValue(ps.execute());
       
        // Now get the results sets and remember them
        populateResults(ps, result.getValue());
      }
    });
    return result.getValue();
  }
View Full Code Here

    });
    return updateCount;
  }

  public boolean execute(final String sql) throws SQLException {
    final BooleanData result = new BooleanData();
    useRealStatement(new StatementWorker() {
      public void doWork(PreparedStatement ps) throws SQLException {
        result.setValue(ps.execute(sql));
       
        // Now get the results sets and remember them
        populateResults(ps, result.getValue());
      }
    });
    return result.getValue();
  }
View Full Code Here

        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 {
            Component me = (Component) e.getSource();

            //System.out.println("Activate on ["+ me.toString() + "]");
            eventsToPost.add(new EventHandle(me, "Activate", qq_Params));
            // TF:13/11/07:Commented this out as there is now a childActivateListener to take care of this
            //ChildEventHelper.postEventToAllParents(me, "ChildActivate", null, eventsToPost);
        }
        /*
         * toData() must be called to update the mapped data object.
View Full Code Here

    public void toData() {

    }

    private void afterValueChange(Component me, List<EventHandle> eventsToPost) {
        eventsToPost.add(new EventHandle(me, "AfterValueChange"));
        ChildEventHelper.postEventToAllParents(me, "ChildAfterValueChange", null, eventsToPost);
    }
View Full Code Here

                      JButton defaultBtn = FillInField.this.getRootPane().getDefaultButton();
                     
                      if (defaultBtn != null) {
                        FocusHelper.buttonClick(
                            defaultBtn,
                            new EventHandle(defaultBtn, "Click", ClickListener.makeParamList(e)));
                      }
                    }
                }
            });
        }
View Full Code Here

TOP

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

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.