diff --git a/ComposeWindow.java b/ComposeWindow.java index 21d2e14..35a9118 100644 --- a/ComposeWindow.java +++ b/ComposeWindow.java @@ -19,6 +19,16 @@ ComposeWindow extends JFrame { private ComposeComponent display; +// - -%- - + + private static final Composition + NULL_COMPOSITION = new Composition(); + { + NULL_COMPOSITION.text = "This is a sample composition..!"; + NULL_COMPOSITION.visibility = PostVisibility.PUBLIC; + NULL_COMPOSITION.replyToPostId = null; + } + // ---%-@-%--- public void diff --git a/JKomasto.java b/JKomasto.java index c845b4b..5f9dac8 100644 --- a/JKomasto.java +++ b/JKomasto.java @@ -17,6 +17,8 @@ JKomasto { JKomasto() { new TimelineWindow().setVisible(true); + new ComposeWindow().setVisible(true); + new PostWindow().setVisible(true); } // - -%- - @@ -41,9 +43,36 @@ JKomasto { +enum +PostVisibility { + + PUBLIC, + LOCAL, + FOLLOWERS, + MENTIONED + +} + +enum +TimelineType { + + FEDERATED, + LOCAL, + HOME, + MENTIONS, + MESSAGES, + LIST + +} + + + class Timeline { + public TimelineType + type; + } @@ -51,6 +80,24 @@ Timeline { class Post { + public String + text; + + public String + authorId, authorName; + + public String + date; + + public PostVisibility + visibility; + + public String + postId; + + public boolean + boosted, favourited; + } @@ -58,4 +105,13 @@ Post { class Composition { + public String + text; + + public PostVisibility + visibility; + + public String + replyToPostId; + } diff --git a/PostWindow.java b/PostWindow.java index c7f6e3e..8844485 100644 --- a/PostWindow.java +++ b/PostWindow.java @@ -28,6 +28,21 @@ PostWindow extends JFrame { private RepliesComponent repliesDisplay; +// - -%- - + + private static final Post + NULL_POST = new Post(); + { + NULL_POST.text = "This is a sample post."; + NULL_POST.authorId = "snowyfox@biskuteri.cafe"; + NULL_POST.authorName = "snowyfox"; + NULL_POST.date = "0712hrs, 17 July"; + NULL_POST.visibility = PostVisibility.MENTIONED; + NULL_POST.postId = "000000000"; + NULL_POST.boosted = false; + NULL_POST.favourited = true; + } + // ---%-@-%--- public void diff --git a/TimelineWindow.java b/TimelineWindow.java index d544a0c..05d777e 100644 --- a/TimelineWindow.java +++ b/TimelineWindow.java @@ -30,6 +30,14 @@ TimelineWindow extends JFrame { private TimelineComponent display; +// - -%- - + + private static final Timeline + NULL_TIMELINE = new Timeline(); + { + NULL_TIMELINE.type = TimelineType.LOCAL; + } + // ---%-@-%--- public void