Skip to content

Commit

Permalink
Release Build
Browse files Browse the repository at this point in the history
Add the demo as the main class for the library. Remove Eclipse settings
folder. Update the readme to clarify how to use the library. Update the
demo to make readme.html optional.
  • Loading branch information
RobertBColton committed Aug 18, 2015
1 parent 23b4865 commit 9135318
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 15 deletions.
11 changes: 0 additions & 11 deletions .settings/org.eclipse.jdt.core.prefs

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Features to be added in a to be determined future version:
* A light docking library using no detachable windows

## Using the Library
You can download a prebuilt jar from the releases page where you will also find a prebuilt jar of the latest demo. You can simply download the library and include it in the class path of your project.
You can obtain a binary of the latest jar from the [releases](https://github.com/RobertBColton/DockFX/releases) page. The library itself includes a demo as the main class for testing purposes. This demo is always included for the time being as it is very small and not expected to get much bigger. An HTML readme file is included next to the jar but does not need to be distributed with the library. The library and the demo will also work regardless of whether the readme HTML file exists.

## Compiling from Source
The project was originally written in the Eclipse IDE but is also configured for Apache Maven. The project will continue to facilitate development with both command line tools and the Eclipse IDE.
Expand Down
13 changes: 12 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<groupId>org.dockfx</groupId>
<artifactId>dockfx</artifactId>
<packaging>jar</packaging>
<version>1.0-SNAPSHOT</version>
<version>0.1-SNAPSHOT</version>
<name>DockFX</name>
<url>https://github.com/RobertBColton/DockFX.git</url>

Expand All @@ -20,6 +20,17 @@

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
<manifest>
<mainClass>org.dockfx.demo.DockFX</mainClass>
</manifest>
</archive>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
Expand Down
8 changes: 6 additions & 2 deletions src/main/java/org/dockfx/demo/DockFX.java
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public static void main(String[] args) {

@SuppressWarnings("unchecked")
@Override
public void start(Stage primaryStage) throws IOException {
public void start(Stage primaryStage) {
primaryStage.setTitle("DockFX");

// create a dock pane that will manage our dock nodes and handle the layout
Expand All @@ -60,7 +60,11 @@ public void start(Stage primaryStage) throws IOException {
// create a default test node for the center of the dock area
TabPane tabs = new TabPane();
HTMLEditor htmlEditor = new HTMLEditor();
htmlEditor.setHtmlText(new String(Files.readAllBytes(Paths.get("readme.html"))));
try {
htmlEditor.setHtmlText(new String(Files.readAllBytes(Paths.get("readme.html"))));
} catch (IOException e) {
e.printStackTrace();
}

// empty tabs ensure that dock node has its own background color when floating
tabs.getTabs().addAll(new Tab("Tab 1", htmlEditor), new Tab("Tab 2"), new Tab("Tab 3"));
Expand Down

0 comments on commit 9135318

Please sign in to comment.