com.ait.lienzo.client.core.shape.Rectangle.setHeight()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(6.1k)|赞(0)|评价(0)|浏览(105)

本文整理了Java中com.ait.lienzo.client.core.shape.Rectangle.setHeight方法的一些代码示例,展示了Rectangle.setHeight的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Rectangle.setHeight方法的具体详情如下:
包路径:com.ait.lienzo.client.core.shape.Rectangle
类名称:Rectangle
方法名:setHeight

Rectangle.setHeight介绍

[英]Sets the height of this rectangle.
[中]设置此矩形的高度。

代码示例

代码示例来源:origin: kiegroup/appformer

public GridWidgetDnDProxy setHeight(final double height) {
    r.setHeight(height);
    return this;
  }
}

代码示例来源:origin: org.uberfire/uberfire-wires-core-grids

public GridWidgetDnDProxy setHeight(final double height) {
    r.setHeight(height);
    return this;
  }
}

代码示例来源:origin: org.dashbuilder/dashbuilder-lienzo-core

/**
 * Constructor. Creates an instance of a rectangle.
 * 
 * @param width
 * @param height
 */
public Rectangle(final double width, final double height)
{
  super(ShapeType.RECTANGLE);
  setWidth(width).setHeight(height);
}

代码示例来源:origin: com.ahome-it/lienzo-core

@Override
public RectangleSelectionProvider setSize(final double width, final double height)
{
  shape.setWidth(width).setHeight(height);
  return this;
}

代码示例来源:origin: ahome-it/lienzo-core

/**
 * Constructor. Creates an instance of a rectangle.
 *
 * @param width
 * @param height
 */
public Rectangle(final double width, final double height)
{
  super(ShapeType.RECTANGLE);
  setWidth(width).setHeight(height);
}

代码示例来源:origin: ahome-it/lienzo-core

@Override
public RectangleSelectionProvider setSize(final double width, final double height)
{
  shape.setWidth(width).setHeight(height);
  return this;
}

代码示例来源:origin: com.ahome-it/lienzo-core

/**
 * Constructor. Creates an instance of a rectangle.
 *
 * @param width
 * @param height
 */
public Rectangle(final double width, final double height)
{
  super(ShapeType.RECTANGLE);
  setWidth(width).setHeight(height);
}

代码示例来源:origin: ahome-it/lienzo-core

@Override
public RectangleSelectionProvider setSize(final double width, final double height)
{
  shape.setWidth(width).setHeight(height);
  return this;
}

代码示例来源:origin: stackoverflow.com

//A ".copy()" method that returns a rectangle of identical size.
public void copy(){ 
  Rectangle rectangleCopy = new Rectangle(width,height);
  rectangleCopy.setWidth(width); //set width to width of rectangleCopy
  rectangleCopy.setHeight(height); //set height to height of rectangleCopy
}

代码示例来源:origin: ahome-it/lienzo-core

/**
 * Constructor. Creates an instance of a rectangle.
 *
 * @param width
 * @param height
 */
public Rectangle(final double width, final double height)
{
  super(ShapeType.RECTANGLE);
  setWidth(width).setHeight(height);
}

代码示例来源:origin: stackoverflow.com

class Square extends Rectangle {
  ...
}

public void someMethod(final Rectangle r) {
  r.setHeight(300);
  r.setWidth(500);
}

final Square square = new Square(200, 200);
someMethod(square);
display(square);  // UHOH!!

代码示例来源:origin: org.dashbuilder/dashbuilder-lienzo-core

/**
 * Constructor. Creates an instance of rectangle with rounded corners. 
 * 
 * @param width
 * @param height
 * @param cornerRadius
 */
public Rectangle(final double width, final double height, final double cornerRadius)
{
  super(ShapeType.RECTANGLE);
  setWidth(width).setHeight(height).setCornerRadius(cornerRadius);
}

代码示例来源:origin: org.uberfire/uberfire-wires-core-scratchpad

@Override
  public void onMove(double x,
            double y) {
    controlPoint2.setX(controlPoint4.getX());
    controlPoint3.setY(controlPoint4.getY());
    rectangle.setWidth(controlPoint2.getX() - controlPoint1.getX());
    rectangle.setHeight(controlPoint3.getY() - controlPoint1.getY());
    bounding.setWidth(rectangle.getWidth() + BOUNDARY_SIZE);
    bounding.setHeight(rectangle.getHeight() + BOUNDARY_SIZE);
  }
}

