some package clean up and refactoring

This commit is contained in:
frosch95
2013-09-27 22:25:05 +02:00
parent 5e460fac7a
commit da0060a989
11 changed files with 20 additions and 22 deletions

View File

@@ -33,10 +33,7 @@ import javafx.scene.Scene;
import javafx.scene.text.Font; import javafx.scene.text.Font;
import javafx.stage.Stage; import javafx.stage.Stage;
import java.sql.SQLException;
import java.util.ResourceBundle; import java.util.ResourceBundle;
import java.util.logging.Level;
import java.util.logging.Logger;
/** /**
* @author Andreas * @author Andreas
@@ -46,7 +43,7 @@ public class GeoFroggerFXMain extends Application {
@Override @Override
public void start(Stage stage) throws Exception { public void start(Stage stage) throws Exception {
loadCustomFonts(); loadCustomFonts();
FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource("geofrogger.fxml"), ResourceBundle.getBundle("de.frosch95.geofrogger.fx.geofrogger")); FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource("geofrogger/geofrogger.fxml"), ResourceBundle.getBundle("de.frosch95.geofrogger.fx.geofrogger"));
Parent root = (Parent)fxmlLoader.load(); Parent root = (Parent)fxmlLoader.load();
Scene scene = new Scene(root); Scene scene = new Scene(root);
stage.setScene(scene); stage.setScene(scene);

View File

@@ -23,10 +23,11 @@
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
*/ */
package de.frosch95.geofrogger.fx; package de.frosch95.geofrogger.fx.cachedetails;
import de.frosch95.geofrogger.application.SessionContext; import de.frosch95.geofrogger.application.SessionContext;
import de.frosch95.geofrogger.application.SessionContextListener; import de.frosch95.geofrogger.application.SessionContextListener;
import de.frosch95.geofrogger.fx.components.MapPaneWrapper;
import de.frosch95.geofrogger.fx.components.GeocachingIcons; import de.frosch95.geofrogger.fx.components.GeocachingIcons;
import de.frosch95.geofrogger.fx.components.IconManager; import de.frosch95.geofrogger.fx.components.IconManager;
import de.frosch95.geofrogger.model.Cache; import de.frosch95.geofrogger.model.Cache;

View File

@@ -1,13 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<?import de.frosch95.geofrogger.fx.MapPaneWrapper?> <?import de.frosch95.geofrogger.fx.components.MapPaneWrapper?>
<?import javafx.geometry.Insets?> <?import javafx.geometry.Insets?>
<?import javafx.scene.control.*?> <?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?> <?import javafx.scene.layout.*?>
<?import javafx.scene.text.Font?> <?import javafx.scene.text.Font?>
<?import java.net.URL?> <?import java.net.URL?>
<AnchorPane fx:id="cacheDetailPane" styleClass="details-pane" xmlns:fx="http://javafx.com/fxml" <AnchorPane fx:id="cacheDetailPane" styleClass="details-pane" xmlns:fx="http://javafx.com/fxml"
fx:controller="de.frosch95.geofrogger.fx.CacheDetailsController"> fx:controller="de.frosch95.geofrogger.fx.cachedetails.CacheDetailsController">
<children> <children>
<HBox alignment="CENTER_LEFT" prefHeight="40.0" prefWidth="-1.0" styleClass="details-header" <HBox alignment="CENTER_LEFT" prefHeight="40.0" prefWidth="-1.0" styleClass="details-header"
AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0"> AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
@@ -142,6 +142,6 @@
</TabPane> </TabPane>
</children> </children>
<stylesheets> <stylesheets>
<URL value="@geofrogger.css"/> <URL value="@../geofrogger.css"/>
</stylesheets> </stylesheets>
</AnchorPane> </AnchorPane>

View File

