Package org.dyno.visual.swing.base

Examples of org.dyno.visual.swing.base.ImageSelectionDialog$ProjectTreeContent


        openDialog(shell);
      }
    });
  }
  private void openDialog(Shell shell){
    ImageSelectionDialog isd = new ImageSelectionDialog(shell);
    if (isd.open() == Window.OK) {
      IFile file = isd.getImageFile();
      IPath location = file.getFullPath();
      location = location.removeFirstSegments(2);
      String path = location.toString();
      if (!path.startsWith("/"))
        path += "/" + path;
View Full Code Here


  }

  private Image lblImage;

  private void selectIcon() {
    ImageSelectionDialog isd = new ImageSelectionDialog(getShell());
    if (imgFile != null)
      isd.setImageFile(imgFile);
    int ret = isd.open();
    if (ret == Window.OK) {
      IFile file = isd.getImageFile();
      setIcon(file);
      setImageFile(file);
    }
  }
View Full Code Here

    return null;
  }

  protected Object openDialogBox(Control cellEditorWindow) {
    try {
      ImageSelectionDialog isd = new ImageSelectionDialog(
          cellEditorWindow.getShell());
      String text = iconText.getText();
      if (text != null && text.trim().length() > 0) {
        IJavaProject javaProject = VisualSwingPlugin.getCurrentProject();
        if (javaProject != null) {
          IPackageFragmentRoot src_root = getSourceRoot(javaProject);
          if (src_root != null) {
            String srcName = src_root.getElementName();
            IProject prj = javaProject.getProject();
            IFile file = prj.getFolder(srcName).getFile(text);
            if (file != null && file.exists())
              isd.setImageFile(file);
          }
        }
      }
      int ret = isd.open();
      if (ret == Window.OK) {
        IFile file = isd.getImageFile();
        if (file == null) {
          return "";
        } else {
          IPath location = file.getFullPath();
          location = location.removeFirstSegments(2);
View Full Code Here

TOP

Related Classes of org.dyno.visual.swing.base.ImageSelectionDialog$ProjectTreeContent

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.