代码示例来源:origin: kiegroup/appformer

@Override
  public void onMove(double x,
            double y) {
    controlPoint2.setX(controlPoint4.getX());
    controlPoint3.setY(controlPoint4.getY());
    rectangle.setWidth(controlPoint2.getX() - controlPoint1.getX());
    rectangle.setHeight(controlPoint3.getY() - controlPoint1.getY());
    bounding.setWidth(rectangle.getWidth() + BOUNDARY_SIZE);
    bounding.setHeight(rectangle.getHeight() + BOUNDARY_SIZE);
  }
}

代码示例来源:origin: kiegroup/appformer

public void setHeight(final double height) {
  rectangle.setHeight(height);
  bounding.setHeight(height + BOUNDARY_SIZE);
  controlPoint3.setY(getY() + rectangle.getY() + height);
  controlPoint4.setY(getY() + rectangle.getY() + height);
  magnet1.setY(getY() + rectangle.getY() + height / 2);
  magnet2.setY(getY() + rectangle.getY() + height / 2);
  magnet4.setY(getY() + rectangle.getY() + height);
}

代码示例来源:origin: org.uberfire/uberfire-wires-core-scratchpad

public void setHeight(final double height) {
  rectangle.setHeight(height);
  bounding.setHeight(height + BOUNDARY_SIZE);
  controlPoint3.setY(getY() + rectangle.getY() + height);
  controlPoint4.setY(getY() + rectangle.getY() + height);
  magnet1.setY(getY() + rectangle.getY() + height / 2);
  magnet2.setY(getY() + rectangle.getY() + height / 2);
  magnet4.setY(getY() + rectangle.getY() + height);
}

代码示例来源:origin: org.uberfire/uberfire-wires-core-scratchpad

@Override
  public void onMove(double x,
            double y) {
    controlPoint1.setX(controlPoint3.getX());
    controlPoint4.setY(controlPoint3.getY());
    rectangle.setX(x - getX());
    rectangle.setWidth(controlPoint2.getX() - controlPoint1.getX());
    rectangle.setHeight(controlPoint3.getY() - controlPoint1.getY());
    bounding.setX(rectangle.getX() - (BOUNDARY_SIZE / 2));
    bounding.setWidth(rectangle.getWidth() + BOUNDARY_SIZE);
    bounding.setHeight(rectangle.getHeight() + BOUNDARY_SIZE);
  }
}

代码示例来源:origin: org.drools/drools-wb-guided-dtable-editor-client

@Override
public void setVisibleBounds( final Bounds bounds ) {
  radarLayer.remove( visibleBounds );
  visibleBounds.setLocation( new Point2D( bounds.getX(),
                      bounds.getY() ) );
  visibleBounds.setHeight( bounds.getHeight() );
  visibleBounds.setWidth( bounds.getWidth() );
  radarLayer.add( visibleBounds );
  visibleBounds.moveToTop();
  radarLayer.batch();
}

代码示例来源:origin: kiegroup/drools-wb

@Override
public void setVisibleBounds( final Bounds bounds ) {
  radarLayer.remove( visibleBounds );
  visibleBounds.setLocation( new Point2D( bounds.getX(),
                      bounds.getY() ) );
  visibleBounds.setHeight( bounds.getHeight() );
  visibleBounds.setWidth( bounds.getWidth() );
  radarLayer.add( visibleBounds );
  visibleBounds.moveToTop();
  radarLayer.batch();
}

代码示例来源:origin: org.drools/drools-wb-guided-dtree-editor-client

public void setLabel( final String label ) {
  final Layer scratchLayer = new Layer();
  final LienzoPanel scratchPanel = new LienzoPanel( 100, 100 );
  scratchPanel.add( scratchLayer );
  text.setText( label );
  final TextMetrics tm = text.measure( scratchLayer.getContext() );
  final double cw = tm.getWidth() + 10;
  final double ch = tm.getHeight() + 10;
  container.setWidth( cw );
  container.setHeight( ch );
  container.setLocation( new Point2D( -cw / 2,
                    -ch / 2 ) );
}

相关文章

微信公众号

最新文章

更多