Package org.eclipse.jface.resource

Examples of org.eclipse.jface.resource.LocalResourceManager


    private LocalResourceManager resourceManager;

    public synchronized LocalResourceManager getResourceManager() {
        if (resourceManager == null) {
            resourceManager = new LocalResourceManager(JFaceResources.getResources());
        }
        return resourceManager;
    }
View Full Code Here


    /**
     * Creates a new workbench label provider.
     */
    public CopiedWorkbenchLabelProvider() {
        PlatformUI.getWorkbench().getEditorRegistry().addPropertyListener(editorRegistryListener);
        this.resourceManager = new LocalResourceManager(JFaceResources.getResources());
    }
View Full Code Here

   *
   * @param control
   *            viewer where label provided is used.
   */
  public CheckboxLabelProvider(final Control control) {
    resourceManager = new LocalResourceManager(getResources());
    checkBoxes = createCheckboxImage(resourceManager, control);
  }
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

    TreeViewerColumn messageColumn = createColumn(layout,
        UIText.ReflogView_MessageColumnHeader, 40, SWT.LEFT);
    messageColumn.setLabelProvider(new ColumnLabelProvider() {

      private ResourceManager resourceManager = new LocalResourceManager(
          JFaceResources.getResources());

      @Override
      public String getText(Object element) {
        final ReflogEntry entry = (ReflogEntry) element;
        return entry.getComment();
      }

      public Image getImage(Object element) {
        String comment = ((ReflogEntry) element).getComment();
        if (comment.startsWith("commit:") || comment.startsWith("commit (initial):")) //$NON-NLS-1$ //$NON-NLS-2$
          return (Image) resourceManager.get(UIIcons.COMMIT);
        if (comment.startsWith("commit (amend):")) //$NON-NLS-1$
          return (Image) resourceManager.get(UIIcons.AMEND_COMMIT);
        if (comment.startsWith("pull")) //$NON-NLS-1$
          return (Image) resourceManager.get(UIIcons.PULL);
        if (comment.startsWith("clone")) //$NON-NLS-1$
          return (Image) resourceManager.get(UIIcons.CLONEGIT);
        if (comment.startsWith("rebase")) //$NON-NLS-1$
          return (Image) resourceManager.get(UIIcons.REBASE);
        if (comment.startsWith("merge")) //$NON-NLS-1$
          return (Image) resourceManager.get(UIIcons.MERGE);
        if (comment.startsWith("fetch")) //$NON-NLS-1$
          return (Image) resourceManager.get(UIIcons.FETCH);
        if (comment.startsWith("branch")) //$NON-NLS-1$
          return (Image) resourceManager.get(UIIcons.CREATE_BRANCH);
        if (comment.startsWith("checkout")) //$NON-NLS-1$
          return (Image) resourceManager.get(UIIcons.CHECKOUT);
        return null;
      }

      public void dispose() {
        resourceManager.dispose();
        super.dispose();
      }
    });

    new OpenAndLinkWithEditorHelper(refLogTableTreeViewer) {
View Full Code Here

    return workbenchLabelProvider;
  }

  private ResourceManager getImageCache() {
    if (imageCache == null)
      imageCache = new LocalResourceManager(JFaceResources.getResources());
    return imageCache;
  }
View Full Code Here

   
    public boolean markFinished(Font boldFont, Display display) {
        checkHashMaps();
        BoldFontDescriptor desc = (BoldFontDescriptor)descriptors.get(boldFont);
        if (desc != null) {
            LocalResourceManager resourceManager = manager.getResourceManager(display);
            resourceManager.destroyFont(desc);
            if (resourceManager.find(desc) == null) {
                descriptors.remove(boldFont);
                validateHashMaps();
            }
            return true;
           
View Full Code Here

    public LocalResourceManager getResourceManager(Display display) {
        if (resourceManagers == null) {
            resourceManagers = new HashMap();
        }
        LocalResourceManager resources = (LocalResourceManager)resourceManagers.get(display);
        if (resources == null) {
            pruneResourceManagers();
            resources = new LocalResourceManager(JFaceResources.getResources(display));
            resourceManagers.put(display, resources);
        }
        return resources;
    }
View Full Code Here

public class StartupProgressDialog extends ProgressMonitorDialog {
  private LocalResourceManager fResources;

  public StartupProgressDialog() {
    super(null);
    fResources = new LocalResourceManager(JFaceResources.getResources());
  }
View Full Code Here

  public LoginDialog(Shell parentShell, URI link, String realm, boolean isSyncLogin) {
    super(parentShell);
    fLink = link;
    fRealm = realm;
    fIsSyncLogin = isSyncLogin;
    fResources = new LocalResourceManager(JFaceResources.getResources());
    fCredProvider = Owl.getConnectionService().getCredentialsProvider(link);
    fPreferences = Owl.getPreferenceService().getGlobalScope();
  }
View Full Code Here

TOP

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

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.