private double getDragProxyHeight( final Text nodeLabel ) { final LienzoPanel panel = new LienzoPanel( 100, 100 ); final Layer layer = new Layer(); panel.add( layer ); final TextMetrics tm = nodeLabel.measure( layer.getContext() ); return Math.max( getHeight(), tm.getHeight() ); }
private double getDragProxyHeight( final Text nodeLabel ) { final LienzoPanel panel = new LienzoPanel( 100, 100 ); final Layer layer = new Layer(); panel.add( layer ); final TextMetrics tm = nodeLabel.measure( layer.getContext() ); return Math.max( getHeight(), tm.getHeight() ); }
public FixedTextFactory() { final Text text = makeShape(); final LienzoPanel panel = new LienzoPanel(100, 100); final Layer layer = new Layer(); panel.add(layer); final TextMetrics tm = text.measure(layer.getContext()); TEXT_WIDTH = tm.getWidth(); TEXT_HEIGHT = tm.getHeight(); }
public FixedTextFactory() { final Text text = makeShape(); final LienzoPanel panel = new LienzoPanel(100, 100); final Layer layer = new Layer(); panel.add(layer); final TextMetrics tm = text.measure(layer.getContext()); TEXT_WIDTH = tm.getWidth(); TEXT_HEIGHT = tm.getHeight(); }
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 ) ); }
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 ) ); }
final double high = size.getHeight();
final double high = size.getHeight();
final double high = size.getHeight();
double high = size.getHeight();