Package org.eclipse.draw2d

Examples of org.eclipse.draw2d.Label.translateToAbsolute()


      pref = text.computeSize(-1, -1);
    }

    Label label = vertexFigure.getLabelId();
    Rectangle labelBounds = label.getBounds().getCopy();
    label.translateToAbsolute(labelBounds);

    Rectangle figureBounds = vertexFigure.getBounds().getCopy();
    vertexFigure.translateToAbsolute(figureBounds);
    int start = (figureBounds.width - pref.x) / 2;
View Full Code Here


        Rectangle bounds = label.getBounds();
        int x = bounds.x + bounds.width + 5;
        int y = bounds.y + bounds.height / 2;

        Point ref = new Point(x, y);
        label.translateToAbsolute(ref);

        return ref;
      } else {
        label = figure.getInputPortLabel(portName);
        if (label == null) {
View Full Code Here

        Rectangle bounds = label.getBounds();
        int x = bounds.x - 5;
        int y = bounds.y + bounds.height / 2;

        Point ref = new Point(x, y);
        label.translateToAbsolute(ref);

        return ref;
      }
    }
  }
View Full Code Here

              Text text = (Text) celleditor.getControl();
              Point sel = text.getSelection();
              Point pref = text.computeSize(-1, -1);
              Label label = getDirectEditLabel();
              Rectangle rect = label.getTextBounds().getCopy();
              label.translateToAbsolute(rect);
              text.setBounds(rect.x - 4, rect.y - 1, pref.x + 1, pref.y + 1);
              text.setSelection(0);
              text.setSelection(sel);
            }
          });
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.