thinwire.ui

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Web Framework » ThinWire » thinwire.ui 
thinwire.ui
Java Source File NameTypeComment
AbstractComponent.javaClass
author:
   Joshua J.
AbstractContainer.javaClass
author:
   Joshua J.
AbstractEditorComponent.javaClass
author:
   Joshua J.
AbstractHierarchyComponent.javaClass
author:
   Joshua J.
AbstractMaskEditorComponent.javaClass
author:
   Joshua J.
AbstractRangeComponent.javaClass
AbstractTextComponent.javaClass
author:
   Joshua J.
AbstractWindow.javaClass
author:
   Joshua J.
AlignTextComponent.javaInterface
author:
   Joshua J.
Application.javaClass The Application class represents an instance of a ThinWire application.
Button.javaClass A Button is a component that typically causes an action when activated.

Example:

 Button b = new Button("Click Me!");
 b.setBounds(20, 20, 150, 30);
 b.addActionListener(Button.ACTION_CLICK, new ActionListener() {
 public void actionPerformed(ActionEvent e) {
 ((Button) e.getSource()).setText("You Clicked Me!");
 }
 });
 Dialog d = new Dialog("Button Test");
 d.setBounds(20, 20, 200, 100);
 d.getChildren().add(b);
 d.setVisible(true);
 

Keyboard Navigation:
KEY RESPONSE NOTE
Space Fires ActionEvent( action = Button.ACTION_CLICK ) Only if the component has focus.
Enter Fires ActionEvent( action = Button.ACTION_CLICK ) Only if the 'standard' property is set to 'true' and ANY component in the Window has focus.
CheckBox.javaClass A CheckBox is a screen element that can either be checked or cleared, and operates independently of other elements.

Example:

 final CheckBox cb = new CheckBox("I am checked!");
 cb.setChecked(true);
 cb.setBounds(20, 20, 150, 30);
 cb.addPropertyChangeListener(CheckBox.PROPERTY_CHECKED, new PropertyChangeListener() {
 public void propertyChange(PropertyChangeEvent pce) {
 if (pce.getNewValue() == Boolean.TRUE) {
 cb.setText("I am checked");
 } else {
 cb.setText("I am unchecked");
 }
 }
 });
 Dialog d = new Dialog("CheckBox Test");
 d.setBounds(20, 20, 200, 100);
 d.getChildren().add(cb);
 d.setVisible(true);
 

Keyboard Navigation:
KEY RESPONSE NOTE
Space Fires PropertyChangeEvent( propertyName = CheckBox.PROPERTY_CHECKED ) Only if the component has focus.


author:
   Joshua J.
CheckedComponent.javaInterface
author:
   Joshua J.
Component.javaInterface Component is the foundation of all visual objects in the framework.
Container.javaInterface A Container is a Component that maintains a collection of other Components as a group. Additionally, Container is the foundation of all other container types in the framework such as Panel, Frame, Dialog, TabSheet, etc.
DateBox.javaClass A DateBox is a Component that displays a month-view calendar.
Dialog.javaClass A Dialog is a window with a title that is usually associated to a Frame.

Example:

 Dialog dlg = new Dialog("Dialog Test");
 dlg.setBounds(25, 25, 600, 400);
 final TextField tBox = new TextField();
 tBox.setBounds(25, 25, 150, 20);
 dlg.getChildren().add(tBox);
 final Button btn1 = new Button("Add Text");
 btn1.setBounds(200, 20, 100, 30);
 dlg.getChildren().add(btn1);
 final Button btn2 = new Button("Numeric Mask");
 btn2.setBounds(310, 20, 100, 30);
 dlg.getChildren().add(btn2);
 final Button btn3 = new Button("Right Align");
 btn3.setBounds(420, 20, 100, 30);
 dlg.getChildren().add(btn3);
 ActionListener clickListener = new ActionListener() {
 public void actionPerformed(ActionEvent e) {
 Button btn = (Button) e.getSource();
 if (btn == btn1) {
 tBox.setText(tBox.getText() + "913JQP-");
 } else if (btn == btn2) {
 tBox.setEditMask("#########");
 } else if (btn == btn3) {
 tBox.setAlignX(AlignX.RIGHT);
 }
 }
 };
 btn1.addActionListener(Button.ACTION_CLICK, clickListener);
 btn2.addActionListener(Button.ACTION_CLICK, clickListener);
 btn3.addActionListener(Button.ACTION_CLICK, clickListener);
 Divider dv = new Divider();
 dv.setBounds(25, 70, 550, 5);
 dlg.getChildren().add(dv);
 final TextArea ta = new TextArea();
 ta.setBounds(25, 100, 350, 200);
 dlg.getChildren().add(ta);
 Button btn4 = new Button("Add Text");
 btn4.setBounds(420, 100, 100, 30);
 dlg.getChildren().add(btn4);
 btn4.addActionListener(Button.ACTION_CLICK, new ActionListener() {
 public void actionPerformed(ActionEvent e) {
 ta.setText(ta.getText() + "913JQP-");
 }
 });
 dlg.setVisible(true);
 


