Examples of CellView


Examples of jxl.CellView

      if (log.isTraceEnabled())
      {
         log.trace("Applying column settings #0 on column #1", columnStyle, columnIndex);
      }
      CellView cellView = worksheet.getColumnView(columnIndex);
      if (columnStyle.autoSize != null)
      {
         cellView.setAutosize(columnStyle.autoSize);
      }
      if (columnStyle.hidden != null)
      {
         cellView.setHidden(columnStyle.hidden);
      }
      if (columnStyle.width != null)
      {
         cellView.setSize(columnStyle.width);
      }
      worksheet.setColumnView(columnIndex, cellView);
   }
View Full Code Here

Examples of jxl.CellView

            throw new ExcelWorkbookException(
                    "Must define starting and ending columns when grouping columns");
        }
        // JExcelAPI bug workaround
        for (int i = command.getStartColumn(); i <= command.getEndColumn(); i++) {
            worksheet.setColumnView(i, new CellView());
        }
        boolean collapse = command.getCollapse() == null ? false : command
                .getCollapse();
        try {
            worksheet.setColumnGroup(command.getStartColumn(), command
View Full Code Here

Examples of org.jgraph.graph.CellView

  }

  // Determines if a Cell is a Group
  public boolean isGroup(Object cell) {
    // Map the Cell to its View
    CellView view = graph.getGraphLayoutCache().getMapping(cell, false);
    if (view != null)
      return !view.isLeaf();
    return false;
  }
View Full Code Here

Examples of org.jgraph.graph.CellView

    protected Point2D getInitialLocation(Object[] cells) {
      if (cells != null && cells.length > 0) {
        Rectangle2D ret = null;
        for (int i = 0; i < cells.length; i++) {
          if (graphModel.isEdge(cells[i])) {
            CellView cellView = graphLayoutCache.getMapping(
                cells[i], false);
            if (cellView instanceof EdgeView) {
              EdgeView edgeView = (EdgeView) cellView;
              if (edgeView.getSource() == null) {
                Point2D pt = edgeView.getPoint(0);
View Full Code Here

Examples of org.jgraph.graph.CellView

        }
        if (views != null) { // Start Move if over cell
          Point2D screenPoint = event.getPoint();
          Point2D pt = graph
              .fromScreen((Point2D) screenPoint.clone());
          CellView view = findViewForPoint(pt);
          if (view != null) {
            if (snapSelectedView) {
              Rectangle2D bounds = view.getBounds();
              start = graph.toScreen(new Point2D.Double(bounds
                  .getX(), bounds.getY()));
              snapStart = graph.snap((Point2D) start.clone());
              _mouseToViewDelta_x = screenPoint.getX()
                  - start.getX();
View Full Code Here

Examples of org.jgraph.graph.CellView

              if (constrained && cachedBounds == null) {
                // Reset Initial Positions
                CellView[] all = graphLayoutCache
                    .getAllDescendants(views);
                for (int i = 0; i < all.length; i++) {
                  CellView orig = graphLayoutCache
                      .getMapping(all[i].getCell(), false);
                  AttributeMap attr = orig.getAllAttributes();
                  all[i].changeAttributes((AttributeMap) attr
                      .clone());
                  all[i].refresh(graph.getModel(), context,
                      false);
                }
View Full Code Here

Examples of org.jgraph.graph.CellView

              Map hiddenMapping = graphLayoutCache
                  .getHiddenMapping();
              for (int i = 0; i < cells.length; i++) {
                Object witness = attributes.get(cells[i]);
                if (witness == null) {
                  CellView view = (CellView) hiddenMapping
                      .get(cells[i]);
                  if (view != null
                      && !graphModel.isPort(view
                          .getCell())) {
                    // TODO: Clone required? Same in
                    // GraphConstants.
                    AttributeMap attrs = (AttributeMap) view
                        .getAllAttributes().clone();
                    // Maybe translate?
                    // attrs.translate(dx, dy);
                    attributes.put(cells[i], attrs.clone());
                  }
View Full Code Here

Examples of org.jgraph.graph.CellView

   * This assumes that cell is valid and visible.
   */
  protected boolean startEditing(Object cell, MouseEvent event) {
    completeEditing();
    if (graph.isCellEditable(cell)) {
      CellView tmp = graphLayoutCache.getMapping(cell, false);
      cellEditor = tmp.getEditor();
      editingComponent = cellEditor.getGraphCellEditorComponent(graph,
          cell, graph.isCellSelected(cell));
      if (cellEditor.isCellEditable(event)) {
        Rectangle2D cellBounds = graph.getCellBounds(cell);

View Full Code Here

Examples of org.jgraph.graph.CellView

   * class).
   */
  protected Point2D getEditorLocation(Object cell, Dimension2D editorSize,
      Point2D pt) {
    // Edges have different editor position and size
    CellView view = graphLayoutCache.getMapping(cell, false);
    if (view instanceof EdgeView) {
      EdgeView edgeView = (EdgeView) view;
      CellViewRenderer renderer = edgeView.getRenderer();
      if (renderer instanceof EdgeRenderer) {
        Point2D tmp = ((EdgeRenderer) renderer).getLabelPosition(edgeView);
View Full Code Here

Examples of org.jgraph.graph.CellView

   * <code>current</code> cell. Returns the topmost cell if there are no
   * more cells behind <code>current</code>. Note: This does only return
   * visible cells.
   */
  public Object getNextCellForLocation(Object current, double x, double y) {
    CellView cur = graphLayoutCache.getMapping(current, false);
    CellView cell = getNextViewAt(cur, x, y);
    if (cell != null)
      return cell.getCell();
    return null;
  }
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.