@@ -23,7 +23,7 @@
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
*/ */
package de.frosch95.geofrogger.fx; package de.frosch95.geofrogger.fx.cachelist;
import de.frosch95.geofrogger.application.SessionContext; import de.frosch95.geofrogger.application.SessionContext;
import de.frosch95.geofrogger.application.SessionContextListener; import de.frosch95.geofrogger.application.SessionContextListener;
@@ -42,7 +42,7 @@ import java.net.URL;
import java.util.List; import java.util.List;
import java.util.ResourceBundle; import java.util.ResourceBundle;
import static de.frosch95.geofrogger.fx.JavaFXUtils.addClasses; import static de.frosch95.geofrogger.fx.utils.JavaFXUtils.addClasses;
/** /**
* FXML Controller class * FXML Controller class

View File

@@ -5,7 +5,7 @@
<?import javafx.scene.layout.*?> <?import javafx.scene.layout.*?>
<?import javafx.scene.text.Font?> <?import javafx.scene.text.Font?>
<?import java.net.URL?> <?import java.net.URL?>
<AnchorPane xmlns:fx="http://javafx.com/fxml" fx:controller="de.frosch95.geofrogger.fx.CacheListController"> <AnchorPane xmlns:fx="http://javafx.com/fxml" fx:controller="de.frosch95.geofrogger.fx.cachelist.CacheListController">
<children> <children>
<HBox alignment="CENTER_LEFT" prefHeight="40.0" prefWidth="-1.0" styleClass="cache-header" <HBox alignment="CENTER_LEFT" prefHeight="40.0" prefWidth="-1.0" styleClass="cache-header"
AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0"> AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
@@ -33,6 +33,6 @@
AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="40.0"/> AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="40.0"/>
</children> </children>
<stylesheets> <stylesheets>
<URL value="@geofrogger.css"/> <URL value="@../geofrogger.css"/>
</stylesheets> </stylesheets>
</AnchorPane> </AnchorPane>

View File

@@ -35,8 +35,8 @@ import javafx.scene.layout.ColumnConstraints;
import javafx.scene.layout.GridPane; import javafx.scene.layout.GridPane;
import javafx.scene.layout.Priority; import javafx.scene.layout.Priority;
import static de.frosch95.geofrogger.fx.JavaFXUtils.addClasses; import static de.frosch95.geofrogger.fx.utils.JavaFXUtils.addClasses;
import static de.frosch95.geofrogger.fx.JavaFXUtils.removeClasses; import static de.frosch95.geofrogger.fx.utils.JavaFXUtils.removeClasses;
/** /**
* Multi-Column-Row list cell to shows the most important data in a list. * Multi-Column-Row list cell to shows the most important data in a list.

View File

@@ -23,8 +23,9 @@
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
*/ */
package de.frosch95.geofrogger.fx; package de.frosch95.geofrogger.fx.components;
import de.frosch95.geofrogger.fx.utils.JavaFXUtils;
import javafx.beans.value.ChangeListener; import javafx.beans.value.ChangeListener;
import javafx.beans.value.ObservableValue; import javafx.beans.value.ObservableValue;
import javafx.scene.layout.Pane; import javafx.scene.layout.Pane;

View File

@@ -23,7 +23,7 @@
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
*/ */
package de.frosch95.geofrogger.fx; package de.frosch95.geofrogger.fx.geofrogger;
import de.frosch95.geofrogger.application.ProgressEvent; import de.frosch95.geofrogger.application.ProgressEvent;
import de.frosch95.geofrogger.application.ServiceManager; import de.frosch95.geofrogger.application.ServiceManager;
@@ -49,7 +49,6 @@ import org.controlsfx.dialog.Dialog;
import java.io.File; import java.io.File;
import java.io.IOException; import java.io.IOException;
import java.net.URL; import java.net.URL;
import java.sql.SQLException;
import java.util.List; import java.util.List;
import java.util.ResourceBundle; import java.util.ResourceBundle;
import java.util.logging.Level; import java.util.logging.Level;

View File

@@ -7,7 +7,7 @@
<?import javafx.scene.text.Font?> <?import javafx.scene.text.Font?>
<?import java.net.URL?> <?import java.net.URL?>
<VBox prefHeight="800.0" prefWidth="1280.0" minHeight="600.0" minWidth="800.0" xmlns:fx="http://javafx.com/fxml" <VBox prefHeight="800.0" prefWidth="1280.0" minHeight="600.0" minWidth="800.0" xmlns:fx="http://javafx.com/fxml"
fx:controller="de.frosch95.geofrogger.fx.GeofroggerController"> fx:controller="de.frosch95.geofrogger.fx.geofrogger.GeofroggerController">
<children> <children>
<MenuBar VBox.vgrow="NEVER"> <MenuBar VBox.vgrow="NEVER">
<menus> <menus>
@@ -28,10 +28,10 @@
<SplitPane dividerPositions="0.3779342723004695" focusTraversable="true" prefHeight="-1.0" prefWidth="-1.0" <SplitPane dividerPositions="0.3779342723004695" focusTraversable="true" prefHeight="-1.0" prefWidth="-1.0"
VBox.vgrow="ALWAYS"> VBox.vgrow="ALWAYS">
<items> <items>
<fx:include source="cache_list.fxml" fx:id="cacheListContent"/> <fx:include source="../cachelist/cache_list.fxml" fx:id="cacheListContent"/>
<ScrollPane fitToHeight="true" fitToWidth="true" pannable="false" prefHeight="-1.0" prefWidth="-1.0"> <ScrollPane fitToHeight="true" fitToWidth="true" pannable="false" prefHeight="-1.0" prefWidth="-1.0">
<content> <content>
<fx:include source="cache_details.fxml" fx:id="cacheDetailsContent"/> <fx:include source="../cachedetails/cache_details.fxml" fx:id="cacheDetailsContent"/>
</content> </content>
</ScrollPane> </ScrollPane>
</items> </items>
@@ -55,6 +55,6 @@
</HBox> </HBox>
</children> </children>
<stylesheets> <stylesheets>
<URL value="@geofrogger.css"/> <URL value="@../geofrogger.css"/>
</stylesheets> </stylesheets>
</VBox> </VBox>

View File

@@ -23,7 +23,7 @@
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
*/ */
package de.frosch95.geofrogger.fx; package de.frosch95.geofrogger.fx.utils;
import javafx.scene.Node; import javafx.scene.Node;