예제 #1
0
    public ImageJRibbonBand() {
      super(
          NAME,
          new BasicResizableIcon(ImageUtil.loadImage(ImageJ.class.getResource("/microscope.gif"))));

      // initialize some static ImageJ stuff

      // home directory
      System.setProperty("plugins.dir", "ij");
      // background color
      ImageJ.backgroundColor = LookAndFeelUtil.getBackground(this);

      // create ImageJ wrapper
      imageJ = new ImageJWrapper();
      imageJComp = new JRibbonComponent(imageJ.getSwingPanel());

      // add ImageJ GUI wrapper to ribbon
      addRibbonComponent(imageJComp, 3);

      RibbonUtil.setRestrictiveResizePolicies(this);
    }
예제 #2
0
 /**
  * Return the image resource from given resource name
  *
  * @param resourceName resource name
  */
 public BufferedImage getImageResource(String resourceName) {
   return ImageUtil.load(getResourceAsStream(resourceName));
 }