Esempio n. 1
0
 protected void _actionPerformed(ActionEvent e) {
   show = !show;
   if (show) {
     putValue(NAME, "Hide Views");
     Log.info("Views showing.");
   } else {
     putValue(NAME, "Show Views");
     Log.info("Views hidden.");
   }
   MainFrame.INSTANCE.showViews(show);
 }
Esempio n. 2
0
  public static final void main(String[] args) {
    ResourceLoader.scalingHint = Image.SCALE_SMOOTH;
    setupUI(args);

    DrawDialog splash = new DrawDialog(null, APP_NAME + " Splash", true);
    splash.setModal(false);
    ImageIcon icon = ResourceLoader.getImage("jdomain/jdraw/images/logo.png");
    splash.getContentPane().add(new JLabel(icon));
    splash.open();

    preload();
    Picture picture = null;
    final int len = args.length;
    if (len > 0) {
      for (int i = 0; i < len; i++) {
        if (args[i] != null) {
          picture = LoadAction.readImage(args[i]);
          break;
        }
      }
    }
    if (picture == null) {
      picture = Picture.createDefaultPicture();
    }
    setPicture(picture);
    ResourceLoader.getImage("jdomain/jdraw/images/background.gif");

    Util.delay(SPLASH_DELAY);
    splash.close();
    ((DrawMenu) MainFrame.INSTANCE.getJMenuBar()).buildLastFilesMenu();
    DrawBrowser.INSTANCE.setOpenDir(Settings.INSTANCE.getOpenDir());
    DrawBrowser.INSTANCE.setSaveDir(Settings.INSTANCE.getSaveDir());
    ToolPanel.INSTANCE.getCurrentTool().activate();
    MainFrame.INSTANCE.setVisible(true);

    Log.info("Happy drawing!");
  }
Esempio n. 3
0
 public static final void setPicture(Picture pic) {
   MainFrame.INSTANCE.setPicture(pic);
 }
Esempio n. 4
0
 public static boolean isVisible(Picture pic) {
   return pic == MainFrame.INSTANCE.getPicture();
 }