forked from xetr0v/osrs-client
-
Notifications
You must be signed in to change notification settings - Fork 1
View components
Speljohan edited this page Mar 17, 2013
·
1 revision
This is a list of all currently used View Components. This list may change at any time.
- button - A standard button.
- label - Just a regular old label.
- checkbox - You guessed it, a standard checkbox :)
These all map to their respective swing components in Java, and have aliases set up to simplify it.
For example, to declare a new button, you would do:
JButton button = new JButton(); // Creates a new button
button.setText("My text"); // Sets the text of the button
System.out.println(button.getText()); // Prints the text of the button
myView.add(button);In SVEN, you simply do:
button do # Creates a new button
text "My text" # Sets the text of the button
puts text? # Prints the text of the button
end