author:
   Joshua J.

Divider.javaClass A Divider provides a visual separation between two sections of a container.

Example:

 Dialog dlg = new Dialog("Divider Test");
 dlg.setBounds(25, 25, 250, 150);
 Divider horizDiv = new Divider();
 horizDiv.setBounds(10, 10, 210, 10);
 dlg.getChildren().add(horizDiv);
 Divider vertDiv = new Divider();
 vertDiv.setBounds(110, 30, 10, 90);
 dlg.getChildren().add(vertDiv);
 dlg.setVisible(true);
 


author:
   Joshua J.
DropDown.javaClass The generic DropDown component allows you to place an arbitrary component in a DropDown.
DropDownDateBox.javaClass A DropDownDateBox is a DropDown that contains a DateBox.

Example:

 final Dialog dlg = new Dialog("DateBox Test");
 dlg.setBounds(10, 10, 320, 240);
 DropDownDateBox dd = new DropDownDateBox();
 dd.setBounds(10, 10, 200, 20);
 dlg.getChildren().add(dd);
 dlg.setVisible(true);
 

Keyboard Navigation:
KEY RESPONSE NOTE
Down Arrow Drops the DateBox down. Only if the component has focus.
Esc Closes the DateBox Only if the component has focus.
See DateBox for additional keyboard support.


author:
   Ted C.
DropDownGridBox.javaClass A DropDownGridBox wraps around a GridBox component to provide drop down features.

Example:

 Dialog dlg = new Dialog("DropDownGridBox Test");
 dlg.setBounds(25, 25, 400, 200);
 final TextField tf = new TextField();
 tf.setBounds(275, 25, 100, 20);
 dlg.getChildren().add(tf);
 DropDownGridBox ddgb = new DropDownGridBox();
 ddgb.setBounds(25, 25, 230, 20);
 GridBox gb = ddgb.getComponent();
 gb.setVisibleHeader(true);
 gb.setHeight(120);
 GridBox.Column col1 = new GridBox.Column();
 col1.setName("Name");
 GridBox.Column col2 = new GridBox.Column();
 col2.setName("City");
 GridBox.Column col3 = new GridBox.Column();
 col3.setName("Country");
 gb.getColumns().add(col1);
 gb.getColumns().add(col2);
 gb.getColumns().add(col3);
 String[] names = { "Smythe", "Janes", "Warren", "Dempster", "Hilcox" };
 String[] cities = { "Tokyo", "Hong Kong", "Lethbridge", "Juarez", "Juneau" };
 String[] countries = { "Japan", "China", "Canada", "Mexico", "USA" };
 for (int r = 0; r < 5; r++) {
 GridBox.Row row = new GridBox.Row();
 row.add(names[r]);
 row.add(cities[r]);
 row.add(countries[r]);
 gb.getRows().add(row);
 }
 ((DropDownGridBox.DefaultView) ddgb.getView()).setColumnIndex(2);
 ddgb.addPropertyChangeListener(DropDownGridBox.PROPERTY_TEXT,
 new PropertyChangeListener() {
 public void propertyChange(PropertyChangeEvent evt) {
 tf.setText((String) evt.getNewValue());
 }
 });
 dlg.getChildren().add(ddgb);
 dlg.setVisible(true);
 

Keyboard Navigation:
KEY RESPONSE NOTE
Down Arrow Drops the Grid Box down. Only if the component has focus.
Esc Closes the Grid Box Only if the component has focus.
See GridBox for additional keyboard support.


author:
   Joshua J.
EditorComponent.javaInterface
author:
   Joshua J.
EventListenerImpl.javaClass
author:
   Joshua J.
FileChooser.javaClass A FileChooser is a Component that enables a user to upload a file.
Frame.javaClass A Frame is the browser window.
GridBox.javaClass A GridBox is a screen component that can display multi-column rows or data.

