Package org.eclipse.swt.graphics

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


            }
            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(), style,
                            height);
                }
            }
            tmpFont.dispose();
            tmpGC.dispose();
        }
        return new java.awt.Font(fontData.getName(), style, height);
    }
View Full Code Here

                .get(JFaceResources.DEFAULT_FONT);
        if (record == null) {
            Font defaultFont = calculateDefaultFont();
            record = createFont(JFaceResources.DEFAULT_FONT, defaultFont
                    .getFontData());
            defaultFont.dispose();
            stringToFontRecord.put(JFaceResources.DEFAULT_FONT, record);
        }
        return record;
    }
View Full Code Here

      final Font font = new Font(text.getDisplay(),
          "Lucida Grande", 13, SWT.NORMAL); //$NON-NLS-1$
      text.setFont(font);
      text.addDisposeListener(new DisposeListener() {
        public void widgetDisposed(DisposeEvent e) {
          font.dispose();
        }
      });
    }

    // Add the key listener.
View Full Code Here

    shell.addDisposeListener(new DisposeListener() {

      @Override
      public void widgetDisposed(DisposeEvent pE) {
        font20Height.dispose();
        font20HeightBold.dispose();
      }
    });

    shell.pack();
    shell.open();
View Full Code Here

        final Font font = new Font(shell.getDisplay(), fds);
        titleLabel.addListener(SWT.Dispose, new Listener()
        {
          public void handleEvent(Event event)
          {
            font.dispose();
          }
        });
        titleLabel.setFont(font);
        selectionControls.add(titleLabel);
      }
View Full Code Here

    // Draw the text
    gc.setForeground(color);
    gc.drawText(string, rectangle.x + row * width + (width - extent.x) / 2,
        rectangle.y + column * height + (height - extent.y) / 2);
    // Cleanu
    font.dispose();

    gc.setBackground(GUI.BLACK);

    // Draw the horizontal lines.
    if (column == 0 || column == 3 || column == 6)
View Full Code Here

    // This method might be re-entered when super.bringDown() is called.
    Font disposeFont = scaledFont;
    scaledFont = null;
    super.bringDown();
    if (disposeFont != null) {
      disposeFont.dispose();
    }
  }

  @Override
  public CellEditor getCellEditor() {
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.