-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add pattern documents and a few others
- Loading branch information
Showing
12 changed files
with
308 additions
and
0 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
## Using JavaFX in VS Code | ||
|
||
To create a JavaFX project in VS Code, you need to add the JavaFX JAR files to the project. | ||
|
||
This is an issue for any Java project that uses libraries, not just JavaFX. | ||
|
||
You need to add the JavaFX JAR files to each project where you use JavaFX. | ||
In Eclipse and IntelliJ you can define a Library once and then just refer to in your projects -- seems that VS Code does not have this. | ||
|
||
### Adding Dependencies (JAR files) | ||
|
||
1. Use Java Dependency Viewer (VS Code extension) - at the bottom of the project pane is a section named "JAVA DEPENDENCIES". Open this and you should see an item labeled "Referenced Libraries". Expand that item and look for the JavaFX jar files. It should look like: | ||
|
||
``` | ||
JAVA DEPENDENCIES | ||
v Referenced Libraries | ||
javafx.base.jar | ||
javafx.controls.jar | ||
javafx.fxml.jar | ||
javafx.graphics.jar | ||
javafx.media.jar | ||
javafx.swing.jar (you probably don't need this) | ||
javafx-swt.jar (you probably don't need this) | ||
javafx.web.jar | ||
``` | ||
|
||
2. If you don't see these dependencies, click the "+" sign on the "Referenced Libraries" line. Then select the "lib" directory where you installed JavaFX, such as `/Library/javafx11/lib`. Then refresh the dependencies list (you may need to close and re-expand the item). It should show the javafx jar files. | ||
|
||
3. Edit the project `settings.json` file in the `.vscode` directory. This is an alternative way to add dependencies. You can directly edit it like this: | ||
```json | ||
{ | ||
"java.project.referencedLibraries": [ | ||
"lib/**/*.jar", | ||
"/path/to/javafx11/lib/**/*.jar" | ||
] | ||
} | ||
``` | ||
|
||
## Running a JavaFX Application | ||
|
||
After you compile a JavaFX application in VS Code, you still have more pain to run it. | ||
|
||
If you enter (on Windows use ";" instead of ":" in classpath): | ||
``` | ||
# assumes you application main class is named Main | ||
java -cp /path/to/javafx11/lib/*:. Main | ||
``` | ||
Java prints: | ||
``` | ||
Error: JavaFX runtime components are missing, and are required to run this application | ||
``` | ||
|
||
the message isn't very helpful. JavaFX 11 uses "modules" to define access to packages and classes. You need to add options to the `java` command like this: | ||
``` | ||
java --module-path /opt/java/javafx11/lib --add-modules javafx.base,javafx.controls HelloFX | ||
``` | ||
It appears that when you use modules you don't need to add them as the classpath elements. | ||
|
||
|
||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file renamed
BIN
+625 KB
patterns/Intro-Design-Patterns.ppt → patterns/Intro-Design-Patterns.pptx
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,247 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="no"?> | ||
<diagram program="umlet" version="14.2"> | ||
<zoom_level>10</zoom_level> | ||
<element> | ||
<id>UMLClass</id> | ||
<coordinates> | ||
<x>270</x> | ||
<y>380</y> | ||
<w>120</w> | ||
<h>80</h> | ||
</coordinates> | ||
<panel_attributes>Button | ||
('1')</panel_attributes> | ||
<additional_attributes/> | ||
</element> | ||
<element> | ||
<id>UMLClass</id> | ||
<coordinates> | ||
<x>190</x> | ||
<y>20</y> | ||
<w>100</w> | ||
<h>80</h> | ||
</coordinates> | ||
<panel_attributes>Tk | ||
(Window | ||
& | ||
Container)</panel_attributes> | ||
<additional_attributes/> | ||
</element> | ||
<element> | ||
<id>UMLClass</id> | ||
<coordinates> | ||
<x>190</x> | ||
<y>130</y> | ||
<w>100</w> | ||
<h>70</h> | ||
</coordinates> | ||
<panel_attributes>CalculatorUI</panel_attributes> | ||
<additional_attributes/> | ||
</element> | ||
<element> | ||
<id>UMLClass</id> | ||
<coordinates> | ||
<x>280</x> | ||
<y>270</y> | ||
<w>100</w> | ||
<h>70</h> | ||
</coordinates> | ||
<panel_attributes>Frame | ||
(Keypad)</panel_attributes> | ||
<additional_attributes/> | ||
</element> | ||
<element> | ||
<id>UMLClass</id> | ||
<coordinates> | ||
<x>420</x> | ||
<y>380</y> | ||
<w>120</w> | ||
<h>80</h> | ||
</coordinates> | ||
<panel_attributes>Button | ||
('2')</panel_attributes> | ||
<additional_attributes/> | ||
</element> | ||
<element> | ||
<id>UMLClass</id> | ||
<coordinates> | ||
<x>130</x> | ||
<y>380</y> | ||
<w>120</w> | ||
<h>80</h> | ||
</coordinates> | ||
<panel_attributes>Button | ||
('0')</panel_attributes> | ||
<additional_attributes/> | ||
</element> | ||
<element> | ||
<id>Relation</id> | ||
<coordinates> | ||
<x>190</x> | ||
<y>330</y> | ||
<w>160</w> | ||
<h>70</h> | ||
</coordinates> | ||
<panel_attributes>lt=<-</panel_attributes> | ||
<additional_attributes>10.0;50.0;140.0;10.0</additional_attributes> | ||
</element> | ||
<element> | ||
<id>Relation</id> | ||
<coordinates> | ||
<x>320</x> | ||
<y>330</y> | ||
<w>30</w> | ||
<h>70</h> | ||
</coordinates> | ||
<panel_attributes>lt=<-</panel_attributes> | ||
<additional_attributes>10.0;50.0;10.0;10.0</additional_attributes> | ||
</element> | ||
<element> | ||
<id>Relation</id> | ||
<coordinates> | ||
<x>320</x> | ||
<y>330</y> | ||
<w>170</w> | ||
<h>70</h> | ||
</coordinates> | ||
<panel_attributes>lt=<-</panel_attributes> | ||
<additional_attributes>150.0;50.0;10.0;10.0</additional_attributes> | ||
</element> | ||
<element> | ||
<id>UMLClass</id> | ||
<coordinates> | ||
<x>470</x> | ||
<y>120</y> | ||
<w>100</w> | ||
<h>70</h> | ||
</coordinates> | ||
<panel_attributes>Widget</panel_attributes> | ||
<additional_attributes/> | ||
</element> | ||
<element> | ||
<id>UMLClass</id> | ||
<coordinates> | ||
<x>630</x> | ||
<y>260</y> | ||
<w>100</w> | ||
<h>70</h> | ||
</coordinates> | ||
<panel_attributes>Frame | ||
(Operators)</panel_attributes> | ||
<additional_attributes/> | ||
</element> | ||
<element> | ||
<id>UMLClass</id> | ||
<coordinates> | ||
<x>560</x> | ||
<y>380</y> | ||
<w>120</w> | ||
<h>80</h> | ||
</coordinates> | ||
<panel_attributes>Button | ||
('+')</panel_attributes> | ||
<additional_attributes/> | ||
</element> | ||
<element> | ||
<id>UMLClass</id> | ||
<coordinates> | ||
<x>690</x> | ||
<y>380</y> | ||
<w>120</w> | ||
<h>80</h> | ||
</coordinates> | ||
<panel_attributes>Button | ||
('-')</panel_attributes> | ||
<additional_attributes/> | ||
</element> | ||
<element> | ||
<id>Relation</id> | ||
<coordinates> | ||
<x>610</x> | ||
<y>320</y> | ||
<w>90</w> | ||
<h>80</h> | ||
</coordinates> | ||
<panel_attributes>lt=<-</panel_attributes> | ||
<additional_attributes>10.0;60.0;70.0;10.0</additional_attributes> | ||
</element> | ||
<element> | ||
<id>Relation</id> | ||
<coordinates> | ||
<x>670</x> | ||
<y>320</y> | ||
<w>100</w> | ||
<h>80</h> | ||
</coordinates> | ||
<panel_attributes>lt=<-</panel_attributes> | ||
<additional_attributes>80.0;60.0;10.0;10.0</additional_attributes> | ||
</element> | ||
<element> | ||
<id>Relation</id> | ||
<coordinates> | ||
<x>540</x> | ||
<y>180</y> | ||
<w>160</w> | ||
<h>100</h> | ||
</coordinates> | ||
<panel_attributes>lt=<<-</panel_attributes> | ||
<additional_attributes>10.0;10.0;10.0;50.0;140.0;50.0;140.0;80.0</additional_attributes> | ||
</element> | ||
<element> | ||
<id>Relation</id> | ||
<coordinates> | ||
<x>320</x> | ||
<y>180</y> | ||
<w>190</w> | ||
<h>110</h> | ||
</coordinates> | ||
<panel_attributes>lt=<<-</panel_attributes> | ||
<additional_attributes>170.0;10.0;170.0;50.0;10.0;50.0;10.0;90.0</additional_attributes> | ||
</element> | ||
<element> | ||
<id>Relation</id> | ||
<coordinates> | ||
<x>230</x> | ||
<y>90</y> | ||
<w>30</w> | ||
<h>60</h> | ||
</coordinates> | ||
<panel_attributes>lt=<<-</panel_attributes> | ||
<additional_attributes>10.0;10.0;10.0;40.0</additional_attributes> | ||
</element> | ||
<element> | ||
<id>Relation</id> | ||
<coordinates> | ||
<x>280</x> | ||
<y>150</y> | ||
<w>210</w> | ||
<h>40</h> | ||
</coordinates> | ||
<panel_attributes>lt=<<<<- | ||
m2=*</panel_attributes> | ||
<additional_attributes>10.0;10.0;190.0;10.0</additional_attributes> | ||
</element> | ||
<element> | ||
<id>UMLClass</id> | ||
<coordinates> | ||
<x>470</x> | ||
<y>260</y> | ||
<w>100</w> | ||
<h>60</h> | ||
</coordinates> | ||
<panel_attributes>Label | ||
(display)</panel_attributes> | ||
<additional_attributes/> | ||
</element> | ||
<element> | ||
<id>Relation</id> | ||
<coordinates> | ||
<x>510</x> | ||
<y>180</y> | ||
<w>30</w> | ||
<h>100</h> | ||
</coordinates> | ||
<panel_attributes>lt=<<-</panel_attributes> | ||
<additional_attributes>10.0;10.0;10.0;80.0</additional_attributes> | ||
</element> | ||
</diagram> |
Binary file not shown.
Binary file not shown.