Package org.eclipse.swt.graphics

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


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

  /**
   * @see org.eclipse.gef.tools.DirectEditManager#initCellEditor()
   */
 
View Full Code Here


    gc.drawRectangle(tBottomRect1.x + (int) botTXPos, tBottomRect1.y + (int) botTYPos, tBottomRect1.width,
        tBottomRect1.height);
    gc.drawRectangle(tBottomRect2.x + (int) botTXPos, tBottomRect2.y + (int) botTYPos, tBottomRect2.width,
        tBottomRect2.height);

    font.dispose();
  }

  /**
   * This helper method determines whether or not the cursor is positioned over a handle.
   *
 
View Full Code Here

      oldFont = itemFont;
      itemFont = new Font(display, fontData);
      setItemFont();
      setExampleWidgetSize();
      if (oldFont != null)
        oldFont.dispose();
    }
      break;
    case CELL_FOREGROUND_COLOR: {
      Color oldColor = cellForegroundColor;
      if (oldColor == null)
View Full Code Here

      oldFont = cellFont;
      cellFont = new Font(display, fontData);
      setCellFont();
      setExampleWidgetSize();
      if (oldFont != null)
        oldFont.dispose();
    }
      break;
    default:
      super.changeFontOrColor(index);
    }
View Full Code Here

      oldColor.dispose();
    Font oldFont = font;
    itemFont = null;
    setItemFont();
    if (oldFont != null)
      oldFont.dispose();
    oldColor = cellForegroundColor;
    cellForegroundColor = null;
    setCellForeground();
    if (oldColor != null)
      oldColor.dispose();
View Full Code Here

      oldColor.dispose();
    oldFont = font;
    cellFont = null;
    setCellFont();
    if (oldFont != null)
      oldFont.dispose();
  }

  void resetSortState(final Tree tree) {
    tree.setSortDirection(SWT.NONE);
    TreeColumn[] columns = tree.getColumns();
View Full Code Here

      oldFont = itemFont;
      itemFont = new Font(display, fontData);
      setItemFont();
      setExampleWidgetSize();
      if (oldFont != null)
        oldFont.dispose();
    }
      break;
    default:
      super.changeFontOrColor(index);
    }
View Full Code Here

      oldColor.dispose();
    Font oldFont = itemFont;
    itemFont = null;
    setItemFont();
    if (oldFont != null)
      oldFont.dispose();
  }

  /**
   * Sets the state of the "Example" widgets.
   */
 
View Full Code Here

      String text = GraphicsExample.getResourceString("SWT"); //$NON-NLS-1$
      Font font = new Font(device, "Times", 200, SWT.NORMAL);
      gc.setFont(font);
      Point size = gc.stringExtent(text);
      path.addString(text, (width - size.x) / 2, (height - size.y) / 2, font);
      font.dispose();
      gc.setClipping(path);
      path.dispose();
      break;
    case 4: // star
      path = new Path(device);
View Full Code Here

      oldFont = font; // dispose old font when done
      font = new Font(display, fontData);
      setExampleWidgetFont();
      setExampleWidgetSize();
      if (oldFont != null)
        oldFont.dispose();
    }
      break;
    }
  }
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.