Table of Contents
How to initialize your program
public static void main(String[] args) {
ScreenManager sM = new ScreenManager();
Navigation nav = new Navigation(
sM,
3 // amount of items shown for each page.
);
declareScreens(sM); // Method used to declare all Screens
// Binds a given Screen. You can get a Screen by using a getMenu or getArticle method given by the ScreenManager.
sM.bindScreen(sM.getMenu("welcome_menu"));
// Starts the Loop with the given Articles and Menus
nav.loop();
}
Example on how to declare menus and articles
public static void declareScreens(ScreenManager sM) {
sM.addMenu(
"welcome_menu",
new Menu(
"Hello World this is the title of the Welcome Menu",
Arrays.asList(
new Option(
"Article #1", // Description
() -> { sM.bindScreen(sM.getArticle("article_1")); } // What is executed.
),
new Option(
"Article #2", // Description
() -> { sM.bindScreen(sM.getArticle("article_2")); } // What is executed.
),
new Option(
"Next Menu", // Description
() -> { sM.bindScreen(sM.getMenu("main_menu")); } // What is executed.
)
),
sM
)
);
sM.addArticle(
"article_1",
new Article(
"This is the title of the Article #1",
Arrays.asList(
new StringStyler(
"This is the 1st line of the Article of color a bright blinking white\n", // Text
StringStyler.WHITE, // Color
StringStyler.BLINK, // Mode
true // Bright?
),
new StringStyler(
"This is the 2nd line of the Article of color green with a normal style and not bright",
StringStyler.WHITE,
StringStyler.NORMAL,
false
)
),
sM
)
);
(...)
}
For more examples, please refer to the Documentation
- StringStyler Class
- Notification System
- Critical Notification
- Valid Notification
- Warning Notification
- Tip Notification
- Screens
- Menus
- Articles
- CallStack
- Commands
- Default Commands
- Screen Commands
- Forms
- Login
- Register
- Custom
- File Reader
- Markdown Parser
- Markdown Highlighter
See the open issues for a full list of proposed features (and known issues).
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the GNU General Public License v3.0. See LICENSE.txt
for more information.
Diogo Simões - [email protected]
Project Link: https://github.com/AshKetshup/Landmark