Package org.eclipse.swt.graphics

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


                    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

                .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

    }
   
    context.popState();

    if(font != null)
      font.dispose();

    // don't reflect text output in advancement
    return new Point(0,0);
  }
}
View Full Code Here

     *            the font to be stored
     */
    public void put(String key, Font font) {
        Font oldFont = fonts.get(key);
        if (oldFont != null) {
            oldFont.dispose();
        }
        fonts.put(key, font);
    }

    /**
 
View Full Code Here

     */
    public void removeFont(String key) {
        Font font = fonts.get(key);
        if (font != null) {
            fonts.remove(key);
            font.dispose();
        }
    }

    /**
     * Removes the color associated with the given key. This method will be
View Full Code Here

  public void setFont(Font font) {
    super.setFont(font);
    model.clearCache(null);
    Font boldFont = (Font) resourceTable.get(FormTextModel.BOLD_FONT_ID);
    if (boldFont != null) {
      boldFont.dispose();
      resourceTable.remove(FormTextModel.BOLD_FONT_ID);
    }
    ensureBoldFontPresent(getFont());
  }
View Full Code Here

  private void disposeResourceTable(boolean disposeBoldFont) {
    if (disposeBoldFont) {
      Font boldFont = (Font) resourceTable
          .get(FormTextModel.BOLD_FONT_ID);
      if (boldFont != null) {
        boldFont.dispose();
        resourceTable.remove(FormTextModel.BOLD_FONT_ID);
      }
    }
    ArrayList imagesToRemove = new ArrayList();
    for (Enumeration enm = resourceTable.keys(); enm.hasMoreElements();) {
View Full Code Here

      disposeFont();
      if (!isSharedFont)
        fFont= font;
    } else if (!isSharedFont) {
      font.dispose();
    }
  }

  /**
   * Disposes of the non-shared font.
View Full Code Here

    fd[0].setStyle(SWT.BOLD);
    final Font newFont = new Font(parentComposite.getDisplay(), fd[0]);
    header.setFont(newFont);
    header.addDisposeListener(new DisposeListener() {
        public void widgetDisposed(DisposeEvent e) {
          newFont.dispose();
        }
    });

    final Collection<ITag> tagList = taggable.getAllTags();
    tagLabelList = new ArrayList<Label>(tagList.size());
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.