Examples of ArrayField


Examples of DisplayProject.controls.ArrayField

            }
          }
        }
        if (comp instanceof JComponent) {
          JComponent jcomp = (JComponent)comp;
            ArrayField af = ArrayFieldCellHelper.getArrayField(jcomp);
            if (af != null) {
              // CraigM:02/07/2008 - Clean up of code to use helper class
              int col = ArrayFieldCellHelper.getArrayFieldColumn(jcomp);
                ((ArrayColumnModel)af.getColumnModel()).show(col, value);
            }

            if (comp instanceof JTabbedPane) {
                /*
                 * JTabbedPane first three kids are the tab controls and the scroll buttons
View Full Code Here

Examples of DisplayProject.controls.ArrayField

        if (name != null && (pName.equalsIgnoreCase(name) || pName.substring(3).equalsIgnoreCase(name))) { // extra
            return targetWidget;
        }
        if (targetWidget instanceof ArrayField) {
            ArrayField aContainer = (ArrayField) targetWidget;
            ArrayColumnModel acm = (ArrayColumnModel)aContainer.getColumnModel();
            int colCount = acm.getRealColumnCount();
            for (int i = 0; i < colCount; i++) {
                ArrayColumn ac = (ArrayColumn)acm.getRealColumn(i);
                TableCellEditor tce = ac.getCellEditor();
                JComponent comp = (JComponent)tce.getTableCellEditorComponent(aContainer, null, true, -1, -1);
                if (comp == null) { // then find the cell renderer
                    ArrayFieldCellRenderer afcr = (ArrayFieldCellRenderer) ac
                            .getCellRenderer();
                    comp = (JComponent) afcr.getTableCellRendererComponent(
                            aContainer, null, false, true, -1, -1);
                    comp = (JComponent) comp.getComponent(0);
                    String compName = (comp == null) ? "" : comp.getName();
                    if (compName.endsWith(pName)) {
                        return comp;
                    }
                } else if (comp instanceof EditorLayoutPanel
                        && comp.getComponent(0) != null) {
                    comp = (JComponent) comp.getComponent(0);
                }
                String compName = (comp == null) ? "" : comp.getName();
                if (compName.endsWith(pName)) {
                    return comp;
                }
            }
        } else if (targetWidget instanceof Container) {
            Container aContainer = (Container) targetWidget;
            Component[] children = aContainer.getComponents();
            for (int i = 0; i < children.length; i++) {
                Component result = UIutils._getFieldByName(pName, children[i]);
                if (result != null) {
                    return result;
                }
View Full Code Here

Examples of DisplayProject.controls.ArrayField

            }
          }
        }
        if (comp instanceof JComponent) {
          JComponent jcomp = (JComponent)comp;
            ArrayField af = ArrayFieldCellHelper.getArrayField(jcomp);
            if (af != null) {
              // CraigM:02/07/2008 - Clean up of code to use helper class
              int col = ArrayFieldCellHelper.getArrayFieldColumn(jcomp);
                ((ArrayColumnModel)af.getColumnModel()).show(col, value);
            }

            if (comp instanceof JTabbedPane) {
                /*
                 * JTabbedPane first three kids are the tab controls and the scroll buttons
View Full Code Here

Examples of DisplayProject.controls.ArrayField

        Parent action = (Parent) ActionMgr.getAction(comp, Parent.class);
        if (action != null)
            return (JComponent) action.parent;
        else {
            Container p;
            ArrayField af = ArrayFieldCellHelper.getArrayField(comp);
           
            // If the component is contained in an ArrayField, then the ArrayField is the parent.  CraigM: 27/03/2008.
            // TF:27/10/2008:Changed this logic to return the array field as the parent only if there is no real
            // parent, to cater for grids within array fields.
            p = comp.getParent();
View Full Code Here

Examples of DisplayProject.controls.ArrayField

            this._component.setSize(width, this._component.getHeight());
            this._component.setMinimumSize(new Dimension(width, minSize.height));
            this._component.setPreferredSize(new Dimension(width, minSize.height));

            // CraigM:16/06/2008 - Update the column model if we are in an array field
            ArrayField af = ArrayFieldCellHelper.getArrayField(this._component);

            if (af != null) {
              int col = ArrayFieldCellHelper.getArrayFieldColumn(this._component);
              ArrayColumn tc = (ArrayColumn)af.getColumnModel().getColumn(col);
              tc.setWidth(width);
              tc.setMinWidth(width);
              tc.setPreferredWidth(width);
              tc.setAssignedWidth(width);
            }
View Full Code Here

Examples of DisplayProject.controls.ArrayField

    public Array_Of_BusinessClass<BusinessClass> getData() {
        return this.data;
    }

    public void setField(ArrayField field) {
        ArrayField oldValue = this.field;
        this.field = field;
        this.qq_Listeners.firePropertyChange("field", oldValue, this.field);
    }
View Full Code Here

Examples of DisplayProject.controls.ArrayField

            params = new Hashtable<String, Object>();
        }
        params.put("child", new ParameterHolder(pChild));

        // TF:27/9/07:Revamped this logic as our renderers are now in panels.
        ArrayField owningArray = ArrayFieldCellHelper.getArrayField(pChild);
        int row = 0;
        int column = 0;
        // Extract the X and Y co-ordinate from the event which may be in array coordinates
        ParameterHolder pX = (ParameterHolder)params.get("x");
        ParameterHolder pY = (ParameterHolder)params.get("y");

        /*
         * There are 2 cases when considering children events of array fields:
         * 1) The component cell renderer/editor is attached to the array field as a child. This is typically when the
         *     editor is active. In this case the click we get is in the coordinate space of the child, but the row
         *     and column are not set properly. We can map the coordinate space of the child to the coordinate space
         *     of the array and then determine the row and column from there.
         *
         * 2) The component cell renderer/editor is not attached to the array field. In this case, the component will
         *     have a client property set which refers to the array and the location is in the coordinate space of the
         *     array. We can use this to determine the row and column and then map the coordinate down to the
         *     coordinate space of the child.
         */
        while (mum != null){
            if (mum == owningArray) {
                if (pX != null && pY != null) {
                    // We are a direct child of the table, remap the coordinate space to the array to get the row and column
                    Point p = new Point(UIutils.milsToPixels(pX.getInt()), UIutils.milsToPixels(pY.getInt()));
                    Point arrayPoint = SwingUtilities.convertPoint(pChild, p, mum);
                    row = owningArray.rowAtPoint(arrayPoint);
                    column = owningArray.columnAtPoint(arrayPoint);
                    // Store the real row and column in the array. This isn't actually done in Forte, but makes life
                    // much easier if we want to determine which cell generated the click.
                    params.put( "row", new ParameterHolder(row+1) );
                    params.put( "column", new ParameterHolder(column+1) );
                }
                owningArray = null;
            }
            pList.add(new EventHandle(mum, pEventName, params));
            // TF:18/06/2008:Fixed this so menus work properly
            if (mum instanceof JPopupMenu)
                mum = (Container)((JPopupMenu)mum).getInvoker();
            else
                mum = mum.getParent();
        }

        if (owningArray != null) {
            // Now the X and Y coordinates are in the array space, we need to translate them to the child coordinate space and get
            // the correct row and column
            if (pX != null && pY != null) {
                Point p = new Point(UIutils.milsToPixels(pX.getInt()), UIutils.milsToPixels(pY.getInt()));
                row = owningArray.rowAtPoint(p);
                column = owningArray.columnAtPoint(p);
                // Store the real row and column in the array. This isn't actually done in Forte, but makes life
                // much easier if we want to determine which cell generated the click.
                params.put( "row", new ParameterHolder(row+1) );
                params.put( "column", new ParameterHolder(column+1) );

                Rectangle r = owningArray.getCellRect(row, column, false);
                p.x -= r.x;
                p.y -= r.y;
                // Now X and Y are in owningArray coordinate space, need to translate them into pChild's
//              Point childLoc = SwingUtilities.convertPoint(owningArray, p, pChild);
                Point childLoc = p;
View Full Code Here

Examples of com.baasbox.service.query.PartsLexer.ArrayField

      if(i>0){
        sb.append(".");
      }
      sb.append(p.getName());
      if(p instanceof ArrayField){
        ArrayField af  = (ArrayField)p;
        sb.append("[").append(af.arrayIndex).append("]");
      }
     
    }
    return sb.toString();
View Full Code Here

Examples of net.helipilot50.stocktrade.displayproject.controls.ArrayField

  @Override
  // ITC_CONV:Start:TF:25-Mar-08:Handle SkipOnTab focus traversal
  public Component getComponentAfter(Container aContainer, Component aComponent) {

    // Traversing out of an ArrayField is handled via code inside the ArrayField. CraigM 29/08/2007.
    ArrayField af = ArrayFieldCellHelper.getArrayField(aComponent);
    if (af != null && isSwingDisplayerIgnoreArrayField() == false) {
      return af; // Stay in the ArrayField
    }
    Component result = super.getComponentAfter(aContainer, aComponent);
    while (result instanceof JComponent && SkipOnTab.get((JComponent)result)) {
View Full Code Here

Examples of net.helipilot50.stocktrade.displayproject.controls.ArrayField

        // --------------------------------------------------------------------
        // Expand array fields
        // --------------------------------------------------------------------
        if (comp instanceof ArrayField) {
            ArrayField af = (ArrayField)comp;
            af.setVisibleRows(af.getRowCount());

            if (removeScrollBars) {
                ((JScrollPane)af.getParent().getParent()).setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
                ((JScrollPane)af.getParent().getParent()).setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_NEVER);
            }
           
            // Expand any text fields that are in the array field
            for (int i=0; i<af.getColumnCount(); i++) {
              TableCellRenderer cellRenderer = af.getCellRenderer(0, i);
             
              if (cellRenderer instanceof ArrayFieldCellRenderer &&
                  ((ArrayFieldCellRenderer)cellRenderer).getRenderer() instanceof TextFieldCellRenderer) {
                ((TextFieldCellRenderer)((ArrayFieldCellRenderer)cellRenderer).getRenderer()).setPrinting(removeScrollBars);
              }
            }
           
            Container parent = af.getParent();

            while (parent != null) {
                if (parent instanceof JFrame) {
                    ((JFrame)parent).validate();
                    ((JFrame)parent).pack();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.