AshKetshup / Landmark

A Java TUI Navigation Library

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Contributors Forks Stargazers Issues MIT License LinkedIn


Logotype

Landmark

A Java TUI Navigation Library

View Demo · Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Usage
  3. Roadmap
  4. Contributing
  5. License
  6. Contact
  7. Acknowledgments

About The Project

Landmark Screen Shot

(back to top)

Built With

(back to top)

Usage

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

(back to top)

Roadmap

  • 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).

(back to top)

Contributing

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!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

(back to top)

License

Distributed under the GNU General Public License v3.0. See LICENSE.txt for more information.

(back to top)

Contact

Diogo Simões - dsimoes2000@gmail.com

Project Link: https://github.com/AshKetshup/Landmark

(back to top)

(back to top)

About

A Java TUI Navigation Library

License:GNU General Public License v3.0


Languages

Language:Java 87.0%Language:JavaScript 6.4%Language:CSS 4.6%Language:HTML 2.1%