Created
May 22, 2015 11:20
-
-
Save atrin-hojjat/939728d1a08a34ab501f to your computer and use it in GitHub Desktop.
Google Maps Search with Vaadin, GSon and POI
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
GoogleMaps |
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
<component name="ArtifactManager"> | |
<artifact type="exploded-war" name="GoogleMaps:war exploded"> | |
<output-path>$PROJECT_DIR$/out/artifacts/GoogleMaps_war_exploded</output-path> | |
<root id="root"> | |
<element id="javaee-facet-resources" facet="GoogleMaps/web/Web" /> | |
<element id="directory" name="WEB-INF"> | |
<element id="directory" name="classes"> | |
<element id="module-output" name="GoogleMaps" /> | |
</element> | |
<element id="directory" name="lib"> | |
<element id="library" level="project" name="Vaadin Server" /> | |
</element> | |
</element> | |
</root> | |
</artifact> | |
</component> |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<project version="4"> | |
<component name="CompilerConfiguration"> | |
<resourceExtensions /> | |
<wildcardResourcePatterns> | |
<entry name="!?*.java" /> | |
<entry name="!?*.form" /> | |
<entry name="!?*.class" /> | |
<entry name="!?*.groovy" /> | |
<entry name="!?*.scala" /> | |
<entry name="!?*.flex" /> | |
<entry name="!?*.kt" /> | |
<entry name="!?*.clj" /> | |
<entry name="!?*.aj" /> | |
</wildcardResourcePatterns> | |
<annotationProcessing> | |
<profile default="true" name="Default" enabled="false"> | |
<processorPath useClasspath="true" /> | |
</profile> | |
</annotationProcessing> | |
</component> | |
</project> |
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
<component name="CopyrightManager"> | |
<settings default="" /> | |
</component> |
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
<component name="libraryTable"> | |
<library name="commons-codec-1.9"> | |
<CLASSES> | |
<root url="jar://$PROJECT_DIR$/../../../../Packages/poi-3.12/lib/commons-codec-1.9.jar!/" /> | |
<root url="jar://$PROJECT_DIR$/../../../../Packages/poi-3.12/lib/commons-logging-1.1.3.jar!/" /> | |
<root url="jar://$PROJECT_DIR$/../../../../Packages/poi-3.12/lib/junit-4.12.jar!/" /> | |
<root url="jar://$PROJECT_DIR$/../../../../Packages/poi-3.12/lib/log4j-1.2.17.jar!/" /> | |
</CLASSES> | |
<JAVADOC /> | |
<SOURCES /> | |
</library> | |
</component> |
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
<component name="libraryTable"> | |
<library name="gson-2.2.4"> | |
<CLASSES> | |
<root url="jar://$PROJECT_DIR$/../../../../Packages/google-gson-2.2.4/gson-2.2.4.jar!/" /> | |
</CLASSES> | |
<JAVADOC /> | |
<SOURCES /> | |
</library> | |
</component> |
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
<component name="libraryTable"> | |
<library name="poi-3.12-20150511"> | |
<CLASSES> | |
<root url="jar://$PROJECT_DIR$/../../../../Packages/poi-3.12/poi-3.12-20150511.jar!/" /> | |
</CLASSES> | |
<JAVADOC /> | |
<SOURCES /> | |
</library> | |
</component> |
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
<component name="libraryTable"> | |
<library name="Vaadin Client"> | |
<CLASSES> | |
<root url="jar://$PROJECT_DIR$/../../../../Packages/vaadin-all-7.4.6/vaadin-client-7.4.6.jar!/" /> | |
<root url="jar://$PROJECT_DIR$/../../../../Packages/vaadin-all-7.4.6/vaadin-client-compiler-7.4.6.jar!/" /> | |
</CLASSES> | |
<JAVADOC /> | |
<SOURCES> | |
<root url="jar://$PROJECT_DIR$/../../../../Packages/vaadin-all-7.4.6/vaadin-client-7.4.6.jar!/" /> | |
<root url="jar://$PROJECT_DIR$/../../../../Packages/vaadin-all-7.4.6/vaadin-client-compiler-7.4.6.jar!/" /> | |
</SOURCES> | |
</library> | |
</component> |
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
<component name="libraryTable"> | |
<library name="Vaadin Server"> | |
<CLASSES> | |
<root url="jar://$PROJECT_DIR$/../../../../Packages/vaadin-all-7.4.6/vaadin-push-7.4.6.jar!/" /> | |
<root url="jar://$PROJECT_DIR$/../../../../Packages/vaadin-all-7.4.6/vaadin-server-7.4.6.jar!/" /> | |
<root url="jar://$PROJECT_DIR$/../../../../Packages/vaadin-all-7.4.6/vaadin-shared-7.4.6.jar!/" /> | |
<root url="jar://$PROJECT_DIR$/../../../../Packages/vaadin-all-7.4.6/vaadin-themes-7.4.6.jar!/" /> | |
<root url="jar://$PROJECT_DIR$/../../../../Packages/vaadin-all-7.4.6/vaadin-widgets-7.4.6.jar!/" /> | |
<root url="jar://$PROJECT_DIR$/../../../../Packages/vaadin-all-7.4.6/vaadin-client-compiled-7.4.6.jar!/" /> | |
<root url="jar://$PROJECT_DIR$/../../../../Packages/vaadin-all-7.4.6/lib/sac-1.3.jar!/" /> | |
<root url="jar://$PROJECT_DIR$/../../../../Packages/vaadin-all-7.4.6/lib/ant-1.6.5.jar!/" /> | |
<root url="jar://$PROJECT_DIR$/../../../../Packages/vaadin-all-7.4.6/lib/asm-5.0.3.jar!/" /> | |
<root url="jar://$PROJECT_DIR$/../../../../Packages/vaadin-all-7.4.6/lib/junit-4.11.jar!/" /> | |
<root url="jar://$PROJECT_DIR$/../../../../Packages/vaadin-all-7.4.6/lib/jsoup-1.8.1.jar!/" /> | |
<root url="jar://$PROJECT_DIR$/../../../../Packages/vaadin-all-7.4.6/lib/easymock-3.0.jar!/" /> | |
<root url="jar://$PROJECT_DIR$/../../../../Packages/vaadin-all-7.4.6/lib/httpcore-4.3.jar!/" /> | |
<root url="jar://$PROJECT_DIR$/../../../../Packages/vaadin-all-7.4.6/lib/icu4j-50.1.1.jar!/" /> | |
<root url="jar://$PROJECT_DIR$/../../../../Packages/vaadin-all-7.4.6/lib/objenesis-1.2.jar!/" /> | |
<root url="jar://$PROJECT_DIR$/../../../../Packages/vaadin-all-7.4.6/lib/asm-tree-5.0.3.jar!/" /> | |
<root url="jar://$PROJECT_DIR$/../../../../Packages/vaadin-all-7.4.6/lib/asm-util-5.0.3.jar!/" /> | |
<root url="jar://$PROJECT_DIR$/../../../../Packages/vaadin-all-7.4.6/lib/commons-io-2.4.jar!/" /> | |
<root url="jar://$PROJECT_DIR$/../../../../Packages/vaadin-all-7.4.6/lib/httpmime-4.3.1.jar!/" /> | |
<root url="jar://$PROJECT_DIR$/../../../../Packages/vaadin-all-7.4.6/lib/cglib-nodep-2.2.jar!/" /> | |
<root url="jar://$PROJECT_DIR$/../../../../Packages/vaadin-all-7.4.6/lib/flute-1.3.0.gg2.jar!/" /> | |
<root url="jar://$PROJECT_DIR$/../../../../Packages/vaadin-all-7.4.6/lib/nekohtml-1.9.19.jar!/" /> | |
<root url="jar://$PROJECT_DIR$/../../../../Packages/vaadin-all-7.4.6/lib/xml-apis-1.4.01.jar!/" /> | |
<root url="jar://$PROJECT_DIR$/../../../../Packages/vaadin-all-7.4.6/lib/cssparser-0.9.11.jar!/" /> | |
<root url="jar://$PROJECT_DIR$/../../../../Packages/vaadin-all-7.4.6/lib/httpclient-4.3.1.jar!/" /> | |
<root url="jar://$PROJECT_DIR$/../../../../Packages/vaadin-all-7.4.6/lib/serializer-2.7.1.jar!/" /> | |
<root url="jar://$PROJECT_DIR$/../../../../Packages/vaadin-all-7.4.6/lib/swing-worker-1.1.jar!/" /> | |
<root url="jar://$PROJECT_DIR$/../../../../Packages/vaadin-all-7.4.6/lib/apache-mime4j-0.6.jar!/" /> | |
<root url="jar://$PROJECT_DIR$/../../../../Packages/vaadin-all-7.4.6/lib/asm-commons-5.0.3.jar!/" /> | |
<root url="jar://$PROJECT_DIR$/../../../../Packages/vaadin-all-7.4.6/lib/commons-codec-1.8.jar!/" /> | |
<root url="jar://$PROJECT_DIR$/../../../../Packages/vaadin-all-7.4.6/lib/commons-lang3-3.1.jar!/" /> | |
<root url="jar://$PROJECT_DIR$/../../../../Packages/vaadin-all-7.4.6/lib/hamcrest-core-1.3.jar!/" /> | |
<root url="jar://$PROJECT_DIR$/../../../../Packages/vaadin-all-7.4.6/lib/xercesImpl-2.11.0.jar!/" /> | |
<root url="jar://$PROJECT_DIR$/../../../../Packages/vaadin-all-7.4.6/lib/ant-launcher-1.6.5.jar!/" /> | |
<root url="jar://$PROJECT_DIR$/../../../../Packages/vaadin-all-7.4.6/lib/commons-logging-1.1.3.jar!/" /> | |
<root url="jar://$PROJECT_DIR$/../../../../Packages/vaadin-all-7.4.6/lib/commons-collections-3.1.jar!/" /> | |
<root url="jar://$PROJECT_DIR$/../../../../Packages/vaadin-all-7.4.6/lib/validation-api-1.0.0.GA.jar!/" /> | |
<root url="jar://$PROJECT_DIR$/../../../../Packages/vaadin-all-7.4.6/lib/vaadin-slf4j-jdk14-1.6.1.jar!/" /> | |
<root url="jar://$PROJECT_DIR$/../../../../Packages/vaadin-all-7.4.6/lib/jetty-io-8.1.12.v20130726.jar!/" /> | |
<root url="jar://$PROJECT_DIR$/../../../../Packages/vaadin-all-7.4.6/lib/jetty-xml-8.1.12.v20130726.jar!/" /> | |
<root url="jar://$PROJECT_DIR$/../../../../Packages/vaadin-all-7.4.6/lib/appengine-api-1.0-sdk-1.2.1.jar!/" /> | |
<root url="jar://$PROJECT_DIR$/../../../../Packages/vaadin-all-7.4.6/lib/jetty-http-8.1.12.v20130726.jar!/" /> | |
<root url="jar://$PROJECT_DIR$/../../../../Packages/vaadin-all-7.4.6/lib/jetty-jndi-8.1.12.v20130726.jar!/" /> | |
<root url="jar://$PROJECT_DIR$/../../../../Packages/vaadin-all-7.4.6/lib/jetty-plus-8.1.12.v20130726.jar!/" /> | |
<root url="jar://$PROJECT_DIR$/../../../../Packages/vaadin-all-7.4.6/lib/jetty-util-8.1.12.v20130726.jar!/" /> | |
<root url="jar://$PROJECT_DIR$/../../../../Packages/vaadin-all-7.4.6/lib/vaadin-sass-compiler-0.9.12.jar!/" /> | |
<root url="jar://$PROJECT_DIR$/../../../../Packages/vaadin-all-7.4.6/lib/jetty-client-8.1.12.v20130726.jar!/" /> | |
<root url="jar://$PROJECT_DIR$/../../../../Packages/vaadin-all-7.4.6/lib/jetty-server-8.1.12.v20130726.jar!/" /> | |
<root url="jar://$PROJECT_DIR$/../../../../Packages/vaadin-all-7.4.6/lib/jetty-webapp-8.1.12.v20130726.jar!/" /> | |
<root url="jar://$PROJECT_DIR$/../../../../Packages/vaadin-all-7.4.6/lib/jetty-servlet-8.1.12.v20130726.jar!/" /> | |
<root url="jar://$PROJECT_DIR$/../../../../Packages/vaadin-all-7.4.6/lib/jetty-security-8.1.12.v20130726.jar!/" /> | |
<root url="jar://$PROJECT_DIR$/../../../../Packages/vaadin-all-7.4.6/lib/jetty-servlets-8.1.12.v20130726.jar!/" /> | |
<root url="jar://$PROJECT_DIR$/../../../../Packages/vaadin-all-7.4.6/lib/validation-api-1.0.0.GA-sources.jar!/" /> | |
<root url="jar://$PROJECT_DIR$/../../../../Packages/vaadin-all-7.4.6/lib/atmosphere-runtime-2.2.4.vaadin5.jar!/" /> | |
<root url="jar://$PROJECT_DIR$/../../../../Packages/vaadin-all-7.4.6/lib/vaadin-client-compiler-deps-1.2.0.jar!/" /> | |
<root url="jar://$PROJECT_DIR$/../../../../Packages/vaadin-all-7.4.6/lib/jetty-annotations-8.1.12.v20130726.jar!/" /> | |
<root url="jar://$PROJECT_DIR$/../../../../Packages/vaadin-all-7.4.6/lib/jetty-continuation-8.1.12.v20130726.jar!/" /> | |
<root url="jar://$PROJECT_DIR$/../../../../Packages/vaadin-all-7.4.6/lib/streamhtmlparser-jsilver-0.0.10.vaadin1.jar!/" /> | |
</CLASSES> | |
<JAVADOC /> | |
<SOURCES /> | |
</library> | |
</component> |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<project version="4"> | |
<component name="EntryPointsManager"> | |
<entry_points version="2.0" /> | |
</component> | |
<component name="MavenImportPreferences"> | |
<option name="generalSettings"> | |
<MavenGeneralSettings> | |
<option name="mavenHome" value="Bundled (Maven 3)" /> | |
</MavenGeneralSettings> | |
</option> | |
</component> | |
<component name="ProjectLevelVcsManager" settingsEditedManually="false"> | |
<OptionsSetting value="true" id="Add" /> | |
<OptionsSetting value="true" id="Remove" /> | |
<OptionsSetting value="true" id="Checkout" /> | |
<OptionsSetting value="true" id="Update" /> | |
<OptionsSetting value="true" id="Status" /> | |
<OptionsSetting value="true" id="Edit" /> | |
<ConfirmationsSetting value="0" id="Add" /> | |
<ConfirmationsSetting value="0" id="Remove" /> | |
</component> | |
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" assert-keyword="true" jdk-15="true" project-jdk-name="1.8" project-jdk-type="JavaSDK"> | |
<output url="file://$PROJECT_DIR$/out" /> | |
</component> | |
</project> |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<project version="4"> | |
<component name="ProjectModuleManager"> | |
<modules> | |
<module fileurl="file://$PROJECT_DIR$/GoogleMaps.iml" filepath="$PROJECT_DIR$/GoogleMaps.iml" /> | |
</modules> | |
</component> | |
</project> |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<project version="4"> | |
<component name="Palette2"> | |
<group name="Swing"> | |
<item class="com.intellij.uiDesigner.HSpacer" tooltip-text="Horizontal Spacer" icon="/com/intellij/uiDesigner/icons/hspacer.png" removable="false" auto-create-binding="false" can-attach-label="false"> | |
<default-constraints vsize-policy="1" hsize-policy="6" anchor="0" fill="1" /> | |
</item> | |
<item class="com.intellij.uiDesigner.VSpacer" tooltip-text="Vertical Spacer" icon="/com/intellij/uiDesigner/icons/vspacer.png" removable="false" auto-create-binding="false" can-attach-label="false"> | |
<default-constraints vsize-policy="6" hsize-policy="1" anchor="0" fill="2" /> | |
</item> | |
<item class="javax.swing.JPanel" icon="/com/intellij/uiDesigner/icons/panel.png" removable="false" auto-create-binding="false" can-attach-label="false"> | |
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3" /> | |
</item> | |
<item class="javax.swing.JScrollPane" icon="/com/intellij/uiDesigner/icons/scrollPane.png" removable="false" auto-create-binding="false" can-attach-label="true"> | |
<default-constraints vsize-policy="7" hsize-policy="7" anchor="0" fill="3" /> | |
</item> | |
<item class="javax.swing.JButton" icon="/com/intellij/uiDesigner/icons/button.png" removable="false" auto-create-binding="true" can-attach-label="false"> | |
<default-constraints vsize-policy="0" hsize-policy="3" anchor="0" fill="1" /> | |
<initial-values> | |
<property name="text" value="Button" /> | |
</initial-values> | |
</item> | |
<item class="javax.swing.JRadioButton" icon="/com/intellij/uiDesigner/icons/radioButton.png" removable="false" auto-create-binding="true" can-attach-label="false"> | |
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" /> | |
<initial-values> | |
<property name="text" value="RadioButton" /> | |
</initial-values> | |
</item> | |
<item class="javax.swing.JCheckBox" icon="/com/intellij/uiDesigner/icons/checkBox.png" removable="false" auto-create-binding="true" can-attach-label="false"> | |
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" /> | |
<initial-values> | |
<property name="text" value="CheckBox" /> | |
</initial-values> | |
</item> | |
<item class="javax.swing.JLabel" icon="/com/intellij/uiDesigner/icons/label.png" removable="false" auto-create-binding="false" can-attach-label="false"> | |
<default-constraints vsize-policy="0" hsize-policy="0" anchor="8" fill="0" /> | |
<initial-values> | |
<property name="text" value="Label" /> | |
</initial-values> | |
</item> | |
<item class="javax.swing.JTextField" icon="/com/intellij/uiDesigner/icons/textField.png" removable="false" auto-create-binding="true" can-attach-label="true"> | |
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1"> | |
<preferred-size width="150" height="-1" /> | |
</default-constraints> | |
</item> | |
<item class="javax.swing.JPasswordField" icon="/com/intellij/uiDesigner/icons/passwordField.png" removable="false" auto-create-binding="true" can-attach-label="true"> | |
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1"> | |
<preferred-size width="150" height="-1" /> | |
</default-constraints> | |
</item> | |
<item class="javax.swing.JFormattedTextField" icon="/com/intellij/uiDesigner/icons/formattedTextField.png" removable="false" auto-create-binding="true" can-attach-label="true"> | |
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1"> | |
<preferred-size width="150" height="-1" /> | |
</default-constraints> | |
</item> | |
<item class="javax.swing.JTextArea" icon="/com/intellij/uiDesigner/icons/textArea.png" removable="false" auto-create-binding="true" can-attach-label="true"> | |
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3"> | |
<preferred-size width="150" height="50" /> | |
</default-constraints> | |
</item> | |
<item class="javax.swing.JTextPane" icon="/com/intellij/uiDesigner/icons/textPane.png" removable="false" auto-create-binding="true" can-attach-label="true"> | |
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3"> | |
<preferred-size width="150" height="50" /> | |
</default-constraints> | |
</item> | |
<item class="javax.swing.JEditorPane" icon="/com/intellij/uiDesigner/icons/editorPane.png" removable="false" auto-create-binding="true" can-attach-label="true"> | |
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3"> | |
<preferred-size width="150" height="50" /> | |
</default-constraints> | |
</item> | |
<item class="javax.swing.JComboBox" icon="/com/intellij/uiDesigner/icons/comboBox.png" removable="false" auto-create-binding="true" can-attach-label="true"> | |
<default-constraints vsize-policy="0" hsize-policy="2" anchor="8" fill="1" /> | |
</item> | |
<item class="javax.swing.JTable" icon="/com/intellij/uiDesigner/icons/table.png" removable="false" auto-create-binding="true" can-attach-label="false"> | |
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3"> | |
<preferred-size width="150" height="50" /> | |
</default-constraints> | |
</item> | |
<item class="javax.swing.JList" icon="/com/intellij/uiDesigner/icons/list.png" removable="false" auto-create-binding="true" can-attach-label="false"> | |
<default-constraints vsize-policy="6" hsize-policy="2" anchor="0" fill="3"> | |
<preferred-size width="150" height="50" /> | |
</default-constraints> | |
</item> | |
<item class="javax.swing.JTree" icon="/com/intellij/uiDesigner/icons/tree.png" removable="false" auto-create-binding="true" can-attach-label="false"> | |
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3"> | |
<preferred-size width="150" height="50" /> | |
</default-constraints> | |
</item> | |
<item class="javax.swing.JTabbedPane" icon="/com/intellij/uiDesigner/icons/tabbedPane.png" removable="false" auto-create-binding="true" can-attach-label="false"> | |
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3"> | |
<preferred-size width="200" height="200" /> | |
</default-constraints> | |
</item> | |
<item class="javax.swing.JSplitPane" icon="/com/intellij/uiDesigner/icons/splitPane.png" removable="false" auto-create-binding="false" can-attach-label="false"> | |
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3"> | |
<preferred-size width="200" height="200" /> | |
</default-constraints> | |
</item> | |
<item class="javax.swing.JSpinner" icon="/com/intellij/uiDesigner/icons/spinner.png" removable="false" auto-create-binding="true" can-attach-label="true"> | |
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" /> | |
</item> | |
<item class="javax.swing.JSlider" icon="/com/intellij/uiDesigner/icons/slider.png" removable="false" auto-create-binding="true" can-attach-label="false"> | |
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" /> | |
</item> | |
<item class="javax.swing.JSeparator" icon="/com/intellij/uiDesigner/icons/separator.png" removable="false" auto-create-binding="false" can-attach-label="false"> | |
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3" /> | |
</item> | |
<item class="javax.swing.JProgressBar" icon="/com/intellij/uiDesigner/icons/progressbar.png" removable="false" auto-create-binding="true" can-attach-label="false"> | |
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1" /> | |
</item> | |
<item class="javax.swing.JToolBar" icon="/com/intellij/uiDesigner/icons/toolbar.png" removable="false" auto-create-binding="false" can-attach-label="false"> | |
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1"> | |
<preferred-size width="-1" height="20" /> | |
</default-constraints> | |
</item> | |
<item class="javax.swing.JToolBar$Separator" icon="/com/intellij/uiDesigner/icons/toolbarSeparator.png" removable="false" auto-create-binding="false" can-attach-label="false"> | |
<default-constraints vsize-policy="0" hsize-policy="0" anchor="0" fill="1" /> | |
</item> | |
<item class="javax.swing.JScrollBar" icon="/com/intellij/uiDesigner/icons/scrollbar.png" removable="false" auto-create-binding="true" can-attach-label="false"> | |
<default-constraints vsize-policy="6" hsize-policy="0" anchor="0" fill="2" /> | |
</item> | |
</group> | |
</component> | |
</project> |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<project version="4"> | |
<component name="VcsDirectoryMappings"> | |
<mapping directory="" vcs="" /> | |
</component> | |
</project> |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<module type="JAVA_MODULE" version="4"> | |
<component name="FacetManager"> | |
<facet type="web" name="Web"> | |
<configuration> | |
<descriptors> | |
<deploymentDescriptor name="web.xml" url="file://$MODULE_DIR$/web/WEB-INF/web.xml" /> | |
</descriptors> | |
<webroots> | |
<root url="file://$MODULE_DIR$/web" relative="/" /> | |
</webroots> | |
</configuration> | |
</facet> | |
</component> | |
<component name="NewModuleRootManager" inherit-compiler-output="true"> | |
<exclude-output /> | |
<content url="file://$MODULE_DIR$"> | |
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" /> | |
</content> | |
<orderEntry type="inheritedJdk" /> | |
<orderEntry type="sourceFolder" forTests="false" /> | |
<orderEntry type="library" scope="PROVIDED" name="Vaadin Client" level="project" /> | |
<orderEntry type="library" name="Vaadin Server" level="project" /> | |
<orderEntry type="library" scope="PROVIDED" name="Tomcat 8.0.20" level="application_server_libraries" /> | |
<orderEntry type="library" name="poi-3.12-20150511" level="project" /> | |
<orderEntry type="library" name="commons-codec-1.9" level="project" /> | |
<orderEntry type="library" name="gson-2.2.4" level="project" /> | |
</component> | |
</module> |
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
package com.atrin.access.components.search_pane; | |
public interface CustomComponentSetterGetter { | |
public abstract String getName(); | |
public abstract String getValue(); | |
} |
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
package com.atrin.access.components.search_pane; | |
import com.google.gwt.event.dom.client.KeyPressEvent; | |
import com.google.gwt.event.dom.client.KeyPressHandler; | |
import com.vaadin.annotations.AutoGenerated; | |
import com.vaadin.event.FieldEvents; | |
import com.vaadin.event.FieldEvents.TextChangeEvent; | |
import com.vaadin.ui.CustomComponent; | |
import com.vaadin.ui.HorizontalLayout; | |
import com.vaadin.ui.Label; | |
import com.vaadin.ui.TextField; | |
import com.vaadin.ui.VerticalLayout; | |
public class CustomTextField extends CustomComponent implements CustomComponentSetterGetter{ | |
protected String name; | |
protected TextField textfield; | |
protected Label label; | |
protected HorizontalLayout mainlayout; | |
protected String value; | |
protected Search caller_class; | |
public CustomTextField(String name, Search caller_class) { | |
this.name = name; | |
this.caller_class = caller_class; | |
buildMainLayout(); | |
setCompositionRoot(mainlayout); | |
} | |
@AutoGenerated | |
private void buildMainLayout() { | |
// TODO Create Componets and Handlers | |
mainlayout = new HorizontalLayout(); | |
mainlayout.setWidth(""); | |
// label = new Label(name); | |
// mainlayout.addComponent(label); | |
textfield = new TextField(); | |
mainlayout.addComponent(textfield); | |
textfield.addTextChangeListener(new FieldEvents.TextChangeListener() { | |
@Override | |
public void textChange(TextChangeEvent event) { | |
// TODO Watch Changes on textfield | |
value = event.getText(); | |
} | |
}); | |
} | |
@Override public String getValue(){return value;} | |
@Override public String getName(){return name;} | |
} |
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
package com.atrin.access.components.search_pane; | |
import java.util.ArrayList; | |
import com.vaadin.annotations.AutoGenerated; | |
import com.vaadin.data.Property; | |
import com.vaadin.data.Property.ValueChangeEvent; | |
import com.vaadin.event.FieldEvents; | |
import com.vaadin.event.FieldEvents.TextChangeEvent; | |
import com.vaadin.ui.CustomComponent; | |
import com.vaadin.ui.HorizontalLayout; | |
import com.vaadin.ui.Label; | |
import com.vaadin.ui.NativeSelect; | |
import com.vaadin.ui.TextField; | |
import com.vaadin.ui.TwinColSelect; | |
import com.vaadin.ui.VerticalLayout; | |
public class CustomTwinColSelect extends CustomComponent implements | |
CustomComponentSetterGetter { | |
protected String name; | |
protected TwinColSelect twincolselect; | |
protected Label label; | |
protected HorizontalLayout mainlayout; | |
protected String values[]; | |
protected String value[]; | |
protected Search caller_class; | |
public CustomTwinColSelect(String name, String values[], Search caller_class) { | |
this.name = name; | |
this.caller_class = caller_class; | |
this.values = values; | |
buildMainLayout(); | |
setCompositionRoot(mainlayout); | |
} | |
@AutoGenerated | |
private void buildMainLayout() { | |
// TODO Create Componets and Handlers | |
mainlayout = new HorizontalLayout(); | |
// label = new Label(name); | |
// mainlayout.addComponent(label); | |
twincolselect = new TwinColSelect(); | |
twincolselect.setNullSelectionAllowed(true); | |
twincolselect.setMultiSelect(true); | |
twincolselect.setImmediate(true); | |
twincolselect.setLeftColumnCaption("Available options"); | |
twincolselect.setRightColumnCaption("Selected options"); | |
for (String value : values) { | |
twincolselect.addItem(value); | |
} | |
mainlayout.addComponent(twincolselect); | |
twincolselect | |
.addValueChangeListener(new Property.ValueChangeListener() { | |
@Override | |
public void valueChange(ValueChangeEvent event) { | |
// TODO Watch Changes on NativeSelect | |
Object vals[] = ((java.util.Collection<String>) event | |
.getProperty().getValue()).toArray(); | |
value = new String[vals.length]; | |
int i = 0; | |
for (Object val : vals) { | |
value[i] = String.valueOf(val); | |
i++; | |
} | |
// | |
// for(String v : value){ | |
// System.out.println(v); | |
// } | |
} | |
}); | |
} | |
@Override | |
public String getValue() { | |
String val = ""; | |
if (value.length != 0) | |
for (String v : value) { | |
if (v == value[value.length - 1]) | |
val += v; | |
else | |
val += v + "|"; | |
} | |
return val; | |
} | |
@Override | |
public String getName() { | |
return name; | |
} | |
} |
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
package com.atrin.access.components.search_pane; | |
import java.io.BufferedReader; | |
import java.io.InputStreamReader; | |
import java.lang.instrument.IllegalClassFormatException; | |
import java.net.URL; | |
import org.apache.poi.hssf.usermodel.HSSFCell; | |
import org.apache.poi.hssf.usermodel.HSSFCellStyle; | |
import org.apache.poi.hssf.usermodel.HSSFRow; | |
import org.apache.poi.hssf.usermodel.HSSFSheet; | |
import org.apache.poi.hssf.usermodel.HSSFWorkbook; | |
import org.apache.poi.hssf.util.HSSFColor; | |
import com.google.gson.JsonArray; | |
import com.google.gson.JsonObject; | |
import com.google.gson.JsonParser; | |
import javax.net.ssl.HttpsURLConnection; | |
import com.vaadin.ui.CustomComponent; | |
import com.vaadin.ui.GridLayout; | |
import com.vaadin.ui.Notification; | |
import com.vaadin.ui.Notification.Type; | |
public class NearBySearch extends Search { | |
private String res_str; | |
private final String header[] = { "Name", "Address", "Latitude", | |
"Longitude", "Type", "Icon", "ID", "Place ID" }; | |
// private String not_null; | |
public NearBySearch(GridLayout layout, HSSFWorkbook workbook) { | |
// field_names = new CustomComponent[4]; | |
super(layout, workbook); | |
field_names = new String[] { "name", "keyword", "location", "radius", | |
"type" }; | |
super.components = new CustomComponent[] { | |
new CustomTextField("Enter a Filter for Name ", this), | |
new CustomTextField( | |
"Enter Keywords for Place(in Address,Descripition and...)", | |
this), | |
new CustomTextField( | |
"Enter a Location(Required - Formate = \"lat,lng\")", | |
this), | |
new CustomTextField("Enter a Radius(Required)", this), | |
new CustomTwinColSelect("Select Type For Place", super.types, | |
this) }; | |
super.buildMainLayout(); | |
} | |
@Override | |
public void doSearch() { | |
String url_str = "https://maps.googleapis.com/maps/api/place/nearbysearch/json?"; | |
int count = 0; | |
if ((((CustomTextField) components[2]).getValue() != null && ((CustomTextField) components[3]) | |
.getValue() == null) | |
|| (((CustomTextField) components[2]).getValue() != null && ((CustomTextField) components[3]) | |
.getValue() == null)) { | |
Notification.show("You Should Enter Both of Location and Radius", | |
Type.ERROR_MESSAGE); | |
return; | |
} | |
for (String param : field_names) { | |
if (components[count].getClass().equals(CustomTextField.class)) | |
if (((CustomTextField) components[count]).getValue() != null) | |
if (count == 2 || count == 3 || count == 4) | |
url_str += "" | |
+ param | |
+ "=" | |
+ ((CustomTextField) components[count]) | |
.getValue().replace(" ", "") + "&"; | |
else | |
url_str += "" | |
+ param | |
+ "=" | |
+ ((CustomTextField) components[count]) | |
.getValue().replace(" ", "+") + "&"; | |
else if (count == 2 && count == 3) | |
Notification.show("Null Pointer Error", | |
"You Should Enter Both Location and Radius", | |
Type.ERROR_MESSAGE); | |
else if (components[count].getClass().equals( | |
CustomTwinColSelect.class)) | |
if (((CustomTwinColSelect) components[count]).getValue() != null) | |
url_str += "" | |
+ param | |
+ "=" | |
+ ((CustomTwinColSelect) components[count]) | |
.getValue(); | |
else if (count == 2 && count == 3) | |
Notification.show("Null Pointer Error", | |
"You Should Enter Both Location and Radius", | |
Type.ERROR_MESSAGE); | |
else | |
try { | |
throw new IllegalClassFormatException( | |
"Custom Component not Definded"); | |
} catch (IllegalClassFormatException e) { | |
// TODO Auto-generated catch block | |
e.printStackTrace(); | |
} | |
// url_str += "&"; | |
count++; | |
} | |
url_str += "key=AIzaSyDn3kHEzUQAMecnIQSc8_0AvrwTCwn4UjU"; | |
System.out.println(url_str); | |
URL url; | |
try { | |
url = new URL(url_str); | |
HttpsURLConnection con = (HttpsURLConnection) url.openConnection(); | |
con.setRequestMethod("GET"); | |
BufferedReader in = new BufferedReader(new InputStreamReader( | |
con.getInputStream())); | |
String inputLine; | |
StringBuffer response = new StringBuffer(); | |
while ((inputLine = in.readLine()) != null) { | |
response.append(inputLine); | |
} | |
in.close(); | |
// print result | |
System.out.println(response.toString()); | |
res_str = response.toString(); | |
} catch (Exception e) { | |
e.printStackTrace(); | |
} | |
if (res_str == null) { | |
return; | |
} | |
// if (new String(keyword | |
// .getValue().getBytes()) == null && new String(name | |
// .getValue().getBytes()) == null){ | |
// final Window window = new Window("Window"); | |
// final FormLayout content = new FormLayout(); | |
// window.setContent(content); | |
// content.addComponent(new | |
// Label("you must enter one of name or keyword at least")); | |
// return; | |
// } else if (new String(name | |
// .getValue().getBytes()) != null){ | |
// not_null = new String(name | |
// .getValue().getBytes()); | |
// } else { | |
// new String(keyword | |
// .getValue().getBytes()); | |
// } | |
JsonObject json = new JsonParser().parse(res_str).getAsJsonObject(); | |
JsonArray array = json.getAsJsonArray("results"); | |
// HSSFSheet worksheet = workbook.createSheet(not_null); | |
HSSFSheet worksheet = workbook.createSheet(new String("NearBy Search" | |
+ ((CustomTextField) components[0]).getValue().getBytes())); | |
HSSFCellStyle cellStyle = workbook.createCellStyle(); | |
// data.add(header); | |
HSSFRow row1 = worksheet.createRow(0); | |
// String data_head[] = new String [8]; | |
int c = 0; | |
for (String cellName : header) { | |
// data_head[c] = cellName; | |
HSSFCell cell = row1.createCell(c); | |
cell.setCellValue(cellName); | |
cellStyle = workbook.createCellStyle(); | |
cellStyle | |
.setFillForegroundColor(HSSFColor.LIGHT_CORNFLOWER_BLUE.index); | |
cellStyle.setFillPattern(HSSFCellStyle.SOLID_FOREGROUND); | |
cell.setCellStyle(cellStyle); | |
c++; | |
} | |
// data.add(data_head); | |
for (int i = 0; i < array.size(); i++) { | |
// String data_row[] = new String[8]; | |
JsonObject result = array.get(i).getAsJsonObject(); | |
HSSFRow row = worksheet.createRow(i + 1); | |
HSSFCell cellA = row.createCell(0); | |
HSSFCell cellB = row.createCell(1); | |
HSSFCell cellC = row.createCell(2); | |
HSSFCell cellD = row.createCell(3); | |
HSSFCell cellE = row.createCell(4); | |
HSSFCell cellF = row.createCell(5); | |
HSSFCell cellG = row.createCell(6); | |
HSSFCell cellH = row.createCell(7); | |
cellStyle.setFillForegroundColor(HSSFColor.GOLD.index); | |
cellStyle.setFillPattern(HSSFCellStyle.SOLID_FOREGROUND); | |
cellA.setCellStyle(cellStyle); | |
try { | |
cellA.setCellValue(result.get("name").getAsString()); | |
// data_row[0] = result.get("name").getAsString(); | |
cellB.setCellValue(result.get("formatted_address") | |
.getAsString()); | |
// data_row[1]=result.get("formatted_address").getAsString(); | |
cellC.setCellValue(((result.getAsJsonObject("geometry")) | |
.getAsJsonObject("location")).get("lat").getAsString()); | |
// data_row[2]=((result.getAsJsonObject("geometry")).getAsJsonObject("location")) | |
// .get("lat").getAsString(); | |
cellD.setCellValue(((result.getAsJsonObject("geometry")) | |
.getAsJsonObject("location")).get("lng").getAsString()); | |
// data_row[3]=((result.getAsJsonObject("geometry")).getAsJsonObject("location")) | |
// .get("lng").getAsString(); | |
JsonArray type_obj = result.getAsJsonArray("types"); | |
String type = ""; | |
for (int j = 0; j < type_obj.size(); j++) { | |
type += type_obj.get(j) | |
+ (j == type_obj.size() - 1 ? "" : ","); | |
} | |
cellE.setCellValue(type); | |
// data_row[4]=type; | |
cellF.setCellValue(result.get("icon").getAsString()); | |
// data_row[5]=result.get("icon").getAsString(); | |
cellG.setCellValue(result.get("id").getAsString()); | |
// data_row[6]=result.get("id").getAsString(); | |
cellH.setCellValue(result.get("place_id").getAsString()); | |
// data_row[7]=result.get("place_id").getAsString(); | |
// data.add(data_row); | |
} catch (Exception e) { | |
System.out.println("An Error Occured"); | |
} | |
} | |
} | |
} |
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
package com.atrin.access.components.search_pane; | |
import java.io.BufferedReader; | |
import java.io.InputStreamReader; | |
import java.lang.instrument.IllegalClassFormatException; | |
import java.net.URL; | |
import org.apache.poi.hssf.usermodel.HSSFCell; | |
import org.apache.poi.hssf.usermodel.HSSFCellStyle; | |
import org.apache.poi.hssf.usermodel.HSSFRow; | |
import org.apache.poi.hssf.usermodel.HSSFSheet; | |
import org.apache.poi.hssf.usermodel.HSSFWorkbook; | |
import org.apache.poi.hssf.util.HSSFColor; | |
import com.google.gson.JsonArray; | |
import com.google.gson.JsonObject; | |
import com.google.gson.JsonParser; | |
import javax.net.ssl.HttpsURLConnection; | |
import com.vaadin.ui.CustomComponent; | |
import com.vaadin.ui.GridLayout; | |
import com.vaadin.ui.Notification; | |
import com.vaadin.ui.Notification.Type; | |
public class RadarSearch extends Search { | |
private String res_str; | |
private final String header[] = { "Latitude", "Longitude", "ID", "Place ID" }; | |
// private String not_null; | |
public RadarSearch(GridLayout layout, HSSFWorkbook workbook) { | |
// field_names = new CustomComponent[4]; | |
super(layout, workbook); | |
field_names = new String[] { "name", "keyword", "location", "radius", | |
"type" }; | |
super.components = new CustomComponent[] { | |
new CustomTextField("Enter a Filter for Name ", this), | |
new CustomTextField( | |
"Enter Keywords for Place(in Address,Descripition and...)", | |
this), | |
new CustomTextField( | |
"Enter a Location(Required - Formate = \"lat,lng\")", | |
this), | |
new CustomTextField("Enter a Radius(Required)", this), | |
new CustomTwinColSelect("Select Type For Place", super.types, | |
this) }; | |
super.buildMainLayout(); | |
} | |
@Override | |
public void doSearch() { | |
String url_str = "https://maps.googleapis.com/maps/api/place/radarsearch/json?"; | |
int count = 0; | |
if ((((CustomTextField) components[2]).getValue() != null && ((CustomTextField) components[3]) | |
.getValue() == null) | |
|| (((CustomTextField) components[2]).getValue() != null && ((CustomTextField) components[3]) | |
.getValue() == null)) { | |
Notification.show("You Should Enter Both of Location and Radius", | |
Type.ERROR_MESSAGE); | |
return; | |
} | |
if ((((CustomTextField) components[0]).getValue() == null && ((CustomTextField) components[1]) | |
.getValue() == null)) { | |
Notification.show( | |
"You Should Enter at Least One of Location and Radius", | |
Type.ERROR_MESSAGE); | |
return; | |
} | |
for (String param : field_names) { | |
if (components[count].getClass().equals(CustomTextField.class)) | |
if (((CustomTextField) components[count]).getValue() != null) | |
if (count == 2 || count == 3 || count == 4) | |
url_str += "" | |
+ param | |
+ "=" | |
+ ((CustomTextField) components[count]) | |
.getValue().replace(" ", "") + "&"; | |
else | |
url_str += "" | |
+ param | |
+ "=" | |
+ ((CustomTextField) components[count]) | |
.getValue().replace(" ", "+") + "&"; | |
else if (count == 2 && count == 3) | |
Notification.show("Null Pointer Error", | |
"You Should Enter Both Location and Radius", | |
Type.ERROR_MESSAGE); | |
else if (components[count].getClass().equals( | |
CustomTwinColSelect.class)) | |
if (((CustomTwinColSelect) components[count]).getValue() != null) | |
url_str += "" | |
+ param | |
+ "=" | |
+ ((CustomTwinColSelect) components[count]) | |
.getValue(); | |
else if (count == 2 && count == 3) | |
Notification.show("Null Pointer Error", | |
"You Should Enter Both Location and Radius", | |
Type.ERROR_MESSAGE); | |
else | |
try { | |
throw new IllegalClassFormatException( | |
"Custom Component not Definded"); | |
} catch (IllegalClassFormatException e) { | |
// TODO Auto-generated catch block | |
e.printStackTrace(); | |
} | |
// url_str += "&"; | |
count++; | |
} | |
url_str += "key=AIzaSyDn3kHEzUQAMecnIQSc8_0AvrwTCwn4UjU"; | |
System.out.println(url_str); | |
URL url; | |
try { | |
url = new URL(url_str); | |
HttpsURLConnection con = (HttpsURLConnection) url.openConnection(); | |
con.setRequestMethod("GET"); | |
BufferedReader in = new BufferedReader(new InputStreamReader( | |
con.getInputStream())); | |
String inputLine; | |
StringBuffer response = new StringBuffer(); | |
while ((inputLine = in.readLine()) != null) { | |
response.append(inputLine); | |
} | |
in.close(); | |
// print result | |
System.out.println(response.toString()); | |
res_str = response.toString(); | |
} catch (Exception e) { | |
e.printStackTrace(); | |
} | |
if (res_str == null) { | |
return; | |
} | |
// if (new String(keyword | |
// .getValue().getBytes()) == null && new String(name | |
// .getValue().getBytes()) == null){ | |
// final Window window = new Window("Window"); | |
// final FormLayout content = new FormLayout(); | |
// window.setContent(content); | |
// content.addComponent(new | |
// Label("you must enter one of name or keyword at least")); | |
// return; | |
// } else if (new String(name | |
// .getValue().getBytes()) != null){ | |
// not_null = new String(name | |
// .getValue().getBytes()); | |
// } else { | |
// new String(keyword | |
// .getValue().getBytes()); | |
// } | |
JsonObject json = new JsonParser().parse(res_str).getAsJsonObject(); | |
JsonArray array = json.getAsJsonArray("results"); | |
// HSSFSheet worksheet = workbook.createSheet(not_null); | |
HSSFSheet worksheet = null; | |
if (((CustomTextField) components[0]).getValue() != null) | |
worksheet = workbook.createSheet(new String("Radar Search " | |
+ ((CustomTextField) components[0]).getValue())); | |
else | |
worksheet = workbook.createSheet(new String("Radar Search " | |
+ ((CustomTextField) components[1]).getValue())); | |
HSSFCellStyle cellStyle = workbook.createCellStyle(); | |
// data.add(header); | |
HSSFRow row1 = worksheet.createRow(0); | |
// String data_head[] = new String [8]; | |
int c = 0; | |
for (String cellName : header) { | |
// data_head[c] = cellName; | |
HSSFCell cell = row1.createCell(c); | |
cell.setCellValue(cellName); | |
cellStyle = workbook.createCellStyle(); | |
cellStyle | |
.setFillForegroundColor(HSSFColor.LIGHT_CORNFLOWER_BLUE.index); | |
cellStyle.setFillPattern(HSSFCellStyle.SOLID_FOREGROUND); | |
cell.setCellStyle(cellStyle); | |
c++; | |
} | |
// data.add(data_head); | |
for (int i = 0; i < array.size(); i++) { | |
// String data_row[] = new String[8]; | |
JsonObject result = array.get(i).getAsJsonObject(); | |
HSSFRow row = worksheet.createRow(i + 1); | |
// HSSFCell cellA = row.createCell(0); | |
// HSSFCell cellB = row.createCell(1); | |
HSSFCell cellC = row.createCell(0); | |
HSSFCell cellD = row.createCell(1); | |
// HSSFCell cellE = row.createCell(4); | |
// HSSFCell cellF = row.createCell(5); | |
HSSFCell cellG = row.createCell(2); | |
HSSFCell cellH = row.createCell(3); | |
// cellStyle.setFillForegroundColor(HSSFColor.GOLD.index); | |
// cellStyle.setFillPattern(HSSFCellStyle.SOLID_FOREGROUND); | |
// cellA.setCellStyle(cellStyle); | |
// cellA.setCellValue(result.get("name").getAsString()); | |
// data_row[0] = result.get("name").getAsString(); | |
// cellB.setCellValue(result.get("formatted_address").getAsString()); | |
// data_row[1]=result.get("formatted_address").getAsString(); | |
cellC.setCellValue(((result.getAsJsonObject("geometry")) | |
.getAsJsonObject("location")).get("lat").getAsString()); | |
// data_row[2]=((result.getAsJsonObject("geometry")).getAsJsonObject("location")) | |
// .get("lat").getAsString(); | |
cellD.setCellValue(((result.getAsJsonObject("geometry")) | |
.getAsJsonObject("location")).get("lng").getAsString()); | |
// data_row[3]=((result.getAsJsonObject("geometry")).getAsJsonObject("location")) | |
// .get("lng").getAsString(); | |
// JsonArray type_obj = result.getAsJsonArray("types"); | |
// String type = ""; | |
// for (int j = 0; j < type_obj.size(); j++) { | |
// type += type_obj.get(j) + (j == type_obj.size() - 1 ? "" : ","); | |
// } | |
// cellE.setCellValue(type); | |
// data_row[4]=type; | |
// cellF.setCellValue(result.get("icon").getAsString()); | |
// data_row[5]=result.get("icon").getAsString(); | |
cellG.setCellValue(result.get("id").getAsString()); | |
// data_row[6]=result.get("id").getAsString(); | |
cellH.setCellValue(result.get("place_id").getAsString()); | |
// data_row[7]=result.get("place_id").getAsString(); | |
// data.add(data_row); | |
} | |
} | |
} |
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
package com.atrin.access.components.search_pane; | |
import java.io.File; | |
import java.io.FileInputStream; | |
import java.io.FileOutputStream; | |
import java.io.IOException; | |
import java.io.InputStream; | |
import java.lang.instrument.IllegalClassFormatException; | |
import org.apache.poi.hssf.usermodel.HSSFWorkbook; | |
import com.vaadin.annotations.AutoGenerated; | |
import com.vaadin.event.ShortcutListener; | |
import com.vaadin.server.FileDownloader; | |
import com.vaadin.server.StreamResource; | |
import com.vaadin.ui.AbsoluteLayout; | |
import com.vaadin.ui.Button; | |
import com.vaadin.ui.Component; | |
import com.vaadin.ui.CustomComponent; | |
import com.vaadin.ui.GridLayout; | |
import com.vaadin.ui.Label; | |
import com.vaadin.ui.Window; | |
import com.vaadin.ui.Button.ClickEvent; | |
public abstract class Search extends CustomComponent { | |
protected HSSFWorkbook workbook; | |
protected CustomComponent components[]; | |
protected String field_names[]; | |
protected GridLayout mainlayout; | |
protected final String types[] = { new String("accounting"), | |
new String("airport"), new String("amusement_park"), | |
new String("aquarium"), new String("art_gallery"), | |
new String("atm"), new String("bakery"), new String("bank"), | |
new String("bar"), new String("beauty_salon"), | |
new String("bicycle_store"), new String("book_store"), | |
new String("bowling_alley"), new String("bus_station"), | |
new String("cafe"), new String("campground"), | |
new String("car_dealer"), new String("car_rental"), | |
new String("car_repair"), new String("car_wash"), | |
new String("casino"), new String("cemetery"), new String("church"), | |
new String("city_hall"), new String("clothing_store"), | |
new String("convenience_store"), new String("courthouse"), | |
new String("dentist"), new String("department_store"), | |
new String("doctor"), new String("electrician"), | |
new String("electronics_store"), new String("embassy"), | |
new String("establishment"), new String("finance"), | |
new String("fire_station"), new String("florist"), | |
new String("food"), new String("funeral_home"), | |
new String("furniture_store"), new String("gas_station"), | |
new String("general_contractor"), | |
new String("grocery_or_supermarket"), new String("gym"), | |
new String("hair_care"), new String("hardware_store"), | |
new String("health"), new String("hindu_templehome_goods_store"), | |
new String("hospital"), new String("insurance_agency"), | |
new String("jewelry_store"), new String("laundry"), | |
new String("lawyer"), new String("library"), | |
new String("liquor_store"), new String("local_government_office"), | |
new String("locksmith"), new String("lodging"), | |
new String("meal_delivery"), new String("meal_takeaway"), | |
new String("mosque"), new String("movie_rental"), | |
new String("movie_theater"), new String("moving_company"), | |
new String("museum"), new String("night_club"), | |
new String("painter"), new String("park"), new String("parking"), | |
new String("pet_store"), new String("pharmacy"), | |
new String("physiotherapist"), new String("place_of_worship"), | |
new String("plumber"), new String("police"), | |
new String("post_office"), new String("real_estate_agency"), | |
new String("restaurant"), new String("roofing_contractor"), | |
new String("rv_park"), new String("school"), | |
new String("shoe_store"), new String("shopping_mall"), | |
new String("spa"), new String("stadium"), new String("storage"), | |
new String("store"), new String("subway_station"), | |
new String("synagogue"), new String("taxi_stand"), | |
new String("train_station"), new String("travel_agency"), | |
new String("university"), new String("veterinary_care"), | |
new String("zoo") }; | |
private final String downfilename = "result.xls"; | |
// private ArrayList<String[]> data = new ArrayList<String[]>(); | |
private StreamResource createResource() { | |
return new StreamResource(new StreamResource.StreamSource() { | |
@Override | |
public InputStream getStream() { | |
try { | |
File file = File.createTempFile("result", ".xls"); | |
FileOutputStream fos = new FileOutputStream(file); | |
workbook.write(fos); | |
return new FileInputStream(file); | |
} catch (IOException e) { | |
e.printStackTrace(); | |
return null; | |
} | |
} | |
}, downfilename); | |
} | |
public Search(GridLayout layout,HSSFWorkbook workbook) { | |
// buildMainLayout(); | |
this.mainlayout = layout; | |
this.workbook = workbook; | |
} | |
public abstract void doSearch(); | |
// @AutoGenerated | |
// protected abstract void buildMainLayout(); | |
@AutoGenerated | |
protected void buildMainLayout() { | |
// the main layout and components will be created here | |
// mainlayout = new GridLayout(2, field_names.length); | |
mainlayout.removeAllComponents(); | |
mainlayout.setSpacing(true); | |
mainlayout.setColumns(3); | |
mainlayout.setRows(field_names.length+2); | |
int count = 0; | |
for (CustomComponent component : components) { | |
if (component.getClass().equals(CustomTextField.class)) | |
mainlayout.addComponent(new Label(((CustomTextField)component).getName()), 0, count); | |
else if (component.getClass().equals(CustomTwinColSelect.class)) | |
mainlayout.addComponent(new Label(((CustomTwinColSelect)component).getName()), 0, count); | |
else | |
try { | |
throw new IllegalClassFormatException("Custom Component not Definded"); | |
} catch (IllegalClassFormatException e) { | |
// TODO Auto-generated catch block | |
e.printStackTrace(); | |
} | |
mainlayout.addComponent(component, 1, count); | |
count++; | |
} | |
Button dosearch = new Button("Search",new Button.ClickListener() { | |
@Override | |
public void buttonClick(ClickEvent event) { | |
// TODO Auto-generated method stub | |
doSearch(); | |
} | |
}); | |
mainlayout.addComponent(dosearch,2,count); | |
count++; | |
Button cleardata = new Button("Clear Data",new Button.ClickListener() { | |
@Override | |
public void buttonClick(ClickEvent event) { | |
// TODO Auto-generated method stub | |
workbook = new HSSFWorkbook(); | |
} | |
}); | |
mainlayout.addComponent(cleardata,1,count); | |
Button download = new Button("Download",new Button.ClickListener() { | |
@Override | |
public void buttonClick(ClickEvent event) { | |
// TODO Auto-generated method stub | |
} | |
}); | |
mainlayout.addComponent(download,2,count); | |
StreamResource resource = createResource(); | |
FileDownloader fileDownloader = new FileDownloader(resource); | |
fileDownloader.extend(download); | |
mainlayout.addShortcutListener(new ShortcutListener("\n") { | |
@Override | |
public void handleAction(Object sender, Object target) { | |
// TODO Auto-generated method stub | |
doSearch(); | |
} | |
}); | |
mainlayout.setImmediate(true); | |
mainlayout.setParent(null); | |
setCompositionRoot(mainlayout); | |
} | |
} |
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
package com.atrin.access.components.search_pane; | |
import java.io.BufferedReader; | |
import java.io.InputStreamReader; | |
import java.lang.instrument.IllegalClassFormatException; | |
import java.net.URL; | |
import javax.net.ssl.HttpsURLConnection; | |
import org.apache.poi.hssf.usermodel.HSSFCell; | |
import org.apache.poi.hssf.usermodel.HSSFCellStyle; | |
import org.apache.poi.hssf.usermodel.HSSFRow; | |
import org.apache.poi.hssf.usermodel.HSSFSheet; | |
import org.apache.poi.hssf.usermodel.HSSFWorkbook; | |
import org.apache.poi.hssf.util.HSSFColor; | |
import com.google.gson.JsonArray; | |
import com.google.gson.JsonObject; | |
import com.google.gson.JsonParser; | |
import com.vaadin.ui.CustomComponent; | |
import com.vaadin.ui.GridLayout; | |
import com.vaadin.ui.Label; | |
import com.vaadin.ui.Notification; | |
import com.vaadin.ui.Notification.Type; | |
public class TextSearch extends Search { | |
private String res_str; | |
private final String header[] = { "Name", "Address", "Latitude", | |
"Longitude", "Type", "Icon", "ID", "Place ID" }; | |
// private String not_null; | |
public TextSearch(GridLayout layout,HSSFWorkbook workbook) { | |
// field_names = new CustomComponent[4]; | |
super(layout,workbook); | |
field_names = new String[] { "query", "location", "radius", "type" }; | |
super.components = new CustomComponent[] { | |
new CustomTextField("Enter a Query (Required)", this), | |
new CustomTextField("Enter a Location(Formate = \"lat,lng\")", | |
this), | |
new CustomTextField("Enter a Radius", this), | |
new CustomTwinColSelect("Select Type For Place", super.types, | |
this) }; | |
super.buildMainLayout(); | |
} | |
@Override | |
public void doSearch() { | |
String url_str = "https://maps.googleapis.com/maps/api/place/textsearch/json?"; | |
int count = 0; | |
if ((((CustomTextField) components[1]).getValue() != null && ((CustomTextField) components[2]).getValue() == null) || | |
(((CustomTextField) components[1]).getValue() != null && ((CustomTextField) components[2]).getValue() == null)){ | |
Notification.show("You Should Enter Both or none of Location and Radius",Type.ERROR_MESSAGE); | |
return; | |
} | |
for (String param : field_names) { | |
if (components[count].getClass().equals(CustomTextField.class)) | |
if (((CustomTextField) components[count]).getValue() != null) | |
if(count == 1 || count == 2 || count ==3) | |
url_str += "" + param + "="+ ((CustomTextField) components[count]).getValue().replace(" ", "") + "&"; | |
else | |
url_str += "" + param + "="+ ((CustomTextField) components[count]).getValue().replace(" ", "+") + "&"; | |
else if (count == 0) | |
Notification.show("Null Pointer Error", | |
"You Should Enter Both Location and Radius", | |
Type.ERROR_MESSAGE); | |
else if (components[count].getClass().equals( | |
CustomTwinColSelect.class)) | |
if (((CustomTwinColSelect) components[count]).getValue() != null) | |
url_str += "" | |
+ param | |
+ "=" | |
+ ((CustomTwinColSelect) components[count]) | |
.getValue(); | |
else if (count == 0) | |
Notification.show("Null Pointer Error", | |
"You Should Enter Both Location and Radius", | |
Type.ERROR_MESSAGE); | |
else | |
try { | |
throw new IllegalClassFormatException( | |
"Custom Component not Definded"); | |
} catch (IllegalClassFormatException e) { | |
// TODO Auto-generated catch block | |
e.printStackTrace(); | |
} | |
// url_str += "&"; | |
count++; | |
} | |
url_str += "key=AIzaSyDn3kHEzUQAMecnIQSc8_0AvrwTCwn4UjU"; | |
System.out.println(url_str); | |
URL url; | |
try { | |
url = new URL(url_str); | |
HttpsURLConnection con = (HttpsURLConnection) url.openConnection(); | |
con.setRequestMethod("GET"); | |
BufferedReader in = new BufferedReader(new InputStreamReader( | |
con.getInputStream())); | |
String inputLine; | |
StringBuffer response = new StringBuffer(); | |
while ((inputLine = in.readLine()) != null) { | |
response.append(inputLine); | |
} | |
in.close(); | |
// print result | |
System.out.println(response.toString()); | |
res_str = response.toString(); | |
} catch (Exception e) { | |
e.printStackTrace(); | |
} | |
if (res_str == null) { | |
return; | |
} | |
// if (new String(keyword | |
// .getValue().getBytes()) == null && new String(name | |
// .getValue().getBytes()) == null){ | |
// final Window window = new Window("Window"); | |
// final FormLayout content = new FormLayout(); | |
// window.setContent(content); | |
// content.addComponent(new | |
// Label("you must enter one of name or keyword at least")); | |
// return; | |
// } else if (new String(name | |
// .getValue().getBytes()) != null){ | |
// not_null = new String(name | |
// .getValue().getBytes()); | |
// } else { | |
// new String(keyword | |
// .getValue().getBytes()); | |
// } | |
JsonObject json = new JsonParser().parse(res_str).getAsJsonObject(); | |
JsonArray array = json.getAsJsonArray("results"); | |
// HSSFSheet worksheet = workbook.createSheet(not_null); | |
HSSFSheet worksheet = workbook.createSheet(new String( | |
((CustomTextField) components[0]).getValue().getBytes())); | |
HSSFCellStyle cellStyle = workbook.createCellStyle(); | |
// data.add(header); | |
HSSFRow row1 = worksheet.createRow(0); | |
// String data_head[] = new String [8]; | |
int c = 0; | |
for (String cellName : header) { | |
// data_head[c] = cellName; | |
HSSFCell cell = row1.createCell(c); | |
cell.setCellValue(cellName); | |
cellStyle = workbook.createCellStyle(); | |
cellStyle | |
.setFillForegroundColor(HSSFColor.LIGHT_CORNFLOWER_BLUE.index); | |
cellStyle.setFillPattern(HSSFCellStyle.SOLID_FOREGROUND); | |
cell.setCellStyle(cellStyle); | |
c++; | |
} | |
// data.add(data_head); | |
for (int i = 0; i < array.size(); i++) { | |
// String data_row[] = new String[8]; | |
JsonObject result = array.get(i).getAsJsonObject(); | |
HSSFRow row = worksheet.createRow(i + 1); | |
HSSFCell cellA = row.createCell(0); | |
HSSFCell cellB = row.createCell(1); | |
HSSFCell cellC = row.createCell(2); | |
HSSFCell cellD = row.createCell(3); | |
HSSFCell cellE = row.createCell(4); | |
HSSFCell cellF = row.createCell(5); | |
HSSFCell cellG = row.createCell(6); | |
HSSFCell cellH = row.createCell(7); | |
cellStyle.setFillForegroundColor(HSSFColor.GOLD.index); | |
cellStyle.setFillPattern(HSSFCellStyle.SOLID_FOREGROUND); | |
cellA.setCellStyle(cellStyle); | |
cellA.setCellValue(result.get("name").getAsString()); | |
// data_row[0] = result.get("name").getAsString(); | |
cellB.setCellValue(result.get("formatted_address").getAsString()); | |
// data_row[1]=result.get("formatted_address").getAsString(); | |
cellC.setCellValue(((result.getAsJsonObject("geometry")) | |
.getAsJsonObject("location")).get("lat").getAsString()); | |
// data_row[2]=((result.getAsJsonObject("geometry")).getAsJsonObject("location")) | |
// .get("lat").getAsString(); | |
cellD.setCellValue(((result.getAsJsonObject("geometry")) | |
.getAsJsonObject("location")).get("lng").getAsString()); | |
// data_row[3]=((result.getAsJsonObject("geometry")).getAsJsonObject("location")) | |
// .get("lng").getAsString(); | |
JsonArray type_obj = result.getAsJsonArray("types"); | |
String type = ""; | |
for (int j = 0; j < type_obj.size(); j++) { | |
type += type_obj.get(j) + (j == type_obj.size() - 1 ? "" : ","); | |
} | |
cellE.setCellValue(type); | |
// data_row[4]=type; | |
cellF.setCellValue(result.get("icon").getAsString()); | |
// data_row[5]=result.get("icon").getAsString(); | |
cellG.setCellValue(result.get("id").getAsString()); | |
// data_row[6]=result.get("id").getAsString(); | |
cellH.setCellValue(result.get("place_id").getAsString()); | |
// data_row[7]=result.get("place_id").getAsString(); | |
// data.add(data_row); | |
} | |
} | |
} |
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
package com.atrin.access; | |
import javax.servlet.annotation.WebServlet; | |
import org.apache.poi.hssf.usermodel.HSSFWorkbook; | |
import com.atrin.access.components.search_pane.CustomTextField; | |
import com.atrin.access.components.search_pane.CustomTwinColSelect; | |
import com.atrin.access.components.search_pane.Search; | |
import com.atrin.access.components.search_pane.TextSearch; | |
//import com.sun.jna.platform.win32.WinUser.FLASHWINFO; | |
import com.vaadin.annotations.Theme; | |
import com.vaadin.annotations.VaadinServletConfiguration; | |
import com.vaadin.data.Property; | |
import com.vaadin.data.Property.ValueChangeEvent; | |
import com.vaadin.server.VaadinRequest; | |
import com.vaadin.server.VaadinServlet; | |
import com.vaadin.ui.AbsoluteLayout; | |
import com.vaadin.ui.Button; | |
import com.vaadin.ui.Button.ClickEvent; | |
import com.vaadin.ui.CustomComponent; | |
import com.vaadin.ui.GridLayout; | |
import com.vaadin.ui.HorizontalLayout; | |
import com.vaadin.ui.Label; | |
import com.vaadin.ui.Notification; | |
import com.vaadin.ui.OptionGroup; | |
import com.vaadin.ui.TabSheet; | |
import com.vaadin.ui.UI; | |
import com.vaadin.ui.VerticalLayout; | |
import com.vaadin.ui.Window; | |
@SuppressWarnings("serial") | |
@Theme("googlemapssearchvaadin") | |
public class GooglemapssearchvaadinUI extends UI { | |
private OptionGroup searchType; | |
private HorizontalLayout searchtypelayout; | |
private Search search; | |
private AbsoluteLayout mainlayout; | |
private GridLayout searchlayout; | |
private TabSheet resultpane; | |
private HSSFWorkbook workbook = new HSSFWorkbook(); | |
private final String nearby = "NearBy Search", text = "Text Search", | |
radar = "Radar Search"; | |
@WebServlet(value = "/*", asyncSupported = true) | |
@VaadinServletConfiguration(productionMode = false, ui = GooglemapssearchvaadinUI.class) | |
public static class Servlet extends VaadinServlet { | |
} | |
@Override | |
protected void init(VaadinRequest request) { | |
mainlayout = new AbsoluteLayout(); | |
mainlayout.setImmediate(false); | |
mainlayout.setWidth("100%"); | |
mainlayout.setHeight("100%"); | |
setContent(mainlayout); | |
setWidth("100.0%"); | |
setHeight("100.0%"); | |
searchtypelayout = new HorizontalLayout(); | |
searchType = new OptionGroup(); | |
searchType.setImmediate(false); | |
searchType.setWidth("-1px"); | |
searchType.setHeight("-1px"); | |
searchType.addItems(nearby, text, radar); | |
searchType.select(text); | |
searchtypelayout.setSpacing(true); | |
searchtypelayout.addComponent(new Label("Choose a Search Type : ")); | |
searchtypelayout.addComponent(searchType); | |
searchlayout = new GridLayout(); | |
mainlayout.addComponent(searchtypelayout, "top:20.0px;left:20.0px;"); | |
// search = new Search() { | |
// | |
// @Override | |
// public void doSearch() { | |
// | |
// | |
// } | |
// }; | |
search = new TextSearch( | |
searchlayout, workbook); | |
searchType.addValueChangeListener(new Property.ValueChangeListener() { | |
@Override | |
public void valueChange(final ValueChangeEvent event) { | |
// TODO Auto-generated method stub | |
Notification.show("Search Type", | |
String.valueOf(event.getProperty().getValue()), | |
Notification.TYPE_TRAY_NOTIFICATION); | |
String value = String.valueOf(event.getProperty().getValue()); | |
System.out.println(value); | |
if (value == nearby) { | |
search = new com.atrin.access.components.search_pane.NearBySearch( | |
searchlayout, workbook); | |
// search = new NearBySearch(); | |
} else if (value == text) { | |
System.out.println("Line 102 : no problem"); | |
search = new TextSearch( | |
searchlayout, workbook); | |
} else if (value == radar) { | |
search = new com.atrin.access.components.search_pane.RadarSearch( | |
searchlayout, workbook); | |
// search = new RadarSearch(); | |
} else { | |
throw new IllegalArgumentException( | |
"Unkown Error : Value does not Exist"); | |
} | |
searchlayout.setImmediate(true); | |
search.setImmediate(true); | |
// searchlayout.addComponent(search); | |
mainlayout.addComponent(search, "top:100.0px;left:20.0px;"); | |
} | |
}); | |
searchlayout.setImmediate(true); | |
search.setImmediate(true); | |
searchType.setImmediate(true); | |
mainlayout.setImmediate(true); | |
this.setImmediate(true); | |
// searchlayout.addComponent(search); | |
mainlayout.addComponent(search, "top:100.0px;left:20.0px;"); | |
} | |
} |
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
package com.example.googlemapssearchvaadin; | |
import com.vaadin.annotations.AutoGenerated; | |
import com.vaadin.ui.AbsoluteLayout; | |
import com.vaadin.ui.ComboBox; | |
import com.vaadin.ui.CustomComponent; | |
import com.vaadin.ui.HorizontalLayout; | |
import com.vaadin.ui.ListSelect; | |
import com.vaadin.ui.OptionGroup; | |
public class test extends CustomComponent { | |
/*- VaadinEditorProperties={"grid":"RegularGrid,20","showGrid":true,"snapToGrid":true,"snapToObject":true,"movingGuides":false,"snappingDistance":10} */ | |
@AutoGenerated | |
private AbsoluteLayout mainLayout; | |
@AutoGenerated | |
private HorizontalLayout horizontalLayout_1; | |
@AutoGenerated | |
private ListSelect listSelect_1; | |
@AutoGenerated | |
private ComboBox comboBox_1; | |
@AutoGenerated | |
private OptionGroup optionGroup_1; | |
/** | |
* The constructor should first build the main layout, set the | |
* composition root and then do any custom initialization. | |
* | |
* The constructor will not be automatically regenerated by the | |
* visual editor. | |
*/ | |
public test() { | |
buildMainLayout(); | |
setCompositionRoot(mainLayout); | |
// TODO add user code here | |
} | |
@AutoGenerated | |
private AbsoluteLayout buildMainLayout() { | |
// common part: create layout | |
mainLayout = new AbsoluteLayout(); | |
mainLayout.setImmediate(false); | |
mainLayout.setWidth("100%"); | |
mainLayout.setHeight("100%"); | |
// top-level component properties | |
setWidth("100.0%"); | |
setHeight("100.0%"); | |
// optionGroup_1 | |
optionGroup_1 = new OptionGroup(); | |
optionGroup_1.setImmediate(false); | |
optionGroup_1.setWidth("-1px"); | |
optionGroup_1.setHeight("-1px"); | |
mainLayout.addComponent(optionGroup_1, "top:100.0px;left:20.0px;"); | |
// horizontalLayout_1 | |
horizontalLayout_1 = buildHorizontalLayout_1(); | |
mainLayout | |
.addComponent(horizontalLayout_1, "top:120.0px;left:560.0px;"); | |
return mainLayout; | |
} | |
@AutoGenerated | |
private HorizontalLayout buildHorizontalLayout_1() { | |
// common part: create layout | |
horizontalLayout_1 = new HorizontalLayout(); | |
horizontalLayout_1.setImmediate(false); | |
horizontalLayout_1.setWidth("-1px"); | |
horizontalLayout_1.setHeight("-1px"); | |
horizontalLayout_1.setMargin(false); | |
horizontalLayout_1.setSpacing(true); | |
// comboBox_1 | |
comboBox_1 = new ComboBox(); | |
comboBox_1.setImmediate(false); | |
comboBox_1.setWidth("280px"); | |
comboBox_1.setHeight("-1px"); | |
horizontalLayout_1.addComponent(comboBox_1); | |
// listSelect_1 | |
listSelect_1 = new ListSelect(); | |
listSelect_1.setImmediate(false); | |
listSelect_1.setWidth("-1px"); | |
listSelect_1.setHeight("-1px"); | |
horizontalLayout_1.addComponent(listSelect_1); | |
return horizontalLayout_1; | |
} | |
} |
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
Manifest-Version: 1.0 | |
Class-Path: | |
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
/* This file is automatically managed and will be overwritten from time to time. */ | |
/* Do not manually edit this file. */ | |
/* Import and include this mixin into your project theme to include the addon themes */ | |
@mixin addons { | |
} | |
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
// Global variable overrides. Must be declared before importing Valo. | |
// Defines the plaintext font size, weight and family. Font size affects general component sizing. | |
//$v-font-size: 16px; | |
//$v-font-weight: 300; | |
//$v-font-family: "Open Sans", sans-serif; | |
// Defines the border used by all components. | |
//$v-border: 1px solid (v-shade 0.7); | |
//$v-border-radius: 4px; | |
// Affects the color of some component elements, e.g Button, Panel title, etc | |
//$v-background-color: hsl(210, 0%, 98%); | |
// Affects the color of content areas, e.g Panel and Window content, TextField input etc | |
//$v-app-background-color: $v-background-color; | |
// Affects the visual appearance of all components | |
//$v-gradient: v-linear 8%; | |
//$v-bevel-depth: 30%; | |
//$v-shadow-opacity: 5%; | |
// Defines colors for indicating status (focus, success, failure) | |
//$v-focus-color: valo-focus-color(); // Calculates a suitable color automatically | |
//$v-friendly-color: #2c9720; | |
//$v-error-indicator-color: #ed473b; | |
// For more information, see: https://vaadin.com/book/-/page/themes.valo.html | |
// Example variants can be copy/pasted from https://vaadin.com/wiki/-/wiki/Main/Valo+Examples | |
@import "../valo/valo.scss"; | |
@mixin googlemapssearchvaadin { | |
@include valo; | |
// Insert your own theme rules here | |
} |
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
html { | |
margin: 0; | |
padding: 0; | |
text-align: center; | |
} | |
body { | |
background-color: #fff; | |
font: normal 14px/20px Helvetica, "Lucida Grande", Arial, Verdana, sans-serif; | |
color: #464440; | |
padding: 0; | |
min-width: 980px; | |
text-align: left; | |
margin: 0 auto; | |
} | |
.clearer { | |
height: 0; | |
overflow: hidden; | |
clear: both; | |
} | |
h1,h2,h3,h4,h5,h6 { | |
color: #000; | |
font-weight: normal; | |
line-height: normal; | |
} | |
h1 { | |
font-size: 48px; | |
font-weight: bold; | |
} | |
h2 { | |
font-size: 36px; | |
font-weight: bold; | |
} | |
h3 { | |
font-size: 30px; | |
font-weight: bold; | |
margin-bottom: 23px; | |
} | |
h4 { | |
font-size: 18px; | |
margin-bottom: .8em; | |
} | |
h5 { | |
font-size: 16px; | |
margin-bottom: .5em; | |
} | |
h6 { | |
font-size: 14px; | |
margin: .6em 0 .1em; | |
} | |
p { | |
margin: 0 0 1em; | |
} | |
a { | |
text-decoration: none; | |
padding: 0 3px; | |
margin: 0 -3px; | |
-moz-border-radius: 2px; | |
-webkit-border-radius: 2px; | |
border-radius: 2px; | |
} | |
a:link { | |
color: #00a2d8; | |
} | |
a:visited { | |
color: #00a248; | |
} | |
a:hover { | |
background: #e4e3da; | |
color: #505048; | |
} | |
a:active { | |
color: #000; | |
background: #a09f91; | |
} | |
ul { | |
list-style-type: square; | |
} | |
.codeblock { | |
background: #f0efea; | |
padding: 1em; | |
margin: 1em 0; | |
-webkit-border-radius: 8px; | |
-moz-border-radius: 8px; | |
} | |
.codeblock h4 { | |
margin-top: 0; | |
} | |
/*************************************************** | |
* Furniture | |
***************************************************/ | |
#header { | |
height: 93px; | |
position: relative; | |
} | |
#header h1 { | |
width: 393px; | |
height: 46px; | |
background: transparent url(../img/vaadin-logo.png) no-repeat; | |
position: absolute; | |
top: 23px; | |
left: 50%; | |
margin: 0; | |
margin-left: -484px; | |
text-indent: -9999px; | |
} | |
#version { | |
position: absolute; | |
left: 50%; | |
top: 38px; | |
color: #000; | |
text-align: right; | |
width: 484px; | |
} | |
#version a { | |
color: #78776d; | |
display: inline-block; | |
zoom: 1; | |
padding: 1px 12px; | |
font-size: 12px; | |
background: #e4e3da; | |
-moz-border-radius: 9px; | |
-webkit-border-radius: 9px; | |
border-radius: 9px; | |
} | |
#version a:hover { | |
border: none; | |
background: #a09f91; | |
color: #fff; | |
} | |
#version .release-notes { | |
margin-left: 10px; | |
} | |
#subheader { | |
position: relative; | |
height: 38px; | |
line-height: 38px; | |
background: #000; | |
} | |
#menu, | |
#links { | |
list-style: none; | |
padding: 0; | |
margin: 0; | |
} | |
#subheader li { | |
display: inline; | |
float: left; | |
padding: 0; | |
} | |
#menu { | |
position: absolute; | |
left: 50%; | |
width: 650px; | |
margin-left: -483px; | |
font-weight: bold; | |
white-space: nowrap; | |
z-index: 2; | |
} | |
#menu li { | |
margin: 0 .3em; | |
} | |
#menu li, | |
#menu a { | |
color: #d9d8cb; | |
} | |
#links { | |
width: 484px; | |
position: absolute; | |
top: 2px; | |
left: 50%; | |
z-index: 1; | |
} | |
#links li { | |
float: right; | |
} | |
#links a { | |
font-size: 12px; | |
line-height: 34px; | |
color: #a09f91; | |
margin-left: 14px; | |
white-space: nowrap; | |
} | |
#subheader a:hover { | |
background: transparent; | |
color: #fff; | |
} | |
ul { | |
padding-left: 1.3em; | |
} | |
#footer { | |
margin: 0 auto; | |
width: 968px; | |
height: 60px; | |
color: #000; | |
font-size: 11px; | |
} | |
#footer a { | |
float: right; | |
} | |
#footer strong { | |
font-size: 13px; | |
} | |
#footer strong em { | |
color: #00b4f0; | |
font-style: normal; | |
margin: 0 0.2em 0 -0.15em; | |
} | |
/*************************************************** | |
* Content wrapper | |
***************************************************/ | |
#content { | |
position: relative; | |
margin: 0 0 56px -484px; | |
left: 50%; | |
width: 968px; | |
overflow: hidden; | |
} | |
/*************************************************** | |
* Vertical tabs | |
***************************************************/ | |
#tabs { | |
float: left; | |
width: 196px; | |
} | |
#tabs .tab { | |
font-size: 18px; | |
cursor: pointer; | |
padding: 8px 14px; | |
background: #fff; | |
color: #a09f91; | |
-webkit-transition: linear .2s color; | |
} | |
#tabs .tab * { | |
vertical-align: middle; | |
} | |
#tabs .tab a { | |
margin: 0; | |
padding: 0; | |
color: #00a2d8; | |
-webkit-transition: linear .2s color; | |
} | |
#tabs .tab:hover a, | |
#tabs .tab a:focus { | |
background: transparent; | |
margin: 0; | |
padding: 0; | |
color: #464440; | |
} | |
#tabs .tab:hover { | |
color: #464440; | |
} | |
#tabs .tab span { | |
font-size: 9px; | |
margin-left: .7em; | |
} | |
#tabs .selected, | |
#tabs .selected:hover, | |
#tabs .selected:hover a, | |
#tabs .selected a, | |
#tabs .selected a:hover, | |
#tabs .selected a:focus { | |
color: #000; | |
cursor: default; | |
-webkit-transition: linear .2s color; | |
font-weight: bold; | |
} | |
#tabs .first { | |
margin-top: 0; | |
} | |
h3.reasons { | |
color: #78776d; | |
margin: 0 0 40px; | |
height: 30px; | |
} | |
#reasons { | |
list-style: none; | |
margin: 0; | |
padding: 0; | |
} | |
#reasons.js { | |
float: left; | |
width: 769px; | |
} | |
#reasons .tab { | |
display: block; | |
margin: 0 0 1em; | |
padding: 20px 40px; | |
background: #efeee9; | |
-webkit-border-radius: 9px; | |
-moz-border-radius: 9px; | |
border-radius: 9px; | |
clear: left; | |
overflow: hidden; | |
} | |
#reasons.js .tab { | |
width: 689px; | |
} | |
#reasons .tab h4 { | |
font-weight: bold; | |
font-size: 24px; | |
margin: 14px 0 24px; | |
} | |
#reasons .tab .col { | |
width: 22.8%; | |
margin-right: 2%; | |
float: left; | |
margin-bottom: 2em; | |
} | |
#reasons .tab .col2 { | |
width: 47.8%; | |
margin-right: 2%; | |
float: left; | |
margin-bottom: 2em; | |
} | |
#reasons .tab .col3 { | |
width: 72.8%; | |
margin-right: 2%; | |
float: left; | |
margin-bottom: 2em; | |
} | |
#reasons .tab .col4 { | |
clear: left; | |
margin-bottom: 2em; | |
} | |
#reasons .tab .newline { | |
clear: left; | |
} | |
#reasons .tab p:last-child { | |
margin: 0; | |
} | |
#reasons .tab h5 { | |
margin-top: 0; | |
} | |
/*************************************************** | |
* Section specific styles | |
***************************************************/ | |
img { | |
border: none; | |
} | |
.book { | |
overflow: hidden; | |
} | |
.book h5 { | |
font-weight: bold; | |
font-size: 18px; | |
} | |
.book h6 { | |
margin: -0.7em 0 .7em; | |
color: #464440; | |
font-size: 13px; | |
font-style: italic; | |
color: #736f5e; | |
} | |
.book img { | |
float: left; | |
margin-right: 1.2em; | |
} | |
.dzone img, | |
.tutorial img { | |
float: left; | |
margin: 0 1em 2em 0; | |
} | |
.tools img { | |
margin: 0em 2em .8em 2em; | |
float: right; | |
} | |
span.fv { | |
padding: 2px 10px; | |
margin-right: 5px; | |
color: rgb(71,174,67); | |
font-weight: bold; | |
} | |
td.fv { | |
background-color: rgb(206,247,205); | |
text-align: center; | |
border-radius: 3px; | |
font-size: 12px; | |
line-height: 1; | |
font-weight: bold; | |
} | |
td.bfp { | |
text-align: center; | |
color: rgb(37,114,146); | |
border-radius: 3px; | |
padding: 2px 10px; | |
margin-right: 5px; | |
background-color: rgb(216,245,255); | |
font-size: 12px; | |
line-height: 1; | |
font-weight: bold; | |
} | |
.ticket { | |
text-align: right; | |
padding-left: 5px; | |
} | |
.pad { | |
padding-left: 5px; | |
} |
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
@import "addons.scss"; | |
@import "googlemapssearchvaadin.scss"; | |
/* This file prefixes all rules with the theme name to avoid causing conflicts with other themes. */ | |
/* The actual styles should be defined in googlemapssearchvaadin.scss */ | |
.googlemapssearchvaadin { | |
@include addons; | |
@include googlemapssearchvaadin; | |
} |
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
PK | |