mirror of
https://gitlab.com/biskuteri-cafe/JKomasto2.git
synced 2025-01-08 22:34:45 +01:00
Prepared a bit for data loading.
This commit is contained in:
parent
b6e3add6cd
commit
05f09ac9f4
@ -11,9 +11,23 @@ import java.awt.Dimension;
|
||||
class
|
||||
ComposeWindow extends JFrame {
|
||||
|
||||
private Composition
|
||||
composition;
|
||||
|
||||
// - -%- -
|
||||
|
||||
private ComposeComponent
|
||||
display;
|
||||
|
||||
// ---%-@-%---
|
||||
|
||||
public void
|
||||
setComposition(Composition composition)
|
||||
{
|
||||
assert composition != null;
|
||||
this.composition = composition;
|
||||
}
|
||||
|
||||
// ---%-@-%---
|
||||
|
||||
ComposeWindow()
|
||||
|
@ -16,9 +16,7 @@ JKomasto {
|
||||
public
|
||||
JKomasto()
|
||||
{
|
||||
new PostWindow().setVisible(true);
|
||||
new TimelineWindow().setVisible(true);
|
||||
new ComposeWindow().setVisible(true);
|
||||
}
|
||||
|
||||
// - -%- -
|
||||
|
@ -28,6 +28,15 @@ PostWindow extends JFrame {
|
||||
private RepliesComponent
|
||||
repliesDisplay;
|
||||
|
||||
// ---%-@-%---
|
||||
|
||||
public void
|
||||
setPost(Post post)
|
||||
{
|
||||
assert post != null;
|
||||
this.post = post;
|
||||
}
|
||||
|
||||
// ---%-@-%---
|
||||
|
||||
PostWindow()
|
||||
@ -67,8 +76,8 @@ PostWindow extends JFrame {
|
||||
menuBar.add(displayMenu);
|
||||
setJMenuBar(menuBar);
|
||||
|
||||
//setContentPane(postDisplay);
|
||||
setContentPane(repliesDisplay);
|
||||
setContentPane(postDisplay);
|
||||
//setContentPane(repliesDisplay);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -27,6 +27,15 @@ TimelineWindow extends JFrame {
|
||||
private TimelineComponent
|
||||
display;
|
||||
|
||||
// ---%-@-%---
|
||||
|
||||
public void
|
||||
setTimeline(Timeline timeline)
|
||||
{
|
||||
assert timeline != null;
|
||||
this.timeline = timeline;
|
||||
}
|
||||
|
||||
// ---%-@-%---
|
||||
|
||||
TimelineWindow()
|
||||
@ -51,8 +60,8 @@ TimelineComponent extends JPanel {
|
||||
private JLabel
|
||||
pageLabel;
|
||||
|
||||
private final List<PreviewComponent>
|
||||
previews = new ArrayList<>();
|
||||
private final List<PostPreviewComponent>
|
||||
postPreviews = new ArrayList<>();
|
||||
|
||||
// ---%-@-%---
|
||||
|
||||
@ -81,9 +90,9 @@ TimelineComponent extends JPanel {
|
||||
constraints.insets = new Insets(4, 0, 4, 0);
|
||||
for (int n = 8; n > 0; --n)
|
||||
{
|
||||
PreviewComponent preview = new PreviewComponent();
|
||||
centre.add(preview, constraints);
|
||||
previews.add(preview);
|
||||
PostPreviewComponent p = new PostPreviewComponent();
|
||||
centre.add(p, constraints);
|
||||
postPreviews.add(p);
|
||||
}
|
||||
|
||||
setLayout(new BorderLayout());
|
||||
@ -98,7 +107,7 @@ TimelineComponent extends JPanel {
|
||||
|
||||
|
||||
class
|
||||
PreviewComponent extends JComponent {
|
||||
PostPreviewComponent extends JComponent {
|
||||
|
||||
private JLabel
|
||||
topLeft, topRight, bottom;
|
||||
@ -117,7 +126,7 @@ PreviewComponent extends JComponent {
|
||||
// ---%-@-%---
|
||||
|
||||
public
|
||||
PreviewComponent()
|
||||
PostPreviewComponent()
|
||||
{
|
||||
Font font;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user