mirror of
https://gitlab.com/biskuteri-cafe/JKomasto2.git
synced 2024-11-20 09:34:49 +01:00
Added menus to timeline window
This commit is contained in:
parent
05f09ac9f4
commit
2e094afbf6
@ -37,6 +37,7 @@ ComposeWindow extends JFrame {
|
|||||||
setDefaultCloseOperation(DISPOSE_ON_CLOSE);
|
setDefaultCloseOperation(DISPOSE_ON_CLOSE);
|
||||||
|
|
||||||
display = new ComposeComponent();
|
display = new ComposeComponent();
|
||||||
|
|
||||||
setContentPane(display);
|
setContentPane(display);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4,6 +4,9 @@ import javax.swing.JPanel;
|
|||||||
import javax.swing.JComponent;
|
import javax.swing.JComponent;
|
||||||
import javax.swing.JButton;
|
import javax.swing.JButton;
|
||||||
import javax.swing.JLabel;
|
import javax.swing.JLabel;
|
||||||
|
import javax.swing.JMenu;
|
||||||
|
import javax.swing.JMenuBar;
|
||||||
|
import javax.swing.JSeparator;
|
||||||
import javax.swing.Box;
|
import javax.swing.Box;
|
||||||
import javax.swing.BorderFactory;
|
import javax.swing.BorderFactory;
|
||||||
import java.awt.BorderLayout;
|
import java.awt.BorderLayout;
|
||||||
@ -44,7 +47,26 @@ TimelineWindow extends JFrame {
|
|||||||
pack();
|
pack();
|
||||||
setDefaultCloseOperation(DISPOSE_ON_CLOSE);
|
setDefaultCloseOperation(DISPOSE_ON_CLOSE);
|
||||||
|
|
||||||
setContentPane(display = new TimelineComponent());
|
JMenu programMenu = new JMenu("Program");
|
||||||
|
programMenu.add("Open home timeline");
|
||||||
|
programMenu.add("Open messages timeline");
|
||||||
|
programMenu.add("Open local timeline");
|
||||||
|
programMenu.add("Open federated timeline");
|
||||||
|
programMenu.add(new JSeparator());
|
||||||
|
programMenu.add("Create a post");
|
||||||
|
programMenu.add("Open auto post view");
|
||||||
|
programMenu.add(new JSeparator());
|
||||||
|
programMenu.add("Quit");
|
||||||
|
JMenu timelineMenu = new JMenu("Timeline");
|
||||||
|
timelineMenu.add("Flip to newest post");
|
||||||
|
JMenuBar menuBar = new JMenuBar();
|
||||||
|
menuBar.add(programMenu);
|
||||||
|
menuBar.add(timelineMenu);
|
||||||
|
setJMenuBar(menuBar);
|
||||||
|
|
||||||
|
display = new TimelineComponent();
|
||||||
|
|
||||||
|
setContentPane(display);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -70,14 +92,10 @@ TimelineComponent extends JPanel {
|
|||||||
prev = new JButton("<");
|
prev = new JButton("<");
|
||||||
next = new JButton(">");
|
next = new JButton(">");
|
||||||
|
|
||||||
pageLabel = new JLabel("0 / 0");
|
|
||||||
|
|
||||||
Box bottom = Box.createHorizontalBox();
|
Box bottom = Box.createHorizontalBox();
|
||||||
bottom.add(Box.createGlue());
|
bottom.add(Box.createGlue());
|
||||||
bottom.add(prev);
|
bottom.add(prev);
|
||||||
bottom.add(Box.createHorizontalStrut(8));
|
bottom.add(Box.createHorizontalStrut(8));
|
||||||
bottom.add(pageLabel);
|
|
||||||
bottom.add(Box.createHorizontalStrut(8));
|
|
||||||
bottom.add(next);
|
bottom.add(next);
|
||||||
|
|
||||||
JPanel centre = new JPanel();
|
JPanel centre = new JPanel();
|
||||||
|
Loading…
Reference in New Issue
Block a user