Esempio n. 1
0
  public static void main(String[] args) throws IOException {
    if (args.length != 1) {
      System.err.printf("Usage: DesignerApplication propertyFile\n");
      System.exit(-1);
    }

    Properties properties = parseProperties(args[0]);
    String repositoryFile = properties.getProperty("octopus.repository.file");
    if (repositoryFile == null || repositoryFile.length() == 0) {
      System.err.printf(
          "The property file %s is missing the octopus.repository.file property", args[0]);
      System.exit(-1);
    }

    OctopusRepository repository = new OctopusDb4oRepository(repositoryFile);
    LookAndFeelFactory.installDefaultLookAndFeelAndExtension();
    final DesignerFrame designerFrame = new DesignerFrame(repository);
    try {
      designerFrame.loadInitialDataFromRepository();

      SwingUtilities.invokeLater(
          new Runnable() {
            @Override
            public void run() {
              designerFrame.setVisible(true);
            }
          });
    } catch (RepositoryException e) {
      ErrorDialog.showErrorDialog(null, e, "Problem loading initial data from repository");
    }
  }
  public static void main(String[] args) {
    try {
      UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
      LookAndFeelFactory.installJideExtension();
    } catch (ClassNotFoundException e) {
    } catch (InstantiationException e) {
    } catch (IllegalAccessException e) {
    } catch (UnsupportedLookAndFeelException e) {
    }

    _frame = new JideButtonDemo("Demo of JideButton");
    _frame.setIconImage(JideIconsFactory.getImageIcon(JideIconsFactory.JIDE32).getImage());
    _frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

    JPanel panel = new JPanel(new GridLayout(6, 1));
    _buttons = new JideButton[6];
    _buttons[0] =
        createHyperlinkButton(
            "Rename this file",
            ButtonsIconsFactory.getImageIcon(ButtonsIconsFactory.Buttons.RENAME));
    _buttons[1] =
        createHyperlinkButton(
            "Move this file", ButtonsIconsFactory.getImageIcon(ButtonsIconsFactory.Buttons.MOVE));
    _buttons[2] =
        createHyperlinkButton(
            "Copy this file", ButtonsIconsFactory.getImageIcon(ButtonsIconsFactory.Buttons.COPY));
    _buttons[3] =
        createHyperlinkButton(
            "Publish this file",
            ButtonsIconsFactory.getImageIcon(ButtonsIconsFactory.Buttons.PUBLISH));
    _buttons[4] =
        createHyperlinkButton(
            "Email this file", ButtonsIconsFactory.getImageIcon(ButtonsIconsFactory.Buttons.EMAIL));
    _buttons[5] =
        createHyperlinkButton(
            "Delete this file",
            ButtonsIconsFactory.getImageIcon(ButtonsIconsFactory.Buttons.DELET));
    for (int i = 0; i < _buttons.length; i++) {
      JideButton button = _buttons[i];
      panel.add(button);
    }

    panel.setBorder(BorderFactory.createEmptyBorder(12, 12, 12, 12));
    _frame.getContentPane().setLayout(new BorderLayout());
    _frame.getContentPane().add(createOptionsPanel(), BorderLayout.AFTER_LINE_ENDS);
    JPanel topPanel = JideSwingUtilities.createTopPanel(panel);
    topPanel.setBorder(BorderFactory.createLoweredBevelBorder());
    _frame.getContentPane().add(topPanel, BorderLayout.CENTER);

    _frame.setBounds(10, 10, 300, 500);

    _frame.setVisible(true);
  }
  public static void main(String[] args) {
    try {
      // UIManager.setLookAndFeel(new org.jvnet.substance.skin.SubstanceCremeCoffeeLookAndFeel());
      LookAndFeelFactory.installDefaultLookAndFeel();
      ImageFileExplorer explorer =
          new ImageFileExplorer(VFS.getManager().resolveFile("C:/javacode"));
      SearchableImageFileExplorer sexplorer = new SearchableImageFileExplorer(explorer);

      JFrame frame = new JFrame();
      frame.add(sexplorer.getComponent(), BorderLayout.CENTER);
      frame.pack();
      frame.setVisible(true);

    } catch (Exception e) {
      e.printStackTrace();
    }
  }
 public static void main(String[] args) {
   LookAndFeelFactory.installDefaultLookAndFeelAndExtension();
   showAsFrame(new AutoCompletionDemo());
 }
 public static void main(String[] args) {
   LookAndFeelFactory.installDefaultLookAndFeelAndExtension();
   showAsFrame(new CubicSplinesChartDemo());
 }
 public static void main(String[] s) {
   LookAndFeelFactory.installDefaultLookAndFeelAndExtension();
   showAsFrame(new StyledLabelPerformanceDemo());
 }
 public static void main(String[] args) {
   LookAndFeelFactory.installDefaultLookAndFeelAndExtension();
   showAsFrame(new JideTableDemo());
 }
 public static void main(String[] args) {
   LookAndFeelFactory.installDefaultLookAndFeelAndExtension();
   showAsFrame(new DockableFrameDashboardDemo());
 }