Filled in models for now..!

This commit is contained in:
Snowyfox 2021-07-17 07:17:14 -04:00
parent 2e094afbf6
commit 2209236ead
4 changed files with 89 additions and 0 deletions

View File

@ -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

View File

@ -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;
}

View File

@ -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

View File

@ -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