Exemple #1
0
  private JPanel createVerticalButtonBar() {
    JPanel buttonPanel = new JPanel(new BorderLayout());
    buttonPanel.setBackground(SIDEBAR_COLOR);
    buttonPanel.setBorder(BorderFactory.createMatteBorder(0, 0, 0, 1, new Color(0x333333)));

    buttonBar = new JPanel();

    buttonBar.setBorder(BorderFactory.createMatteBorder(1, 0, 0, 0, new Color(0x333333)));

    buttonBar.setLayout(new BoxLayout(buttonBar, BoxLayout.Y_AXIS));
    buttonBar.setBackground(SIDEBAR_COLOR);
    buttonBar.setMaximumSize(new Dimension(BUTTON_WIDTH, 1000));
    buttonBar.setMinimumSize(new Dimension(BUTTON_WIDTH, 100));

    // ---

    buttonGroup = new ButtonGroup();

    fontsButton = createButton("Fonts", Resources.loadIcon("main/fonts.png"));
    imagesButton = createButton("Images", Resources.loadIcon("main/images.png"));

    buttonBar.add(fontsButton);
    buttonBar.add(imagesButton);

    buttonPanel.add(buttonBar, BorderLayout.NORTH);
    buttonPanel.add(StatusBar.createStatusBar(), BorderLayout.SOUTH);

    return buttonPanel;
  }
Exemple #2
0
  private MainEditor() {
    super(new BorderLayout());

    add(createVerticalButtonBar(), BorderLayout.WEST);

    blank = new JPanel(new BorderLayout());
    blank.setBackground(new Color(43, 43, 43));
    blank.add(StatusBar.createStatusBar(), BorderLayout.SOUTH);

    currentPage = blank;

    add(blank);
  }