Example:

 Dialog dlg = new Dialog("GridBox Test");
 dlg.setBounds(25, 25, 600, 300);
 final TextField tf = new TextField();
 tf.setBounds(375, 25, 150, 20);
 dlg.getChildren().add(tf);
 GridBox gbx = new GridBox();
 gbx.setBounds(25, 25, 300, 120);
 gbx.setVisibleHeader(true);
 gbx.setVisibleCheckBoxes(true);
 gbx.setFullRowCheckBox(true);
 GridBox.Column col1 = new GridBox.Column();
 col1.setName("Name");
 col1.setVisible(true);
 GridBox.Column col2 = new GridBox.Column();
 col2.setName("City");
 col2.setVisible(true);
 gbx.getColumns().add(col1);
 gbx.getColumns().add(col2);
 String[] names = { "Smythe", "Janes", "Warren", "Dempster", "Hilcox" };
 String[] cities = { "Tokyo", "Hong Kong", "Lethbridge", "Moose Jaw", "Red Deer" };
 for (int r = 0; r < 5; r++) {
 GridBox.Row row = new GridBox.Row();
 row.add(names[r]);
 row.add(cities[r]);
 gbx.getRows().add(row);
 }
 gbx.addPropertyChangeListener(GridBox.Row.PROPERTY_ROW_SELECTED,
 new PropertyChangeListener() {
 public void propertyChange(PropertyChangeEvent evt) {
 tf.setText((String) ((GridBox.Row) evt.getSource()).get(0));
 }
 });
 dlg.getChildren().add(gbx);
 dlg.setVisible(true);
 

Keyboard Navigation:
KEY RESPONSE NOTE
Space Fires PropertyChangeEvent( propertyName = GridBox.Row.PROPERTY_CHECKED ) Only if isVisibleCheckBoxes() is true.
Enter Fires Action( actionName = GridBox.ACTION_CLICK )
Arrow Up/Down Fires PropertyChangeEvent( propertyName = GridBox.Row.PROPERTY_SELECTED )


author:
   Joshua J.
HierarchyComponent.javaInterface
author:
   Joshua J.
Hyperlink.javaClass A Hyperlink is a screen component that acts like a standard hyperlink.

Example:

 Hyperlink hl = new Hyperlink("Custom Credit Systems Home Page",
 "http://www.customcreditsystems.com");
 hl.setBounds(25, 25, 175, 20);
 MessageBox.confirm("", "Hyperlink Test", hl, "OK");
 

Keyboard Navigation:
KEY RESPONSE NOTE
Enter Fires Action( Action = Hyperlink.ACTION_CLICK ) Only if the component has focus.


author:
   Joshua J.
Image.javaClass A component that displays an image.
ImageComponent.javaInterface
author:
   Joshua J.
ItemChangeEventComponent.javaInterface
author:
   Joshua J.
Label.javaClass A Label is the text that appears next to a control on a screen.

Example:

 Dialog dlg = new Dialog("Label Test");
 dlg.setBounds(25, 25, 415, 150);
 final Label lbl = new Label("Initial 1st Label");
 lbl.setBounds(25, 25, 150, 30);
 Button btn = new Button("Toggle Text");
 btn.setBounds(300, 20, 100, 30);
 btn.addActionListener(Button.ACTION_CLICK, new ActionListener() {
 public void actionPerformed(ActionEvent ev) {
 if ("Initial 1st Label".equals(lbl.getText())) {
 lbl.setText("The text has now been toggled.");
 } else {
 lbl.setText("Initial 1st Label");
 }
 }
 });
 dlg.getChildren().add(lbl);
 dlg.getChildren().add(btn);
 dlg.setVisible(true);
 

Keyboard Navigation:
KEY RESPONSE NOTE


author:
   Joshua J.
MaskEditorComponent.javaInterface
author:
   Joshua J.
Menu.javaClass A component that displays a set of hierarchical data as a menu.

Example:

 Dialog dlg = new Dialog("Menu Test");
 dlg.setBounds(25, 25, 200, 200);
 Menu mainMenu = new Menu();
 Menu.Item fileItem = new Menu.Item("File");
 Menu.Item newItem = new Menu.Item("New");
 newItem.setUserObject("You clicked on the File->New menu item");
 Menu.Item openItem = new Menu.Item("Open");
 openItem.setUserObject("You clicked on the File->Open menu item");
 mainMenu.addActionListener(Menu.ACTION_CLICK, new ActionListener() {
 public void actionPerformed(ActionEvent ev) {
 Menu.Item selectedItem = (Menu.Item) ev.getSource();
 MessageBox.confirm("resources/ngLF/system.png", "Menu Test", (String) selectedItem.getUserObject());
 }
 });
 dlg.setMenu(mainMenu);
 mainMenu.getRootItem().getChildren().add(fileItem);
 fileItem.getChildren().add(newItem);
 fileItem.getChildren().add(openItem);
 dlg.setVisible(true);
 

