Package net.helipilot50.stocktrade.displayproject.binding

Examples of net.helipilot50.stocktrade.displayproject.binding.BindingManager


     * rows is more than the passed value, the number of rows will be
     * set to the number of rows used. This method is thread-safe and may be
     * called on or off the GUI thread
     */
    public void setRows(final int pRows) {
        ActionMgr.addAction(new PendingAction(null) {
            @Override
            public String toString() {
                return GridField.this.getName() + ".setRows(" + pRows + ")";
            }
            @Override
View Full Code Here


     * columns is more than the passed value, the number of columns will be
     * set to the number of columns used. This method is thread-safe and may be
     * called on or off the GUI thread
     */
    public void setColumns(final int pColumns) {
        ActionMgr.addAction(new PendingAction(null) {
            @Override
            public String toString() {
                return GridField.this.getName() + ".setColumns(" + pColumns + ")";
            }
            @Override
View Full Code Here

            grid.setDataObject(value);
        }
        catch (Exception e) {
            grid.setDataObject(null);
        }
      BindingManager mgr = ArrayFieldCellHelper.getArrayColumnBindingManager(grid);
      if (mgr != null) {
        mgr.setMappedObject(value);
      }

        grid.requestFocus();
        return grid;
    }
View Full Code Here

    }

    public Component getTableCellRendererComponent(JTable table, Object value,
            boolean isSelected, boolean hasFocus, int row, int column) {
     
      BindingManager mgr = ArrayFieldCellHelper.getArrayColumnBindingManager(gridFieldCloned);
      if (mgr != null) {
        mgr.setMappedObject(value);
      }

      // Draw the row highlight
      if (isSelected) {
        for (Component c : this.gridFieldCloned.getComponents()) {
View Full Code Here

    }
   
    public static void cloneComponentArrayParts(JComponent origComponent, JComponent newComponent) {
      setUpCellRenderer(origComponent, newComponent);
        if (ArrayFieldCellHelper.getArrayField(origComponent)!= null) {
          BindingManager origBindingMgr = ArrayFieldCellHelper.getArrayColumnBindingManager(origComponent);
          if (origBindingMgr != null) {
            // This is the top level binder, we need to make a new binding manager here
            BindingManager newBindingMgr = new BindingManager(origBindingMgr.getMappedObject());
            ArrayFieldCellHelper.setArrayColumnBindingManager(newComponent, newBindingMgr);
          }
          else {
            // This is a component inside an array field, but either not a top level component, or not
            // bound. Scan up the hierarchy to find a parent that has a binding manager
            BindingManager topLevelManager = null;
            Container c = Parent.get(newComponent);
            while (c != null) {
              BindingManager thisMgr = getArrayColumnBindingManager(c);
              if (thisMgr != null) {
                topLevelManager = thisMgr;
              }
              c = Parent.get(c);
            }
View Full Code Here

        try {
          // Get the window binding Manager
          Method bindingManagerMethod;
          bindingManagerMethod = frame.getClass().getDeclaredMethod("getBindingManager", new Class[0]);
          bindingManagerMethod.setAccessible(true);
          BindingManager bindingManager = (BindingManager)bindingManagerMethod.invoke(frame, new Object[0]);
          if (bindingManager != null) {
            updateFieldFromData(component, frame, bindingManager);
          }
        } catch (Exception e) {
          // ignore the error, no binding Manager
View Full Code Here

      Container owner = UIutils.getDeclaredFrame(component);
      Method bindingManagerMethod; //PM:5 Nov 2008:changed to used the method in place of the field
    try {
      bindingManagerMethod = owner.getClass().getDeclaredMethod("getBindingManager", new Class[0]);
      bindingManagerMethod.setAccessible(true);
        BindingManager bindingManager = (BindingManager)bindingManagerMethod.invoke(owner, new Object[0]);
        return bindingManager.getDataObject(component);
    }
    catch (Exception e) {
      return null;
    }
    }
View Full Code Here

        }
    }

    protected BindingManager getBindingManager() {
        if (this.bindingManager == null) {
            this.bindingManager = new BindingManager(this);
        }
        return bindingManager;
    }
View Full Code Here

        }
    }

    protected BindingManager getBindingManager() {
        if (this.bindingManager == null) {
            this.bindingManager = new BindingManager(this);
        }
        return bindingManager;
    }
View Full Code Here

        }
    }

    protected BindingManager getBindingManager() {
        if (this.bindingManager == null) {
            this.bindingManager = new BindingManager(this);
        }
        return bindingManager;
    }
View Full Code Here

TOP

Related Classes of net.helipilot50.stocktrade.displayproject.binding.BindingManager

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.