Examples of GridCell


Examples of DisplayProject.GridCell

        Container parent,
        int penColor,
        int row,
        String text) {
      TextGraphic jl = newTextGraphic(text);
      GridCell cell = GridCell.get(jl);
      cell.setCellGravity(gravity);
      cell.setRow(row-1);
      cell.setColumn(column-1);

      Parent.set(jl, parent);
      ColourChange.setForeground(jl, penColor);
      return jl;
    }
View Full Code Here

Examples of DisplayProject.GridCell

        TopMargin action = ActionMgr.getAction(comp, TopMargin.class);
        if (action != null) {
            return action.margin;
        }
        // TF:20/8/07:Adapted to use new GridField static methods
        GridCell gbc = GridField.getConstraints(comp);
        return UIutils.pixelsToMils(gbc.getTopMargin());
    }
View Full Code Here

Examples of DisplayProject.GridCell

        int row,
        int widthPolicy ) {
      DataField df = newDataField();
      df.setColumns(maxCharacters);
      df.setMinimumSize(new Dimension(minWidthInPixels, df.getMinimumSize().height));
      GridCell cell = GridCell.get(df);
      cell.setCellGravity(gravity);
      cell.setRow(row-1);
      cell.setColumn(column-1);
      Parent.set(df, parent);
      return df;
    }
View Full Code Here

Examples of DisplayProject.GridCell

        Insets i = ((WindowFormLayout)pChild.getLayout()).getLayoutInsets(pChild);
        pChild.setLayout(new PanelLayoutManager(true));
        ((Panel)pChild).setInsets(i);
       
        // TF:28/04/2008:These rules only seem to apply if the size policy of the form has not been explicitly set
        GridCell existingCell = GridCell.getExisting(pChild);
        Container c = ((JComponent)pCurrentParent).getTopLevelAncestor();
        if (existingCell == null) {
          // The child must have been on a window. If the old window was resizable, the
          // default layout policy = SP_EXPLICIT and a default size of 4000x3000 mils
          // which is 384x288 pixels. If the window was not resizable the default size
          // policy is Natural. In both cases, the location is (0, 0) after compensating for insets
          if (c instanceof JFrame && (!((JFrame)c).isUndecorated()) && ((JFrame)c).isResizable()) {
              GridField.getConstraints(pChild).setWidthPolicy(Constants.SP_EXPLICIT);
              GridField.getConstraints(pChild).setHeightPolicy(Constants.SP_EXPLICIT);
              pChild.setSize(384, 288);
          }
          else {
              GridField.getConstraints(pChild).setWidthPolicy(Constants.SP_NATURAL);
              GridField.getConstraints(pChild).setHeightPolicy(Constants.SP_NATURAL);
          }
        }
        else {
          if (existingCell.getWidthPolicy() == Constants.SP_TO_PARENT || existingCell.getHeightPolicy() == Constants.SP_TO_PARENT) {
            pChild.setMinimumSize(null);
            pChild.setPreferredSize(null);
            pChild.setSize(0, 0);
          }
        }
View Full Code Here

Examples of DisplayProject.GridCell

    public BottomMargin(Component pComponent, int value) {
        super(pComponent);
        this.margin = value;
    }
    public void performAction() {
        GridCell gbc = null;
        if (this._component != null) {
            gbc = GridField.getConstraints((JComponent)this._component);
            gbc.setBottomMargin(UIutils.milsToPixels(margin));
        }
    }
View Full Code Here

Examples of DisplayProject.GridCell

    public static int get(JComponent comp){
        BottomMargin action = ActionMgr.getAction(comp, BottomMargin.class);
        if (action != null) {
            return action.margin;
        }
        GridCell gbc = GridField.getConstraints((JComponent)comp);
        return UIutils.pixelsToMils(gbc.getBottomMargin());
    }
View Full Code Here

