client
Clone or download
Modified Files
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<modelVersion>4.0.0</modelVersion>
<groupId>com.stream-pi</groupId>
<groupId>com.stream-pi</groupId>
<artifactId>client</artifactId>
<artifactId>client</artifactId>
<version>1.0.0-SNAPSHOT</version>
<version>1.0.0-SNAPSHOT</version>
<url>https://stream-pi.com/</url>
<url>https://stream-pi.com/</url>
<properties>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.release>11</maven.compiler.release>
<maven.compiler.release>11</maven.compiler.release>
<javafx.version>17-ea+8</javafx.version>
<javafx.version>17-ea+8</javafx.version>
<javafx.scope>compile</javafx.scope>
<javafx.scope>compile</javafx.scope>
<javafx.systemPath>/opt/javafx-17-sdk/lib</javafx.systemPath>
<javafx.systemPath>/opt/javafx-17-sdk/lib</javafx.systemPath>
<javafx.drm.egl.lib.path>/home/rnayabed/openjfx/javafx-sdk-17/lib/libgluon_drm-1.1.3.so</javafx.drm.egl.lib.path>
<javafx.drm.egl.lib.path>/home/rnayabed/openjfx/javafx-sdk-17/lib/libgluon_drm-1.1.3.so</javafx.drm.egl.lib.path>
<javafx.drm.display.card>/dev/dri/card0</javafx.drm.display.card>
<javafx.drm.display.card>/dev/dri/card0</javafx.drm.display.card>
<client.plugin.version>0.1.40-SNAPSHOT</client.plugin.version>
<client.plugin.version>0.1.40-SNAPSHOT</client.plugin.version>
<ikonli.version>11.5.0</ikonli.version>
<ikonli.version>11.5.0</ikonli.version>
<action.api.version>1.0.0-SNAPSHOT</action.api.version>
<action.api.version>1.0.0-SNAPSHOT</action.api.version>
<util.version>1.0.0-SNAPSHOT</util.version>
<util.version>1.0.0-SNAPSHOT</util.version>
<theme.api.version>1.0.0-SNAPSHOT</theme.api.version>
<theme.api.version>1.0.0-SNAPSHOT</theme.api.version>
<attach.version>4.0.11</attach.version>
<attach.version>4.0.11</attach.version>
<main.class.name>com.stream_pi.client.Main</main.class.name>
<main.class.name>com.stream_pi.client.Main</main.class.name>
<source.plugin.version>2.2.1</source.plugin.version>
<source.plugin.version>2.2.1</source.plugin.version>
<javadoc.plugin.version>3.1.0</javadoc.plugin.version>
<javadoc.plugin.version>3.1.0</javadoc.plugin.version>
<gpg.plugin.version>1.6</gpg.plugin.version>
<gpg.plugin.version>1.6</gpg.plugin.version>
</properties>
</properties>
<dependencies>
<dependencies>
<dependency>
<dependency>
<groupId>org.openjfx</groupId>
<groupId>org.openjfx</groupId>
<artifactId>javafx-controls</artifactId>
<artifactId>javafx-controls</artifactId>
<version>${javafx.version}</version>
<version>${javafx.version}</version>
<!--scope>${javafx.scope}</scope>
<!--scope>${javafx.scope}</scope>
<systemPath>${javafx.systemPath}/javafx.controls.jar</systemPath-->
<systemPath>${javafx.systemPath}/javafx.controls.jar</systemPath-->
</dependency>
</dependency>
<dependency>
<dependency>
<groupId>org.openjfx</groupId>
<groupId>org.openjfx</groupId>
<artifactId>javafx-base</artifactId>
<artifactId>javafx-base</artifactId>
<version>${javafx.version}</version>
<version>${javafx.version}</version>
<!--scope>${javafx.scope}</scope>
<!--scope>${javafx.scope}</scope>
<systemPath>${javafx.systemPath}/javafx.base.jar</systemPath-->
<systemPath>${javafx.systemPath}/javafx.base.jar</systemPath-->
</dependency>
</dependency>
<dependency>
<dependency>
<groupId>org.openjfx</groupId>
<groupId>org.openjfx</groupId>
<artifactId>javafx-graphics</artifactId>
<artifactId>javafx-graphics</artifactId>
<version>${javafx.version}</version>
<version>${javafx.version}</version>
<!--scope>${javafx.scope}</scope>
<!--scope>${javafx.scope}</scope>
<systemPath>${javafx.systemPath}/javafx.graphics.jar</systemPath-->
<systemPath>${javafx.systemPath}/javafx.graphics.jar</systemPath-->
</dependency>
</dependency>
<dependency>
<dependency>
<groupId>org.kordamp.ikonli</groupId>
<groupId>org.kordamp.ikonli</groupId>
<artifactId>ikonli-fontawesome5-pack</artifactId>
<artifactId>ikonli-fontawesome5-pack</artifactId>
<version>${ikonli.version}</version>
<version>${ikonli.version}</version>
</dependency>
</dependency>
<dependency>
<dependency>
<groupId>org.kordamp.ikonli</groupId>
<groupId>org.kordamp.ikonli</groupId>
<artifactId>ikonli-javafx</artifactId>
<artifactId>ikonli-javafx</artifactId>
<version>${ikonli.version}</version>
<version>${ikonli.version}</version>
</dependency>
</dependency>
<dependency>
<dependency>
<groupId>com.stream-pi</groupId>
<groupId>com.stream-pi</groupId>
<artifactId>action-api</artifactId>
<artifactId>action-api</artifactId>
<version>${action.api.version}</version>
<version>${action.api.version}</version>
</dependency>
</dependency>
<dependency>
<dependency>
<groupId>com.stream-pi</groupId>
<groupId>com.stream-pi</groupId>
<artifactId>theme-api</artifactId>
<artifactId>theme-api</artifactId>
<version>${theme.api.version}</version>
<version>${theme.api.version}</version>
</dependency>
</dependency>
<dependency>
<dependency>
<groupId>com.stream-pi</groupId>
<groupId>com.stream-pi</groupId>
<artifactId>util</artifactId>
<artifactId>util</artifactId>
<version>${util.version}</version>
<version>${util.version}</version>
</dependency>
</dependency>
<dependency>
<dependency>
<groupId>com.gluonhq.attach</groupId>
<groupId>com.gluonhq.attach</groupId>
<artifactId>lifecycle</artifactId>
<artifactId>lifecycle</artifactId>
<version>${attach.version}</version>
<version>${attach.version}</version>
</dependency>
</dependency>
<dependency>
<dependency>
<groupId>com.gluonhq.attach</groupId>
<groupId>com.gluonhq.attach</groupId>
<artifactId>util</artifactId>
<artifactId>util</artifactId>
<version>${attach.version}</version>
<version>${attach.version}</version>
</dependency>
</dependency>
<dependency>
<dependency>
<groupId>com.gluonhq.attach</groupId>
<groupId>com.gluonhq.attach</groupId>
<artifactId>orientation</artifactId>
<artifactId>orientation</artifactId>
<version>${attach.version}</version>
<version>${attach.version}</version>
</dependency>
</dependency>
<dependency>
<dependency>
<groupId>com.gluonhq.attach</groupId>
<groupId>com.gluonhq.attach</groupId>
<artifactId>storage</artifactId>
<artifactId>storage</artifactId>
<version>${attach.version}</version>
<version>${attach.version}</version>
</dependency>
</dependency>
<dependency>
<dependency>
<groupId>com.gluonhq.attach</groupId>
<groupId>com.gluonhq.attach</groupId>
<artifactId>browser</artifactId>
<artifactId>browser</artifactId>
<version>${attach.version}</version>
<version>${attach.version}</version>
</dependency>
</dependency>
<dependency>
<dependency>
<groupId>com.gluonhq.attach</groupId>
<groupId>com.gluonhq.attach</groupId>
<artifactId>vibration</artifactId>
<artifactId>vibration</artifactId>
<version>${attach.version}</version>
<version>${attach.version}</version>
</dependency>
</dependency>
</dependencies>
</dependencies>
<repositories>
<repositories>
<repository>
<repository>
<id>gluon-releases</id>
<id>gluon-releases</id>
<url>http://nexus.gluonhq.com/nexus/content/repositories/releases/</url>
<url>http://nexus.gluonhq.com/nexus/content/repositories/releases/</url>
</repository>
</repository>
<repository>
<repository>
<id>sonatype-snapshot</id>
<id>sonatype-snapshot</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
</repository>
</repository>
</repositories>
</repositories>
<build>
<build>
<plugins>
<plugins>
<plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<version>3.8.1</version>
</plugin>
</plugin>
<plugin>
<plugin>
<groupId>org.openjfx</groupId>
<groupId>org.openjfx</groupId>
<artifactId>javafx-maven-plugin</artifactId>
<artifactId>javafx-maven-plugin</artifactId>
<version>0.0.5</version>
<version>0.0.5</version>
<configuration>
<configuration>
<commandlineArgs>-DStream-Pi.defaultFullScreenMode=true</commandlineArgs>
<options>
<option>-Dglass.gtk.uiScale=1.0</option>
<option>-Dprism.verbose=true</option>
<option>-Djavafx.verbose=true</option>
<option>-Dprism.forceGPU=true</option>
</options>
<stripDebug>true</stripDebug>
<stripDebug>true</stripDebug>
<compress>2</compress>
<compress>2</compress>
<noHeaderFiles>true</noHeaderFiles>
<noHeaderFiles>true</noHeaderFiles>
<noManPages>true</noManPages>
<noManPages>true</noManPages>
<mainClass>${main.class.name}</mainClass>
<mainClass>${main.class.name}</mainClass>
<!--options>${additional.javafx.plugin.options}</options-->
<!--options>${additional.javafx.plugin.options}</options-->
</configuration>
</configuration>
</plugin>
</plugin>
<plugin>
<plugin>
<groupId>com.gluonhq</groupId>
<groupId>com.gluonhq</groupId>
<artifactId>client-maven-plugin</artifactId>
<artifactId>client-maven-plugin</artifactId>
<version>${client.plugin.version}</version>
<version>${client.plugin.version}</version>
<configuration>
<configuration>
<target>${client.target}</target>
<target>${client.target}</target>
<verbose>true</verbose>
<verbose>true</verbose>
<nativeImageArgs>
<nativeImageArgs>
<list>--initialize-at-build-time=com.sun.org.apache.xml.internal.serializer.ToXMLStream</list>
<list>--initialize-at-build-time=com.sun.org.apache.xml.internal.serializer.ToXMLStream</list>
<list>${additional.native.client.args}</list>
<list>${additional.native.client.args}</list>
</nativeImageArgs>
</nativeImageArgs>
<bundlesList>
<bundlesList>
<list>com.sun.org.apache.xerces.internal.impl.msg.XMLMessages</list>
<list>com.sun.org.apache.xerces.internal.impl.msg.XMLMessages</list>
</bundlesList>
</bundlesList>
<attachList>
<attachList>
<list>lifecycle</list>
<list>lifecycle</list>
<list>storage</list>
<list>storage</list>
<list>browser</list>
<list>browser</list>
<list>vibration</list>
<list>vibration</list>
<list>orientation</list>
<list>orientation</list>
</attachList>
</attachList>
<reflectionList>
<reflectionList>
<list>java.util.logging.FileHandler</list>
<list>java.util.logging.FileHandler</list>
<list>com.stream_pi.client.window.settings.About.Contributor</list>
<list>com.stream_pi.client.window.settings.About.Contributor</list>
<list>javafx.scene.control.TableColumnBase</list>
<list>javafx.scene.control.TableColumnBase</list>
</reflectionList>
</reflectionList>
<mainClass>${main.class.name}</mainClass>
<mainClass>${main.class.name}</mainClass>
</configuration>
</configuration>
</plugin>
</plugin>
<plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<artifactId>maven-resources-plugin</artifactId>
<version>3.2.0</version>
<version>3.2.0</version>
<configuration>
<configuration>
<includeEmptyDirs>true</includeEmptyDirs>
<includeEmptyDirs>true</includeEmptyDirs>
</configuration>
</configuration>
</plugin>
</plugin>
</plugins>
</plugins>
</build>
</build>
<pluginRepositories>
<pluginRepositories>
<pluginRepository>
<pluginRepository>
<id>gluon-releases</id>
<id>gluon-releases</id>
<url>http://nexus.gluonhq.com/nexus/content/repositories/releases/</url>
<url>http://nexus.gluonhq.com/nexus/content/repositories/releases/</url>
</pluginRepository>
</pluginRepository>
<pluginRepository>
<pluginRepository>
<id>gluon-snapshots</id>
<id>gluon-snapshots</id>
<url>https://nexus.gluonhq.com/nexus/content/repositories/public-snapshots</url>
<url>https://nexus.gluonhq.com/nexus/content/repositories/public-snapshots</url>
</pluginRepository>
</pluginRepository>
<pluginRepository>
<pluginRepository>
<id>Sonatype</id>
<id>Sonatype</id>
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
</pluginRepository>
</pluginRepository>
</pluginRepositories>
</pluginRepositories>
<profiles>
<profiles>
<profile>
<profile>
<id>android</id>
<id>android</id>
<properties>
<properties>
<client.target>android</client.target>
<client.target>android</client.target>
<additional.native.client.args>-Dsvm.targetName=android</additional.native.client.args>
<additional.native.client.args>-Dsvm.targetName=android</additional.native.client.args>
</properties>
</properties>
</profile>
</profile>
<profile>
<profile>
<id>ios</id>
<id>ios</id>
<properties>
<properties>
<client.target>ios</client.target>
<client.target>ios</client.target>
<additional.native.client.args>-Dsvm.targetName=iOS</additional.native.client.args>
<additional.native.client.args>-Dsvm.targetName=iOS</additional.native.client.args>
</properties>
</properties>
</profile>
</profile>
<profile>
<profile>
<id>linux-aarch64</id>
<id>linux-aarch64</id>
<properties>
<properties>
<client.target>linux-aarch64</client.target>
<client.target>linux-aarch64</client.target>
<additional.native.client.args>-Dsvm.targetName=Linux</additional.native.client.args>
<additional.native.client.args>-Dsvm.targetName=Linux</additional.native.client.args>
</properties>
</properties>
</profile>
</profile>
<profile>
<profile>
<id>linux-x86_64</id>
<id>linux-x86_64</id>
<properties>
<properties>
<client.target>host</client.target>
<client.target>host</client.target>
<additional.native.client.args>-Dsvm.targetName=Linux</additional.native.client.args>
<additional.native.client.args>-Dsvm.targetName=Linux</additional.native.client.args>
</properties>
</properties>
</profile>
</profile>
<profile>
<profile>
<id>windows-x86_64</id>
<id>windows-x86_64</id>
<properties>
<properties>
<client.target>host</client.target>
<client.target>host</client.target>
<additional.native.client.args>-Dsvm.targetName=Linux</additional.native.client.args>
<additional.native.client.args>-Dsvm.targetName=Linux</additional.native.client.args>
</properties>
</properties>
</profile>
</profile>
<!--profile>
<!--profile>
<id>ARM-DRM</id>
<id>ARM-DRM</id>
<properties>
<properties>
<additional.javafx.plugin.options>
<additional.javafx.plugin.options>
<option>-Dmonocle.platform=EGL</option>
<option>-Dmonocle.platform=EGL</option>
<option>-Dembedded=monocle</option>
<option>-Dembedded=monocle</option>
<option>-Dglass.platform=Monocle</option>
<option>-Dglass.platform=Monocle</option>
<option>-Degl.displayid=${javafx.drm.display.card}</option>
<option>-Degl.displayid=${javafx.drm.display.card}</option>
<option>-Dmonocle.egl.lib=${javafx.drm.egl.lib.path}</option>
<option>-Dmonocle.egl.lib=${javafx.drm.egl.lib.path}</option>
<option>-Dprism.verbose=true</option>
<option>-Dprism.verbose=true</option>
</additional.javafx.plugin.options>
</additional.javafx.plugin.options>
</properties>
</properties>
</profile-->
</profile-->
<profile>
<profile>
<id>release</id>
<id>release</id>
<build>
<build>
<plugins>
<plugins>
<plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<artifactId>maven-source-plugin</artifactId>
<version>2.2.1</version>
<version>2.2.1</version>
<executions>
<executions>
<execution>
<execution>
<id>attach-sources</id>
<id>attach-sources</id>
<goals>
<goals>
<goal>jar-no-fork</goal>
<goal>jar-no-fork</goal>
</goals>
</goals>
</execution>
</execution>
</executions>
</executions>
</plugin>
</plugin>
<plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>${javadoc.plugin.version}</version>
<version>${javadoc.plugin.version}</version>
<executions>
<executions>
<execution>
<execution>
<id>attach-javadocs</id>
<id>attach-javadocs</id>
<goals>
<goals>
<goal>jar</goal>
<goal>jar</goal>
</goals>
</goals>
</execution>
</execution>
</executions>
</executions>
<configuration>
<configuration>
<source>8</source>
<source>8</source>
</configuration>
</configuration>
</plugin>
</plugin>
<plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<artifactId>maven-gpg-plugin</artifactId>
<version>${gpg.plugin.version}</version>
<version>${gpg.plugin.version}</version>
<executions>
<executions>
<execution>
<execution>
<id>sign-artifacts</id>
<id>sign-artifacts</id>
<phase>verify</phase>
<phase>verify</phase>
<goals>
<goals>
<goal>sign</goal>
<goal>sign</goal>
</goals>
</goals>
<configuration>
<configuration>
<gpgArguments>
<gpgArguments>
<arg>--pinentry-mode</arg>
<arg>--pinentry-mode</arg>
<arg>loopback</arg>
<arg>loopback</arg>
</gpgArguments>
</gpgArguments>
</configuration>
</configuration>
</execution>
</execution>
</executions>
</executions>
</plugin>
</plugin>
</plugins>
</plugins>
</build>
</build>
</profile>
</profile>
</profiles>
</profiles>
<organization>
<organization>
<name>Stream Pi</name>
<name>Stream Pi</name>
<url>https://www.stream-pi.com</url>
<url>https://www.stream-pi.com</url>
</organization>
</organization>
<issueManagement>
<issueManagement>
<system>GitHub</system>
<system>GitHub</system>
<url>https://github.com/Stream-Pi/client/issues</url>
<url>https://github.com/Stream-Pi/client/issues</url>
</issueManagement>
</issueManagement>
<licenses>
<licenses>
<license>
<license>
<name>GPL-3.0 License</name>
<name>GPL-3.0 License</name>
<url>https://www.gnu.org/licenses/gpl-3.0.en.html</url>
<url>https://www.gnu.org/licenses/gpl-3.0.en.html</url>
<distribution>repo</distribution>
<distribution>repo</distribution>
</license>
</license>
</licenses>
</licenses>
<developers>
<developers>
<developer>
<developer>
<name>Debayan Sutradhar</name>
<name>Debayan Sutradhar</name>
<email>debayansutradhar3@gmail.com</email>
<email>debayansutradhar3@gmail.com</email>
<organization>Stream-Pi</organization>
<organization>Stream-Pi</organization>
<organizationUrl>https://www.stream-pi.com</organizationUrl>
<organizationUrl>https://www.stream-pi.com</organizationUrl>
</developer>
</developer>
<developer>
<developer>
<name>Abhinay Agarwal</name>
<name>Abhinay Agarwal</name>
<email>abhinay_agarwal@live.com</email>
<email>abhinay_agarwal@live.com</email>
<organization>Stream-Pi</organization>
<organization>Stream-Pi</organization>
<organizationUrl>https://www.stream-pi.com</organizationUrl>
<organizationUrl>https://www.stream-pi.com</organizationUrl>
</developer>
</developer>
</developers>
</developers>
<scm>
<scm>
<url>https://github.com/stream-pi/client</url>
<url>https://github.com/stream-pi/client</url>
<connection>scm:git:git://github.com/stream-pi/client.git</connection>
<connection>scm:git:git://github.com/stream-pi/client.git</connection>
<developerConnection>scm:git:ssh://git@github.com:stream-pi/client.git</developerConnection>
<developerConnection>scm:git:ssh://git@github.com:stream-pi/client.git</developerConnection>
</scm>
</scm>
<distributionManagement>
<distributionManagement>
<snapshotRepository>
<snapshotRepository>
<id>ossrh</id>
<id>ossrh</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
</snapshotRepository>
</snapshotRepository>
<repository>
<repository>
<id>ossrh</id>
<id>ossrh</id>
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>
</repository>
</distributionManagement>
</distributionManagement>
</project>
</project>
package com.stream_pi.client;
package com.stream_pi.client;
import com.stream_pi.client.controller.Controller;
import com.stream_pi.client.controller.Controller;
import com.stream_pi.client.info.ClientInfo;
import com.stream_pi.client.info.ClientInfo;
import javafx.application.Application;
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.Scene;
import javafx.stage.Stage;
import javafx.stage.Stage;
public class Main extends Application {
public class Main extends Application {
@Override
@Override
public void start(Stage stage)
public void start(Stage stage)
{
{
Controller d = new Controller();
Controller d = new Controller();
Scene s = new Scene(d);
Scene s = new Scene(d);
stage.setScene(s);
stage.setScene(s);
d.setHostServices(getHostServices());
d.setHostServices(getHostServices());
d.init();
d.init();
}
}
public static void main(String[] args)
public static void main(String[] args)
{
{
for(String eachArg : args)
for(String eachArg : args)
{
{
if(!eachArg.startsWith("-DStreamPi"))
if(!eachArg.startsWith("-DStream-Pi"))
continue;
continue;
String[] r = eachArg.split("=");
String[] r = eachArg.split("=");
String arg = r[0];
String arg = r[0];
String val = r[1];
String val = r[1];
switch (arg) {
switch (arg) {
case "-DStreamPi.startupRunnerFileName":
case "-DStream-Pi.startupRunnerFileName":
ClientInfo.getInstance().setRunnerFileName(val);
ClientInfo.getInstance().setRunnerFileName(val);
break;
break;
case "-DStreamPi.showShutDownButton":
case "-DStream-Pi.showShutDownButton":
ClientInfo.getInstance().setShowShutDownButton(val.equals("true"));
ClientInfo.getInstance().setShowShutDownButton(val.equals("true"));
break;
break;
case "-DStreamPi.isXMode":
case "-DStream-Pi.isXMode":
ClientInfo.getInstance().setXMode(val.equals("true"));
ClientInfo.getInstance().setXMode(val.equals("true"));
break;
break;
case "-DStreamPi.isShowFullScreenToggleButton":
case "-DStream-Pi.isShowFullScreenToggleButton":
ClientInfo.getInstance().setShowFullScreenToggleButton(val.equals("true"));
ClientInfo.getInstance().setShowFullScreenToggleButton(val.equals("true"));
break;
break;
case "-DStream-Pi.defaultFullScreenMode":
ClientInfo.getInstance().setDefaultFullscreenMode(val.equals("true"));
break;
}
}
}
}
launch(args);
launch(args);
}
}
}
}
/*
/*
ServerInfo.java
ServerInfo.java
Stores basic information about the server - name, platform type
Stores basic information about the server - name, platform type
Contributors: Debayan Sutradhar (@dubbadhar)
Contributors: Debayan Sutradhar (@dubbadhar)
*/
*/
package com.stream_pi.client.info;
package com.stream_pi.client.info;
import com.gluonhq.attach.storage.StorageService;
import com.gluonhq.attach.storage.StorageService;
import com.stream_pi.util.exception.MinorException;
import com.stream_pi.util.exception.MinorException;
import com.stream_pi.util.platform.Platform;
import com.stream_pi.util.platform.Platform;
import com.stream_pi.util.platform.ReleaseStatus;
import com.stream_pi.util.platform.ReleaseStatus;
import com.stream_pi.util.version.Version;
import com.stream_pi.util.version.Version;
import java.io.File;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileNotFoundException;
import java.util.Optional;
import java.util.Optional;
import java.util.function.Function;
import java.util.function.Function;
public class ClientInfo {
public class ClientInfo {
private Version version;
private Version version;
private final ReleaseStatus releaseStatus;
private final ReleaseStatus releaseStatus;
private Platform platform;
private Platform platform;
private String prePath;
private String prePath;
private Version minThemeSupportVersion;
private Version minThemeSupportVersion;
private Version minPluginSupportVersion;
private Version minPluginSupportVersion;
private Version commStandardVersion;
private Version commStandardVersion;
private String runnerFileName;
private String runnerFileName;
private static ClientInfo instance = null;
private static ClientInfo instance = null;
private ClientInfo()
private ClientInfo()
{
{
version = new Version(1,0,0);
version = new Version(1,0,0);
minThemeSupportVersion = new Version(1,0,0);
minThemeSupportVersion = new Version(1,0,0);
minPluginSupportVersion = new Version(1,0,0);
minPluginSupportVersion = new Version(1,0,0);
commStandardVersion = new Version(1,0,0);
commStandardVersion = new Version(1,0,0);
releaseStatus = ReleaseStatus.EA;
releaseStatus = ReleaseStatus.EA;
String osName = System.getProperty("os.name").toLowerCase();
String osName = System.getProperty("os.name").toLowerCase();
prePath = System.getProperty("user.home")+"/Stream-Pi/Client/";
prePath = System.getProperty("user.home")+"/Stream-Pi/Client/";
if(osName.contains("windows"))
if(osName.contains("windows"))
{
{
platform = Platform.WINDOWS;
platform = Platform.WINDOWS;
}
}
else if (osName.contains("linux"))
else if (osName.contains("linux"))
{
{
platform = Platform.LINUX;
platform = Platform.LINUX;
}
}
else if(osName.contains("android")) // SPECIFY -Dsvm.targetName=android WHILE BUILDING ANDROID NATIVE IMAGE
else if(osName.contains("android")) // SPECIFY -Dsvm.targetName=android WHILE BUILDING ANDROID NATIVE IMAGE
{
{
StorageService.create().ifPresent(s-> s.getPublicStorage("Documents").ifPresentOrElse(sp-> prePath = sp.getAbsolutePath()+"/Stream-Pi/Client/",
StorageService.create().ifPresent(s-> s.getPublicStorage("Documents").ifPresentOrElse(sp-> prePath = sp.getAbsolutePath()+"/Stream-Pi/Client/",
()-> prePath = null));
()-> prePath = null));
platform = Platform.ANDROID;
platform = Platform.ANDROID;
}
}
else if(osName.contains("ios")) // SPECIFY -Dsvm.targetName=ios WHILE BUILDING ANDROID NATIVE IMAGE
else if(osName.contains("ios")) // SPECIFY -Dsvm.targetName=ios WHILE BUILDING ANDROID NATIVE IMAGE
{
{
StorageService.create().ifPresent(s->{
StorageService.create().ifPresent(s->{
s.getPrivateStorage().ifPresentOrElse(sp-> prePath = sp.getAbsolutePath()+"/Stream-Pi/Client/",
s.getPrivateStorage().ifPresentOrElse(sp-> prePath = sp.getAbsolutePath()+"/Stream-Pi/Client/",
()-> prePath = null);
()-> prePath = null);
});
});
platform = Platform.IOS;
platform = Platform.IOS;
}
}
else if (osName.contains("mac"))
else if (osName.contains("mac"))
{
{
platform = Platform.MAC;
platform = Platform.MAC;
}
}
else
else
{
{
platform = Platform.UNKNOWN;
platform = Platform.UNKNOWN;
}
}
}
}
public void setRunnerFileName(String runnerFileName)
public void setRunnerFileName(String runnerFileName)
{
{
this.runnerFileName = runnerFileName;
this.runnerFileName = runnerFileName;
}
}
public String getRunnerFileName()
public String getRunnerFileName()
{
{
return runnerFileName;
return runnerFileName;
}
}
public static synchronized ClientInfo getInstance(){
public static synchronized ClientInfo getInstance(){
if(instance == null)
if(instance == null)
{
{
instance = new ClientInfo();
instance = new ClientInfo();
}
}
return instance;
return instance;
}
}
private boolean isShowShutDownButton = false;
private boolean isShowShutDownButton = false;
public void setShowShutDownButton(boolean showShutDownButton) {
public void setShowShutDownButton(boolean showShutDownButton) {
isShowShutDownButton = showShutDownButton;
isShowShutDownButton = showShutDownButton;
}
}
private boolean isXMode = false;
private boolean isXMode = false;
public void setXMode(boolean isXMode)
public void setXMode(boolean isXMode)
{
{
this.isXMode = isXMode;
this.isXMode = isXMode;
}
}
public boolean isXMode() {
public boolean isXMode() {
return isXMode;
return isXMode;
}
}
public boolean isShowShutDownButton() {
public boolean isShowShutDownButton() {
return isShowShutDownButton;
return isShowShutDownButton;
}
}
public String getPrePath()
public String getPrePath()
{
{
return prePath;
return prePath;
}
}
public Platform getPlatform()
public Platform getPlatform()
{
{
return platform;
return platform;
}
}
public Version getVersion() {
public Version getVersion() {
return version;
return version;
}
}
public ReleaseStatus getReleaseStatus()
public ReleaseStatus getReleaseStatus()
{
{
return releaseStatus;
return releaseStatus;
}
}
public Version getMinThemeSupportVersion()
public Version getMinThemeSupportVersion()
{
{
return minThemeSupportVersion;
return minThemeSupportVersion;
}
}
public Version getMinPluginSupportVersion()
public Version getMinPluginSupportVersion()
{
{
return minPluginSupportVersion;
return minPluginSupportVersion;
}
}
public Version getCommStandardVersion()
public Version getCommStandardVersion()
{
{
return commStandardVersion;
return commStandardVersion;
}
}
private boolean showFullScreenToggleButton = true;
private boolean showFullScreenToggleButton = true;
public boolean isShowFullScreenToggleButton()
public boolean isShowFullScreenToggleButton()
{
{
return showFullScreenToggleButton;
return showFullScreenToggleButton;
}
}
public void setShowFullScreenToggleButton(boolean showFullScreenToggleButton)
public void setShowFullScreenToggleButton(boolean showFullScreenToggleButton)
{
{
this.showFullScreenToggleButton = showFullScreenToggleButton;
this.showFullScreenToggleButton = showFullScreenToggleButton;
}
}
public boolean isPhone()
public boolean isPhone()
{
{
return getPlatform() == Platform.ANDROID || getPlatform() == Platform.IOS;
return getPlatform() == Platform.ANDROID || getPlatform() == Platform.IOS;
}
}
private boolean defaultFullscreenMode = false;
public void setDefaultFullscreenMode(boolean defaultFullscreenMode)
{
this.defaultFullscreenMode = defaultFullscreenMode;
}
public boolean getDefaultFullScreenMode()
{
return defaultFullscreenMode;
}
}
}
/*
/*
Config.java
Config.java
Contributor(s) : Debayan Sutradhar (@rnayabed)
Contributor(s) : Debayan Sutradhar (@rnayabed)
handler for config.xml
handler for config.xml
*/
*/
package com.stream_pi.client.io;
package com.stream_pi.client.io;
import java.io.File;
import java.io.File;
import java.util.Objects;
import java.util.Objects;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.transform.Result;
import javax.xml.transform.Result;
import javax.xml.transform.Source;
import javax.xml.transform.Source;
import javax.xml.transform.Transformer;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.dom.DOMSource;
import javax.xml.transform.dom.DOMSource;
import javax.xml.transform.stream.StreamResult;
import javax.xml.transform.stream.StreamResult;
import com.stream_pi.client.Main;
import com.stream_pi.client.Main;
import com.stream_pi.client.info.ClientInfo;
import com.stream_pi.client.info.ClientInfo;
import com.stream_pi.util.exception.SevereException;
import com.stream_pi.util.exception.SevereException;
import com.stream_pi.util.iohelper.IOHelper;
import com.stream_pi.util.iohelper.IOHelper;
import com.stream_pi.util.platform.Platform;
import com.stream_pi.util.platform.Platform;
import com.stream_pi.util.xmlconfighelper.XMLConfigHelper;
import com.stream_pi.util.xmlconfighelper.XMLConfigHelper;
import org.w3c.dom.Document;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.Element;
public class Config
public class Config
{
{
private static Config instance = null;
private static Config instance = null;
private final File configFile;
private final File configFile;
private Document document;
private Document document;
private Config() throws SevereException
private Config() throws SevereException
{
{
try
try
{
{
configFile = new File(ClientInfo.getInstance().getPrePath()+"config.xml");
configFile = new File(ClientInfo.getInstance().getPrePath()+"config.xml");
DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();
DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();
DocumentBuilder docBuilder = docFactory.newDocumentBuilder();
DocumentBuilder docBuilder = docFactory.newDocumentBuilder();
document = docBuilder.parse(configFile);
document = docBuilder.parse(configFile);
}
}
catch (Exception e)
catch (Exception e)
{
{
e.printStackTrace();
e.printStackTrace();
throw new SevereException("Config", "unable to read config.xml");
throw new SevereException("Config", "unable to read config.xml");
}
}
}
}
public static synchronized Config getInstance() throws SevereException
public static synchronized Config getInstance() throws SevereException
{
{
if(instance == null)
if(instance == null)
instance = new Config();
instance = new Config();
return instance;
return instance;
}
}
public static void unzipToDefaultPrePath() throws Exception
public static void unzipToDefaultPrePath() throws Exception
{
{
IOHelper.unzip(Objects.requireNonNull(Main.class.getResourceAsStream("Default.zip")), ClientInfo.getInstance().getPrePath());
IOHelper.unzip(Objects.requireNonNull(Main.class.getResourceAsStream("Default.zip")), ClientInfo.getInstance().getPrePath());
Config.getInstance().setThemesPath(ClientInfo.getInstance().getPrePath()+"Themes/");
Config.getInstance().setThemesPath(ClientInfo.getInstance().getPrePath()+"Themes/");
Config.getInstance().setIconsPath(ClientInfo.getInstance().getPrePath()+"Icons/");
Config.getInstance().setIconsPath(ClientInfo.getInstance().getPrePath()+"Icons/");
Config.getInstance().setProfilesPath(ClientInfo.getInstance().getPrePath()+"Profiles/");
Config.getInstance().setProfilesPath(ClientInfo.getInstance().getPrePath()+"Profiles/");
Config.getInstance().setIsFullScreenMode(ClientInfo.getInstance().getDefaultFullScreenMode());
Config.getInstance().save();
Config.getInstance().save();
}
}
public void save() throws SevereException
public void save() throws SevereException
{
{
try
try
{
{
Transformer transformer = TransformerFactory.newInstance().newTransformer();
Transformer transformer = TransformerFactory.newInstance().newTransformer();
Result output = new StreamResult(configFile);
Result output = new StreamResult(configFile);
Source input = new DOMSource(document);
Source input = new DOMSource(document);
transformer.transform(input, output);
transformer.transform(input, output);
}
}
catch (Exception e)
catch (Exception e)
{
{
throw new SevereException("Config", "unable to save config.xml");
throw new SevereException("Config", "unable to save config.xml");
}
}
}
}
//Client Element
//Client Element
public Element getClientElement()
public Element getClientElement()
{
{
return (Element) document.getElementsByTagName("client").item(0);
return (Element) document.getElementsByTagName("client").item(0);
}
}
//Default Values
//Default Values
public String getDefaultClientNickName()
public String getDefaultClientNickName()
{
{
return "Stream-Pi Client";
return "Stream-Pi Client";
}
}
public String getDefaultStartupProfileID()
public String getDefaultStartupProfileID()
{
{
return "default";
return "default";
}
}
public String getDefaultCurrentThemeFullName()
public String getDefaultCurrentThemeFullName()
{
{
return "com.stream_pi.defaultlight";
return "com.stream_pi.defaultlight";
}
}
public String getDefaultThemesPath()
public String getDefaultThemesPath()
{
{
return ClientInfo.getInstance().getPrePath()+"Themes/";
return ClientInfo.getInstance().getPrePath()+"Themes/";
}
}
public String getDefaultProfilesPath()
public String getDefaultProfilesPath()
{
{
return ClientInfo.getInstance().getPrePath()+"Profiles/";
return ClientInfo.getInstance().getPrePath()+"Profiles/";
}
}
public String getDefaultIconsPath()
public String getDefaultIconsPath()
{
{
return ClientInfo.getInstance().getPrePath()+"Icons/";
return ClientInfo.getInstance().getPrePath()+"Icons/";
}
}
//Getters
//Getters
public String getClientNickName()
public String getClientNickName()
{
{
return XMLConfigHelper.getStringProperty(getClientElement(), "nickname", getDefaultClientNickName(), false, true, document, configFile);
return XMLConfigHelper.getStringProperty(getClientElement(), "nickname", getDefaultClientNickName(), false, true, document, configFile);
}
}
public String getStartupProfileID()
public String getStartupProfileID()
{
{
return XMLConfigHelper.getStringProperty(getClientElement(), "startup-profile", getDefaultStartupProfileID(), false, true, document, configFile);
return XMLConfigHelper.getStringProperty(getClientElement(), "startup-profile", getDefaultStartupProfileID(), false, true, document, configFile);
}
}
public String getCurrentThemeFullName()
public String getCurrentThemeFullName()
{
{
return XMLConfigHelper.getStringProperty(getClientElement(), "current-theme-full-name", getDefaultCurrentThemeFullName(), false, true, document, configFile);
return XMLConfigHelper.getStringProperty(getClientElement(), "current-theme-full-name", getDefaultCurrentThemeFullName(), false, true, document, configFile);
}
}
public String getThemesPath()
public String getThemesPath()
{
{
Platform platform = ClientInfo.getInstance().getPlatform();
Platform platform = ClientInfo.getInstance().getPlatform();
if(platform != Platform.ANDROID &&
if(platform != Platform.ANDROID &&
platform != Platform.IOS)
platform != Platform.IOS)
return ClientInfo.getInstance().getPrePath() + "Themes/";
return ClientInfo.getInstance().getPrePath() + "Themes/";
return XMLConfigHelper.getStringProperty(getClientElement(), "themes-path", getDefaultThemesPath(), false, true, document, configFile);
return XMLConfigHelper.getStringProperty(getClientElement(), "themes-path", getDefaultThemesPath(), false, true, document, configFile);
}
}
public String getProfilesPath()
public String getProfilesPath()
{
{
Platform platform = ClientInfo.getInstance().getPlatform();
Platform platform = ClientInfo.getInstance().getPlatform();
if(platform != Platform.ANDROID &&
if(platform != Platform.ANDROID &&
platform != Platform.IOS)
platform != Platform.IOS)
return ClientInfo.getInstance().getPrePath() + "Profiles/";
return ClientInfo.getInstance().getPrePath() + "Profiles/";
return XMLConfigHelper.getStringProperty(getClientElement(), "profiles-path", getDefaultProfilesPath(), false, true, document, configFile);
return XMLConfigHelper.getStringProperty(getClientElement(), "profiles-path", getDefaultProfilesPath(), false, true, document, configFile);
}
}
public String getIconsPath()
public String getIconsPath()
{
{
Platform platform = ClientInfo.getInstance().getPlatform();
Platform platform = ClientInfo.getInstance().getPlatform();
if(platform != Platform.ANDROID &&
if(platform != Platform.ANDROID &&
platform != Platform.IOS)
platform != Platform.IOS)
return ClientInfo.getInstance().getPrePath() + "Icons/";
return ClientInfo.getInstance().getPrePath() + "Icons/";
return XMLConfigHelper.getStringProperty(getClientElement(), "icons-path", getDefaultIconsPath(), false, true, document, configFile);
return XMLConfigHelper.getStringProperty(getClientElement(), "icons-path", getDefaultIconsPath(), false, true, document, configFile);
}
}
//Setters
//Setters
public void setNickName(String nickName)
public void setNickName(String nickName)
{
{
getClientElement().getElementsByTagName("nickname").item(0).setTextContent(nickName);
getClientElement().getElementsByTagName("nickname").item(0).setTextContent(nickName);
}
}
public void setStartupProfileID(String id)
public void setStartupProfileID(String id)
{
{
getClientElement().getElementsByTagName("startup-profile").item(0).setTextContent(id);
getClientElement().getElementsByTagName("startup-profile").item(0).setTextContent(id);
}
}
public void setCurrentThemeFullName(String name)
public void setCurrentThemeFullName(String name)
{
{
getClientElement().getElementsByTagName("current-theme-full-name").item(0).setTextContent(name);
getClientElement().getElementsByTagName("current-theme-full-name").item(0).setTextContent(name);
}
}
public void setProfilesPath(String profilesPath)
public void setProfilesPath(String profilesPath)
{
{
getClientElement().getElementsByTagName("profiles-path").item(0).setTextContent(profilesPath);
getClientElement().getElementsByTagName("profiles-path").item(0).setTextContent(profilesPath);
}
}
public void setIconsPath(String iconsPath)
public void setIconsPath(String iconsPath)
{
{
getClientElement().getElementsByTagName("icons-path").item(0).setTextContent(iconsPath);
getClientElement().getElementsByTagName("icons-path").item(0).setTextContent(iconsPath);
}
}
public void setThemesPath(String themesPath)
public void setThemesPath(String themesPath)
{
{
getClientElement().getElementsByTagName("themes-path").item(0).setTextContent(themesPath);
getClientElement().getElementsByTagName("themes-path").item(0).setTextContent(themesPath);
}
}
//comms-server
//comms-server
public Element getCommsServerElement()
public Element getCommsServerElement()
{
{
return (Element) document.getElementsByTagName("comms-server").item(0);
return (Element) document.getElementsByTagName("comms-server").item(0);
}
}
public String getDefaultSavedServerHostNameOrIP()
public String getDefaultSavedServerHostNameOrIP()
{
{
return "127.0.0.1";
return "127.0.0.1";
}
}
public int getDefaultSavedServerPort()
public int getDefaultSavedServerPort()
{
{
return -1;
return -1;
}
}
public String getSavedServerHostNameOrIP()
public String getSavedServerHostNameOrIP()
{
{
return XMLConfigHelper.getStringProperty(getCommsServerElement(), "hostname-ip", getDefaultSavedServerHostNameOrIP(), false, true, document, configFile);
return XMLConfigHelper.getStringProperty(getCommsServerElement(), "hostname-ip", getDefaultSavedServerHostNameOrIP(), false, true, document, configFile);
}
}
public int getSavedServerPort()
public int getSavedServerPort()
{
{
return XMLConfigHelper.getIntProperty(getCommsServerElement(), "port", getDefaultSavedServerPort(), false, true, document, configFile);
return XMLConfigHelper.getIntProperty(getCommsServerElement(), "port", getDefaultSavedServerPort(), false, true, document, configFile);
}
}
public void setServerHostNameOrIP(String hostNameOrIP)
public void setServerHostNameOrIP(String hostNameOrIP)
{
{
getCommsServerElement().getElementsByTagName("hostname-ip").item(0).setTextContent(hostNameOrIP);
getCommsServerElement().getElementsByTagName("hostname-ip").item(0).setTextContent(hostNameOrIP);
}
}
public void setServerPort(int port)
public void setServerPort(int port)
{
{
getCommsServerElement().getElementsByTagName("port").item(0).setTextContent(port+"");
getCommsServerElement().getElementsByTagName("port").item(0).setTextContent(port+"");
}
}
//others
//others
public Element getOthersElement()
public Element getOthersElement()
{
{
return (Element) document.getElementsByTagName("others").item(0);
return (Element) document.getElementsByTagName("others").item(0);
}
}
//others-default
//others-default
public boolean getDefaultStartOnBoot()
public boolean getDefaultStartOnBoot()
{
{
return false;
return false;
}
}
public boolean getDefaultIsShowCursor()
public boolean getDefaultIsShowCursor()
{
{
return true;
return true;
}
}
public boolean getDefaultFirstTimeUse()
public boolean getDefaultFirstTimeUse()
{
{
return true;
return true;
}
}
public boolean isShowCursor()
public boolean isShowCursor()
{
{
return XMLConfigHelper.getBooleanProperty(getOthersElement(), "show-cursor", getDefaultIsShowCursor(), false, true, document, configFile);
return XMLConfigHelper.getBooleanProperty(getOthersElement(), "show-cursor", getDefaultIsShowCursor(), false, true, document, configFile);
}
}
public boolean isStartOnBoot()
public boolean isStartOnBoot()
{
{
return XMLConfigHelper.getBooleanProperty(getOthersElement(), "start-on-boot", getDefaultStartOnBoot(), false, true, document, configFile);
return XMLConfigHelper.getBooleanProperty(getOthersElement(), "start-on-boot", getDefaultStartOnBoot(), false, true, document, configFile);
}
}
public boolean isFirstTimeUse()
public boolean isFirstTimeUse()
{
{
return XMLConfigHelper.getBooleanProperty(getOthersElement(), "first-time-use", true, false, true, document, configFile);
return XMLConfigHelper.getBooleanProperty(getOthersElement(), "first-time-use", true, false, true, document, configFile);
}
}
public boolean isVibrateOnActionClicked()
public boolean isVibrateOnActionClicked()
{
{
return XMLConfigHelper.getBooleanProperty(getOthersElement(), "vibrate-on-action-clicked", false, false, true, document, configFile);
return XMLConfigHelper.getBooleanProperty(getOthersElement(), "vibrate-on-action-clicked", false, false, true, document, configFile);
}
}
public boolean isConnectOnStartup()
public boolean isConnectOnStartup()
{
{
return XMLConfigHelper.getBooleanProperty(getOthersElement(), "connect-on-startup", false, false, true, document, configFile);
return XMLConfigHelper.getBooleanProperty(getOthersElement(), "connect-on-startup", false, false, true, document, configFile);
}
}
public boolean getIsFullScreenMode()
public boolean getIsFullScreenMode()
{
{
return XMLConfigHelper.getBooleanProperty(getOthersElement(), "full-screen-mode", false, false, true, document, configFile);
return XMLConfigHelper.getBooleanProperty(getOthersElement(), "full-screen-mode", false, false, true, document, configFile);
}
}
public void setStartOnBoot(boolean value)
public void setStartOnBoot(boolean value)
{
{
getOthersElement().getElementsByTagName("start-on-boot").item(0).setTextContent(value+"");
getOthersElement().getElementsByTagName("start-on-boot").item(0).setTextContent(value+"");
}
}
public void setShowCursor(boolean value)
public void setShowCursor(boolean value)
{
{
getOthersElement().getElementsByTagName("show-cursor").item(0).setTextContent(value+"");
getOthersElement().getElementsByTagName("show-cursor").item(0).setTextContent(value+"");
}
}
public void setFullscreen(boolean value)
public void setFullscreen(boolean value)
{
{
getOthersElement().getElementsByTagName("fullscreen").item(0).setTextContent(value+"");
getOthersElement().getElementsByTagName("fullscreen").item(0).setTextContent(value+"");
}
}
public void setFirstTimeUse(boolean value)
public void setFirstTimeUse(boolean value)
{
{
getOthersElement().getElementsByTagName("first-time-use").item(0).setTextContent(value+"");
getOthersElement().getElementsByTagName("first-time-use").item(0).setTextContent(value+"");
}
}
public void setVibrateOnActionClicked(boolean value)
public void setVibrateOnActionClicked(boolean value)
{
{
getOthersElement().getElementsByTagName("vibrate-on-action-clicked").item(0).setTextContent(value+"");
getOthersElement().getElementsByTagName("vibrate-on-action-clicked").item(0).setTextContent(value+"");
}
}
public void setConnectOnStartup(boolean value)
public void setConnectOnStartup(boolean value)
{
{
getOthersElement().getElementsByTagName("connect-on-startup").item(0).setTextContent(value+"");
getOthersElement().getElementsByTagName("connect-on-startup").item(0).setTextContent(value+"");
}
}
public void setIsFullScreenMode(boolean value)
public void setIsFullScreenMode(boolean value)
{
{
getOthersElement().getElementsByTagName("full-screen-mode").item(0).setTextContent(value+"");
getOthersElement().getElementsByTagName("full-screen-mode").item(0).setTextContent(value+"");
}
}
private Element getStartupWindowSizeElement()
private Element getStartupWindowSizeElement()
{
{
return (Element) getClientElement().getElementsByTagName("startup-window-size").item(0);
return (Element) getClientElement().getElementsByTagName("startup-window-size").item(0);
}
}
public double getStartupWindowWidth()
public double getStartupWindowWidth()
{
{
return XMLConfigHelper.getDoubleProperty(getStartupWindowSizeElement(), "width",
return XMLConfigHelper.getDoubleProperty(getStartupWindowSizeElement(), "width",
getDefaultStartupWindowWidth(), false, true, document, configFile);
getDefaultStartupWindowWidth(), false, true, document, configFile);
}
}
public double getStartupWindowHeight()
public double getStartupWindowHeight()
{
{
return XMLConfigHelper.getDoubleProperty(getStartupWindowSizeElement(), "height",
return XMLConfigHelper.getDoubleProperty(getStartupWindowSizeElement(), "height",
getDefaultStartupWindowHeight(), false, true, document, configFile);
getDefaultStartupWindowHeight(), false, true, document, configFile);
}
}
public int getDefaultStartupWindowWidth()
public int getDefaultStartupWindowWidth()
{
{
return 800;
return 800;
}
}
public int getDefaultStartupWindowHeight()
public int getDefaultStartupWindowHeight()
{
{
return 400;
return 400;
}
}
public void setStartupWindowSize(double width, double height)
public void setStartupWindowSize(double width, double height)
{
{
setStartupWindowWidth(width);
setStartupWindowWidth(width);
setStartupWindowHeight(height);
setStartupWindowHeight(height);
}
}
public void setStartupWindowWidth(double width)
public void setStartupWindowWidth(double width)
{
{
getStartupWindowSizeElement().getElementsByTagName("width").item(0).setTextContent(width+"");
getStartupWindowSizeElement().getElementsByTagName("width").item(0).setTextContent(width+"");
}
}
public void setStartupWindowHeight(double height)
public void setStartupWindowHeight(double height)
{
{
getStartupWindowSizeElement().getElementsByTagName("height").item(0).setTextContent(height+"");
getStartupWindowSizeElement().getElementsByTagName("height").item(0).setTextContent(height+"");
}
}
public void setStartupIsXMode(boolean value)
public void setStartupIsXMode(boolean value)
{
{
getOthersElement().getElementsByTagName("start-on-boot-x-mode").item(0).setTextContent(value+"");
getOthersElement().getElementsByTagName("start-on-boot-x-mode").item(0).setTextContent(value+"");
}
}
public boolean getDefaultIsStartupXMode()
public boolean getDefaultIsStartupXMode()
{
{
return false;
return false;
}
}
public boolean isStartupXMode()
public boolean isStartupXMode()
{
{
return XMLConfigHelper.getBooleanProperty(getOthersElement(), "start-on-boot-x-mode", getDefaultIsStartupXMode(), false, true, document, configFile);
return XMLConfigHelper.getBooleanProperty(getOthersElement(), "start-on-boot-x-mode", getDefaultIsStartupXMode(), false, true, document, configFile);
}
}
public boolean getDefaultIsTryConnectingWhenActionClicked()
public boolean getDefaultIsTryConnectingWhenActionClicked()
{
{
return false;
return false;
}
}
public boolean isTryConnectingWhenActionClicked()
public boolean isTryConnectingWhenActionClicked()
{
{
return XMLConfigHelper.getBooleanProperty(getOthersElement(), "try-connecting-when-action-clicked", getDefaultIsTryConnectingWhenActionClicked(), false, true, document, configFile);
return XMLConfigHelper.getBooleanProperty(getOthersElement(), "try-connecting-when-action-clicked", getDefaultIsTryConnectingWhenActionClicked(), false, true, document, configFile);
}
}
public void setTryConnectingWhenActionClicked(boolean value)
public void setTryConnectingWhenActionClicked(boolean value)
{
{
getOthersElement().getElementsByTagName("try-connecting-when-action-clicked").item(0).setTextContent(value+"");
getOthersElement().getElementsByTagName("try-connecting-when-action-clicked").item(0).setTextContent(value+"");
}
}
}
}
PK |R Icons/PK |R Profiles/PK 'cJRLV&