Keyboard Navigation:
KEY RESPONSE NOTE


author:
   Joshua J.
MessageBox.javaClass A MessageBox displays a message (or a component) and allows a user to respond.

Example:

 MessageBox.confirm("resources/ngLF/info.png", "ThinWire",
 "Get ready for ThinWire");
 

Keyboard Navigation:
KEY RESPONSE NOTE


author:
   Joshua J.
Panel.javaClass Panel is a direct implementation of Container.

Example:

 TextField tf = new TextField("[Enter Value Here!]");
 tf.setBounds(5, 5, 150, 25);
 Panel p = new Panel();
 p.setBounds(10, 10, 200, 100);
 p.getChildren().add(tf);
 Frame f = Application.current().getFrame();
 f.getChildren().add(p);
 


author:
   Joshua J.
ProgressBar.javaClass A ProgressBar is a screen element that has a visible selection that can be set to any size between zero and a specified length. ProgressBars are either horizontal or vertical depending on their dimensions.
RadioButton.javaClass A RadioButton is a screen element that usually appears in groups.
RangeComponent.javaInterface
Slider.javaClass A Slider is a screen element that has a cursor that can be set to any position between zero and a specified length. Sliders are either horizontal or vertical depending on their dimensions.
TabFolder.javaClass A container for Tab Sheets.
TabSheet.javaClass A TabSheet is a Panel that can be layered, so that a user can switch between tab sheets.

Example:

 Dialog dlg = new Dialog("TabFolder Test");
 dlg.setBounds(25, 25, 600, 400);
 TabSheet tSheet1 = new TabSheet("Sheet 1");
 TabSheet tSheet2 = new TabSheet("Sheet 2");
 TabFolder tFolder = new TabFolder();
 tFolder.setBounds(50, 25, 500, 300);
 tFolder.getChildren().add(tSheet1);
 tFolder.getChildren().add(tSheet2);
 TextField tf = new TextField();
 tf.setBounds(25, 25, 150, 20);
 tSheet2.getChildren().add(tf);
 Button firstButton = new Button("Change Tab Title 1");
 firstButton.setBounds(50, 50, 150, 30);
 firstButton.addActionListener(Button.ACTION_CLICK, new ActionListener() {
 public void actionPerformed(ActionEvent ev) {
 ((TabSheet) ((Button) ev.getSource()).getParent()).setText("New Title 1");
 }
 });
 tSheet1.getChildren().add(firstButton);
 dlg.getChildren().add(tFolder);
 dlg.setVisible(true);
 

Keyboard Navigation:
KEY RESPONSE NOTE


author:
   Joshua J.
TextArea.javaClass This is a multiline text field screen element.

Example:

 Dialog dlg = new Dialog();
 dlg.setBounds(25, 25, 325, 225);
 dlg.setTitle("TextArea Test");
 TextArea tArea = new TextArea();
 tArea.setBounds(25, 25, 275, 100);
 Label lbl = new Label();
 lbl.setBounds(25, 150, 275, 30);
 lbl.setLabelFor(tArea);
 tArea.addPropertyChangeListener(TextArea.PROPERTY_TEXT, new PropertyChangeListener() {
 public void propertyChange(PropertyChangeEvent ev) {
 TextArea source = (TextArea) ev.getSource();
 source.getLabel().setText("Text Length (updated when TextArea loses focus): "
 + source.getText().length());
 }
 });
 tArea.setText("Sample text for the TextArea");
 dlg.getChildren().add(tArea);
 dlg.getChildren().add(lbl);
 dlg.setVisible(true);
 


author:
   Joshua J.
TextComponent.javaInterface
author:
   Joshua J.
TextField.javaClass This is a text field screen element.

Example:

 Dialog dlg = new Dialog("TextField Test");
 dlg.setBounds(25, 25, 450, 100);
 final TextField tf = new TextField();
 tf.setBounds(25, 25, 150, 20);
 Button btn = new Button("Numeric Mask ###.##");
 btn.setBounds(200, 20, 150, 30);
 btn.addActionListener(Button.ACTION_CLICK, new ActionListener() {
 public void actionPerformed(ActionEvent ev) {
 tf.setEditMask("###.##");
 tf.setFocus(true);
 }
 });
 dlg.getChildren().add(tf);
 dlg.getChildren().add(btn);
 dlg.setVisible(true);
 

