Package net.helipilot50.stocktrade.displayproject.binding.value

Examples of net.helipilot50.stocktrade.displayproject.binding.value.ValueModel


            ValueModel valueModel,
            Component component) {
        if (valueModel == null)
            throw new NullPointerException("The value model must not be null.");

        ValueModel model = new BufferedValueModel(valueModel, FOCUS_LOST_TRIGGER);
        component.addFocusListener(FOCUS_LOST_HANDLER);
        return model;
    }
View Full Code Here


     */
    public void setListHolder(ValueModel newListHolder) {
        if (newListHolder == null)
            throw new NullPointerException("The new list holder must not be null.");

        ValueModel oldListHolder = getListHolder();
        if (equals(oldListHolder, newListHolder))
            return;

        Object oldList = list;
        Object newList = newListHolder.getValue();

        oldListHolder.removeValueChangeListener(listChangeHandler);
        listHolder = newListHolder;
        newListHolder.addValueChangeListener(listChangeHandler);

        updateList(oldList, newList);
        firePropertyChange(PROPERTYNAME_LIST_HOLDER,
View Full Code Here

     */
    public void setSelectionHolder(ValueModel newSelectionHolder) {
        if (newSelectionHolder == null)
            throw new NullPointerException("The new selection holder must not be null.");

        ValueModel oldSelectionHolder = getSelectionHolder();
        if (equals(oldSelectionHolder, newSelectionHolder))
            return;

        oldSelectionHolder.removeValueChangeListener(selectionChangeHandler);
        selectionHolder = newSelectionHolder;
        oldSelection = newSelectionHolder.getValue();
        newSelectionHolder.addValueChangeListener(selectionChangeHandler);
        firePropertyChange(PROPERTYNAME_SELECTION_HOLDER,
                            oldSelectionHolder,
View Full Code Here

            throw new NullPointerException("The new selection index holder must not be null.");

        if (newSelectionIndexHolder.getValue() == null)
            throw new UsageException("The value of the new selection index holder must not be null.");

        ValueModel oldSelectionIndexHolder = getSelectionIndexHolder();
        if (equals(oldSelectionIndexHolder, newSelectionIndexHolder))
            return;

        oldSelectionIndexHolder.removeValueChangeListener(selectionIndexChangeHandler);
        selectionIndexHolder = newSelectionIndexHolder;
        newSelectionIndexHolder.addValueChangeListener(selectionIndexChangeHandler);
        oldSelectionIndex = getSelectionIndex();
        oldSelection = getSafeElementAt(oldSelectionIndex);
        firePropertyChange(PROPERTYNAME_SELECTION_INDEX_HOLDER,
View Full Code Here

          }
        }
        else {
          ListSelectionModel model = getSelectionModel();
          if (!(model instanceof ReadOnlyButtonModel)) {
            this.setSelectionModel(new ReadOnlyListSelectionModel(model));
          }
        }
        this.isCalledFromSetEditable = false;
        this.firePropertyChange("editable", !editable, editable);
      }
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

              cachedRowSet.updateBoolean(pColOrdinal, value.getBooleanValue());
            } else if (pValue instanceof DateTimeData) {
              DateTimeData value = (DateTimeData) pValue;
              cachedRowSet.updateDate(pColOrdinal, new Date(value.asDate().getTime()));
            } else if (pValue instanceof BinaryData) {
              BinaryData value = (BinaryData) pValue;
              cachedRowSet.updateBinaryStream(pColOrdinal, new ByteArrayInputStream(value.getValue()), value.getActualSize());
            }
          } catch (SQLException e) {
            UsageException errorVar = new UsageException(e.getMessage(), net.helipilot50.stocktrade.framework.Constants.SP_ER_USER, net.helipilot50.stocktrade.framework.Constants.SP_ER_PARAMETERERROR, e);
            ErrorMgr.addError(errorVar);
            throw errorVar;
View Full Code Here

TOP

Related Classes of net.helipilot50.stocktrade.displayproject.binding.value.ValueModel

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.