Package org.eclipse.swt.graphics

Examples of org.eclipse.swt.graphics.TextLayout.draw()


 
      int x = textBounds.x;
      int y = textBounds.y
          + Math.max(0, (textBounds.height - layoutBounds.height) / 2);
 
      textLayout.draw(gc, x, y);
    }

    if (drawFocus(event)) {
      Rectangle focusBounds = cell.getViewerRow().getBounds();
      gc.drawFocus(focusBounds.x, focusBounds.y, focusBounds.width + deltaOfLastMeasure,
View Full Code Here


       
        final Rectangle clientArea = this.textControl.getClientArea();
        gc.fillRectangle( clientArea );

        layout.setWidth( clientArea.width - TEXT_OFFSET.x * 2 );
        layout.draw( gc, TEXT_OFFSET.x, TEXT_OFFSET.y );
    }
   
    private String getTextWithOverlay()
    {
        String text = this.textControl.getText();
View Full Code Here

               
                final Point offset = ( i == 0 ? TEXT_OFFSET_PRIMARY_COLUMN : TEXT_OFFSET_SECONDARY_COLUMN );
               
                final Rectangle clientArea = item.getTextBounds( i );
                layout.setWidth( clientArea.width );
                layout.draw( event.gc, clientArea.x + offset.x, clientArea.y + offset.y );
            }
        }
    }
   
    private void update()
View Full Code Here

        Rectangle layoutBounds = textLayout.getBounds();
        int x = event.x + tableItem.width - Math.min(size.width, tableItem.width);
        int y = tableItem.y + Math.max(0, (tableItem.height - layoutBounds.height) / 2);

        textLayout.draw(event.gc, x, y);

        if (oldForeground != null)
            event.gc.setForeground(oldForeground);
    }
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.