Keyboard Navigation:
KEY RESPONSE NOTE

  • There's no need to set both a maxLength property and an editMask.
  • If they conflict - e.g.
Tree.javaClass A component that displays a set of hierarchical data as an outline.

Example:

 Dialog treeFrame = new Dialog("Tree Test");
 treeFrame.setBounds(25, 25, 400, 350);
 final Label label = new Label("???????");
 label.setBounds(225, 25, 150, 20);
 Tree tree = new Tree();
 tree.setBounds(10, 10, 200, 300);
 Tree.Item root = tree.getRootItem();
 root.setText("System Root");
 root.setImage(SCORE_IMAGE);
 tree.setRootItemVisible(false);
 root.setExpanded(false);
 Tree.Item readme = new Tree.Item("readme", FILE_IMAGE);
 root.getChildren().add(readme);
 Tree.Item bill = new Tree.Item("bill", FOLDER_IMAGE);
 root.getChildren().add(bill);
 Tree.Item startup = new Tree.Item("startup", FILE_IMAGE);
 bill.getChildren().add(startup);
 Tree.Item billFiles = new Tree.Item("files", FOLDER_IMAGE);
 bill.getChildren().add(billFiles);
 Tree.Item billFilesAddress = new Tree.Item("Address List", FILE_IMAGE);
 billFiles.getChildren().add(billFilesAddress);
 Tree.Item billFilesPhone = new Tree.Item("Phone List", FILE_IMAGE);
 billFiles.getChildren().add(billFilesPhone);
 bill.setExpanded(true);
 billFiles.setExpanded(true);
 Tree.Item billMusic = new Tree.Item("music", FOLDER_IMAGE);
 bill.getChildren().add(billMusic);
 Tree.Item billMusicSong1 = new Tree.Item("song1.mp3", FILE_IMAGE);
 billMusic.getChildren().add(billMusicSong1);
 Tree.Item billPic = new Tree.Item("pictures", FOLDER_IMAGE);
 bill.getChildren().add(billPic);
 Tree.Item billPicHome = new Tree.Item("home", FOLDER_IMAGE);
 billPic.getChildren().add(billPicHome);
 Tree.Item billPicS = new Tree.Item("s.jpg", PICTURE_IMAGE);
 billPicHome.getChildren().add(billPicS);
 Tree.Item billPicP = new Tree.Item("p.jpg", PICTURE_IMAGE);
 billPicHome.getChildren().add(billPicP);
 Tree.Item billPicM = new Tree.Item("m.jpg", PICTURE_IMAGE);
 billPicHome.getChildren().add(billPicM);
 Tree.Item jim = new Tree.Item("jim", FOLDER_IMAGE);
 root.getChildren().add(jim);
 Tree.Item jimStartup = new Tree.Item("startup", FILE_IMAGE);
 jim.getChildren().add(jimStartup);
 Tree.Item copyright = new Tree.Item("copyright", FILE_IMAGE);
 root.getChildren().add(copyright);
 tree.addPropertyChangeListener(Tree.Item.PROPERTY_SELECTED, new PropertyChangeListener() {
 public void propertyChange(PropertyChangeEvent ev) {
 label.setText(((Tree.Item) ev.getSource()).getText());
 }
 });
 treeFrame.getChildren().add(tree);
 treeFrame.getChildren().add(label);
 treeFrame.setVisible(true);
 

Keyboard Navigation:
KEY RESPONSE NOTE
Space Fires PropertyChangeEvent( propertyName = Tree.Item.PROPERTY_CHECKED ) Only if the component has focus.


author:
   Joshua J.
WebBrowser.javaClass A WebBrowser inserts a web browser object in your application.

Example:

 Dialog dlg = new Dialog("WebBrowser Test");
 dlg.setBounds(20, 20, 640, 480);
 WebBrowser wb = new WebBrowser();
 wb.setBounds(25, 25, 590, 430);
 wb.setLocation("http://www.thinwire.com");
 dlg.getChildren().add(wb);
 dlg.setVisible(true);
 

Keyboard Navigation:
KEY RESPONSE NOTE


author:
   Joshua J.
Window.javaInterface
author:
   Joshua J.

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.