Examples of DisplayProject.GridCell

   
    public void performAction() {
      // TF:11/05/2009:Changed this to rely on the layout managers
      Set<Container> containersToValidate = new HashSet<Container>();
      JComponent thisComponent = (JComponent)this._component;
      GridCell cell = GridCell.get(thisComponent);
     
      // First, remove this component from it's old chain, if there is one.
      JComponent currentPartner = LayoutManagerHelper.getHeightPartner(thisComponent);
      if (currentPartner != null) {
        if (currentPartner == this.partner) {
          // do nothing
          return;
        }
        else {
          JComponent lastInChain = null;
          for (JComponent comp = currentPartner; comp != null && comp != thisComponent; comp = LayoutManagerHelper.getHeightPartner(comp)) {
            lastInChain = comp;
            // Also add the parent of the component to the containers needing laying out
            Container parent = comp.getParent();
            if (parent != null) {
              containersToValidate.add(parent);
            }
          }
          if (lastInChain != null) {
            // We need to set the partner of the last in the chain to the current partner, skipping this component
            LayoutManagerHelper.setHeightPartner(lastInChain, currentPartner);
          }
        }
      }
     
      // We now need to run around the partnership chain, possibly inserting this element in the chain,
      // setting all the size policies to TO_PARTNER and marking all the containers to be validated
      cell.setHeightPolicy(Constants.SP_TO_PARTNER);
      LayoutManagerHelper.setHeightPartner(thisComponent, this.partner);
    JComponent lastInChain = null;
    for (JComponent comp = this.partner; comp != null && comp != thisComponent; comp = LayoutManagerHelper.getHeightPartner(comp)) {
      lastInChain = comp;
      // Also add the parent of the component to the containers needing laying out
View Full Code Here

Examples of com.googlecode.g2re.html.GridCell

        GridRow row2 = new GridRow();
        GridRow row3 = new GridRow();
        GridRow row4 = new GridRow();
        grid.addRows(row1,row2,row3,row4);
       
        row1.addCell(new GridCell(new RawHTML("<h2>Top 5 Pets</h2>")));
        row1.addCell(new GridCell(new RawHTML("<h2>Vote Summary</h2>")));
       
        row3.addCell(new GridCell(new RawHTML("<h2>Pet Locations</h2>")));
        row3.addCell(new GridCell(new RawHTML("<h2>Score Summary</h2>")));
       

       
       
       
       
       
       
        /* create data table, set the data query */
        DataTable table = new DataTable();
        table.setCellPadding(1);
        table.setDataQuery(queryB);
        queryB.getFilters().add(new TopNFilter(5, col5b));
       
        /* create table header rows */
        GridRow tableHeader = new GridRow();
        tableHeader.addCell(new com.googlecode.g2re.html.GridCell(new RawHTML("Name")));
        tableHeader.addCell(new com.googlecode.g2re.html.GridCell(new RawHTML("Description")));
        tableHeader.addCell(new com.googlecode.g2re.html.GridCell(new RawHTML("Price")));
        table.getHeaderRows().add(tableHeader);

        /* create table body rows */
        GridRow tableBody = new GridRow();
        tableBody.addCell(new com.googlecode.g2re.html.GridCell(new DataElement(col1b, 0)));
        tableBody.addCell(new com.googlecode.g2re.html.GridCell(new DataElement(col2b, 1)));
        /* add formatted price column */
        DataElement priceCellElement = new DataElement(col3b, 2);
        priceCellElement.setNumberFormat("$###,###,###,##0.00");
        tableBody.addCell(new com.googlecode.g2re.html.GridCell(priceCellElement));
       
        /* add rows to table */
        table.getBodyRows().add(tableBody);

        /* add the table to the report */
        row2.addCell(new GridCell(table));
        //report.getWebPage().addChildElement(table);
       
       
       
        PieChart pie = new PieChart();
        pie.setDataQuery(queryA);
        //pie.setHeight(250);
        //pie.setWidth(300);
        pie.setThreeDimensional(true);
        pie.setValueColumn(col3a);
        pie.setNameColumn(col1a);
        pie.setTitle("Vote Summary");
        row2.addCell(new GridCell(pie));
       
       
        /* create and add a map */
        Map m = new Map();
        m.setDataQuery(queryB);
        m.setMapType(MapType.normal);
        m.setShowTip(true);
        m.setName("Pet Map");
        m.setDescriptionColumn(col2b);
        m.setAddressColumn(col4b);       
       
        row4.addCell(new GridCell(m));
       
       
        BarChart bar = new BarChart();
        bar.setThreeDimensional(true);
        bar.setTitle("Score Summary");
        bar.setDataQuery(queryA);
        bar.setFlipAxis(true);
        bar.setLegendLocation(LegendLocation.none);
        bar.setValueSeriesColumn(col2a);
        bar.setCategorySeriesColumn(col1a);
        row4.addCell(new GridCell(bar));
       
        return report;
    }
View Full Code Here

Examples of com.sencha.gxt.widget.core.client.grid.Grid.GridCell

  }

  @Override
  public void cancelEditing() {
    if (activeCell != null) {
      final GridCell editCell = activeCell;
      removeEditor();
      fireEvent(new CancelEditEvent<M>(editCell));
    }
  }
View Full Code Here

Examples of com.sencha.gxt.widget.core.client.grid.Grid.GridCell

      }
      for (int i = 0, len = columnModel.getColumnCount(); i < len; i++) {
        ColumnConfig<M, ?> c = columnModel.getColumn(i);
        doCompleteEditing(c);
      }
      final GridCell editCell = activeCell;
      removeEditor();
      fireEvent(new CompleteEditEvent<M>(editCell));
    }
  }
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.