Package org.eclipse.swt.graphics

Examples of org.eclipse.swt.graphics.Font.dispose()


        // }

        colorBg1.dispose();
        colorFg1.dispose();
        colorFg2.dispose();
        font.dispose();
        gc.dispose();
      }
    });

    FormData data = new FormData();
View Full Code Here


        gc.drawText(title, 10, (25 - (gc.textExtent(title).y / 2))/3*2, SWT.DRAW_DELIMITER | SWT.CENTER | SWT.DRAW_TRANSPARENT);
        Font font2 = new Font(null, "Arial", 10, SWT.NONE);
        gc.setFont(font2);
        gc.drawText(icon, 10, (25 - (gc.textExtent(title).y / 2))/3*5, SWT.DRAW_DELIMITER | SWT.CENTER | SWT.DRAW_TRANSPARENT);
        font1.dispose();
        font2.dispose();
    }

    private void drawTextForItens(GC gc) {
        String []title2;
        StringBuffer stringBuffer = new StringBuffer();
View Full Code Here

        StringBuffer stringBuffer = new StringBuffer();
        int y = 135;
       
        Font font = new Font(null, "Arial", 10, SWT.BOLD);
        gc.setFont(font);
        font.dispose();
       
        title2 = title.split(" ");       
        for(int x=0;x<title2.length;x++){
            if(gc.textExtent(stringBuffer.toString()+" "+title2[x]).x  <  120 && x+1!=title2.length){
                stringBuffer.append(" " +title2[x]);
View Full Code Here

        updateForDialogFontChange(appliedDialogFont);
        getApplyButton().setFont(appliedDialogFont);
        getDefaultsButton().setFont(appliedDialogFont);

        if (oldFont != null) {
      oldFont.dispose();
    }
    }

    /**
     *
 
View Full Code Here

            tmpGC.setFont(tmpFont);
            if (tmpGC.textExtent(Az).x
                    > DUMMY_PANEL.getFontMetrics(font).stringWidth(Az)) {
                while (tmpGC.textExtent(Az).x
                        > DUMMY_PANEL.getFontMetrics(font).stringWidth(Az)) {
                    tmpFont.dispose();
                    height--;
                    fontData.setHeight(height);
                    tmpFont = new Font(device, fontData);
                    tmpGC.setFont(tmpFont);
                }
View Full Code Here

            }
            else if (tmpGC.textExtent(Az).x
                    < DUMMY_PANEL.getFontMetrics(font).stringWidth(Az)) {
                while (tmpGC.textExtent(Az).x
                        < DUMMY_PANEL.getFontMetrics(font).stringWidth(Az)) {
                    tmpFont.dispose();
                    height++;
                    fontData.setHeight(height);
                    tmpFont = new Font(device, fontData);
                    tmpGC.setFont(tmpFont);
                }
View Full Code Here

                    fontData.setHeight(height);
                    tmpFont = new Font(device, fontData);
                    tmpGC.setFont(tmpFont);
                }
            }
            tmpFont.dispose();
            tmpGC.dispose();
        }
        return fontData;
    }
View Full Code Here

                    height++;
                    tmpAwtFont = new java.awt.Font(fontData.getName(),
                            fontData.getStyle(), height);
                }
            }
            tmpFont.dispose();
            tmpGC.dispose();
        }
        return new java.awt.Font(fontData.getName(), fontData.getStyle(),
                height);
    }
View Full Code Here

            tmpGC.setFont(tmpFont);
            if (tmpGC.textExtent(Az).x
                    > DUMMY_PANEL.getFontMetrics(font).stringWidth(Az)) {
                while (tmpGC.textExtent(Az).x
                        > DUMMY_PANEL.getFontMetrics(font).stringWidth(Az)) {
                    tmpFont.dispose();
                    height--;
                    fontData.setHeight(height);
                    tmpFont = new Font(device, fontData);
                    tmpGC.setFont(tmpFont);
                }
View Full Code Here

            }
            else if (tmpGC.textExtent(Az).x
                    < DUMMY_PANEL.getFontMetrics(font).stringWidth(Az)) {
                while (tmpGC.textExtent(Az).x
                        < DUMMY_PANEL.getFontMetrics(font).stringWidth(Az)) {
                    tmpFont.dispose();
                    height++;
                    fontData.setHeight(height);
                    tmpFont = new Font(device, fontData);
                    tmpGC.setFont(tmpFont);
                }
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.