Package org.eclipse.jface.resource

Examples of org.eclipse.jface.resource.ResourceManager


   * @return <code>true</code> if there are images for this action,
   *         <code>false</code> if not
   */
  private boolean updateImages(boolean forceImage) {

    ResourceManager parentResourceManager = JFaceResources.getResources();

    if (widget instanceof ToolItem) {
      if (USE_COLOR_ICONS) {
        ImageDescriptor image = action.getHoverImageDescriptor();
        if (image == null) {
View Full Code Here


        public void invoke(Widget toCall, DeviceResourceDescriptor newDescriptor) {
            if (newDescriptor == oldDescriptor) {
                return;
            }
           
            ResourceManager mgr = JFaceResources.getResources(toCall.getDisplay());
           
            Object newResource;
            try {
                newResource = newDescriptor == null? null : mgr.create(newDescriptor);
            } catch (DeviceResourceException e1) {
                WorkbenchPlugin.log(e1);
                return;
            }
           
            try {
                method.invoke(toCall, new Object[] {newResource});
            } catch (IllegalArgumentException e) {
                throw e;
            } catch (IllegalAccessException e) {
                WorkbenchPlugin.log(e);
                return;
            } catch (InvocationTargetException e) {
                if (e.getTargetException() instanceof RuntimeException) {
                    throw (RuntimeException)e.getTargetException();
                }
                WorkbenchPlugin.log(e);
                return;
            }
           
            // Deallocate the old image
            if (oldDescriptor != null) {
                // Dispose the image
                mgr.destroy(oldDescriptor);
            }
           
            // Remember the new image for next time
           
            oldDescriptor = newDescriptor;           
View Full Code Here

        }

        public void dispose() {
            // Deallocate the old image
            if (oldDescriptor != null) {
                ResourceManager mgr = JFaceResources.getResources();
                // Dispose the image
                mgr.destroy(oldDescriptor);
                oldDescriptor = null;
            }               

        }
View Full Code Here

  @Override
  protected Control createDialogArea(Composite parent) {
    Composite main = new Composite(parent, SWT.NONE);
    main.setLayout(new GridLayout(1, false));
    GridDataFactory.fillDefaults().grab(true, true).applyTo(main);
    final ResourceManager resources = new LocalResourceManager(
        JFaceResources.getResources());
    UIUtils.hookDisposal(main, resources);
    table = new CommitGraphTable(main, null, resources);
    table.setRelativeDate(GitHistoryPage.isShowingRelativeDates());
    table.getTableView().addSelectionChangedListener(
View Full Code Here

   * @return <code>true</code> if there are images for this action,
   *         <code>false</code> if not
   */
  private boolean updateImages(boolean forceImage) {

    ResourceManager parentResourceManager = JFaceResources.getResources();

    if (widget instanceof ToolItem) {
      if (USE_COLOR_ICONS) {
        ImageDescriptor image = action.getHoverImageDescriptor();
        if (image == null) {
View Full Code Here

TOP

Related Classes of org.eclipse.jface.resource.ResourceManager

Copyright © 2018 www.massapicom. 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.