Package net.laubenberger.bogatyr.view.swing

Examples of net.laubenberger.bogatyr.view.swing.Panel


  private void createLayout() {
    getContentPane().removeAll();

    setTitle(view.getController().getModel().getName() + HelperString.COLON + HelperString.SPACE + localizer.getValue(HelperResource.RES_ACTION_ABOUT));

    final JPanel panel = new Panel(new BorderLayout());
    panel.setBorder(BorderFactory.createEmptyBorder(10, 10, 5, 10));
   
    final JPanel panelWest = new Panel(new BorderLayout());
    panelWest.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 10));
   
    final JPanel panelEast = new Panel(new GridLayout(0, 1));
    panelEast.setBorder(BorderFactory.createEmptyBorder(0, 0, 10, 10));
   
    panelWest.add(new Label(view.getController().getScaledIcon(Icon.LOGO)), BorderLayout.NORTH);
   
    panelEast.add(new Label(view.getController().getModel().getName() + HelperString.SPACE  + view.getController().getModel().getVersion()));
    panelEast.add(new JXTitledSeparator(null));
    panelEast.add(new Label(HelperString.COPYRIGHT + " 2010-2011:")); //$NON-NLS-1$
    panelEast.add(new Label());
    panelEast.add(new Label("Stefan Laubenberger")); //$NON-NLS-1$
    panelEast.add(new Label("Bullingerstrasse 53")); //$NON-NLS-1$
    panelEast.add(new Label("CH-8004 Zürich")); //$NON-NLS-1$
    panelEast.add(new Label());
    final JXHyperlink link = new JXHyperlink();
    final JXHyperlink mail = new JXHyperlink();
    try {
      link.setURI(new URI(HelperResource.URL));
//      link.setURI(view.getController().getModel().getUrl().toURI());
      mail.setURI(new URI(HelperResource.MAIL));
//      mail.setText(HelperResource.MAIL);
    } catch (URISyntaxException ex) {
      //should never happen!
      log.error("Invalid URI", ex); //$NON-NLS-1$
    }
    panelEast.add(link);
    panelEast.add(mail);
    panelEast.add(new Label());
// 
    panel.add(panelWest, BorderLayout.WEST);
    panel.add(panelEast, BorderLayout.EAST);
   
    final Group group = new Group(new Insets(0, 0, 0, 10), new Button(new ActionClose()), new Button(new ActionInfo()));
View Full Code Here


    getContentPane().removeAll();

    setTitle(mp.getModel().getName() + HelperString.COLON + HelperString.SPACE
        + localizer.getValue(HelperResource.RES_ACTION_ABOUT));

    final Panel panel = new Panel(new BorderLayout());
    panel.setBorder(BorderFactory.createEmptyBorder(10, 10, 5, 10));

    final Panel panelWest = new Panel(new BorderLayout());
    panelWest.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 10));

    final Panel panelEast = new Panel(new GridLayout(0, 1));
    panelEast.setBorder(BorderFactory.createEmptyBorder(0, 0, 10, 10));

    panelWest.add(new Label(mp.getCallback().getScaledIcon(mp.getLogo())), BorderLayout.NORTH);

    panelEast.add(new Label(mp.getModel().getName() + HelperString.SPACE + mp.getModel().getVersion()));
    panelEast.add(new JXTitledSeparator(null));
    panelEast.add(new Label(HelperString.COPYRIGHT + " 2011:"));
    panelEast.add(new Label());
    panelEast.add(new Label("Stefan Laubenberger"));
    panelEast.add(new Label("Bullingerstrasse 53"));
    panelEast.add(new Label("CH-8004 Zürich"));
    panelEast.add(new Label());
    final JXHyperlink link = new JXHyperlink();
    final JXHyperlink mail = new JXHyperlink();
    try {
      link.setURI(new URI(HelperResource.URL));
      mail.setURI(new URI(HelperResource.MAIL));
    } catch (URISyntaxException ex) {
      //should never happen!
      log.error("Invalid URI", ex); //$NON-NLS-1$
    }
    panelEast.add(link);
    panelEast.add(mail);
    panelEast.add(new Label());
   
    panel.add(panelWest, BorderLayout.WEST);
    panel.add(panelEast, BorderLayout.EAST);

    final Group group = new Group(new Insets(0, 0, 0, 0), new Button(new ActionClose()));
View Full Code Here

    getContentPane().add(new PaneScroll(containerTask));
    pack();
  }

  private JXTaskPane createTaskPane(final Task task) {
    final JPanel panel = new Panel(new BorderLayout());

    final JLabel label = new Label(task.getText());
    panel.add(label, BorderLayout.NORTH);

    final JProgressBar pb = new ProgressBar();
    pb.setIndeterminate(true);
    panel.add(pb, BorderLayout.CENTER);

    final JButton button = new Button(localizer.getValue(HelperResource.RES_LABEL_CANCEL_TASK), view.getController()
        .getScaledIcon(Icon.CANCEL), localizer.getTooltip(HelperResource.RES_LABEL_CANCEL_TASK));
    button.addActionListener(new ActionListener() {

      @Override
      public void actionPerformed(final ActionEvent e) {
        task.getWorker().cancel(true);
      }
    });
    panel.add(button, BorderLayout.EAST);

    final JXTaskPane tp = new JXTaskPane();
    tp.setFont(new Font("Arial", Font.PLAIN, 12)); //$NON-NLS-1$
    tp.setTitle(task.getTitle());
    tp.setIcon(new ImageIcon(HelperImage.getScaledImage(task.getIcon().getIcon(), new Dimension(16, 0))));
View Full Code Here

TOP

Related Classes of net.laubenberger.bogatyr.view.swing.Panel

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.