Created
January 22, 2019 23:44
-
-
Save Fiooodooor/40dbe7b7f650ed186ef6b4dc4d12d07a to your computer and use it in GitHub Desktop.
Simple JavaFX application with 'touch-screen' on hour label.
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"> | |
<option name="DEFAULT_COMPILER" value="Javac" /> | |
<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" /> | |
</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
<html>Simple <b>JavaFX 2.0</b> application that includes simple .fxml file with attached controller and Main class to quick start. Artifact to build JavaFX application is provided. | |
</html> |
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="Encoding" addBOMForNewFiles="with NO BOM"> | |
<file url="PROJECT" charset="UTF-8" /> | |
</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="GradleSettings"> | |
<option name="gradleHome" value="C:/Program Files (x86)/Gradle/gradle-1.0-rc-3" /> | |
</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="ProjectKey"> | |
<option name="state" value="project://e79810c8-c5c8-43b1-b19c-90c1f4095425" /> | |
</component> | |
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="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$/aplikacjaBudzik.iml" filepath="$PROJECT_DIR$/aplikacjaBudzik.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="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" /> | |
</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 sample; | |
import javafx.application.Platform; | |
import javafx.fxml.FXML; | |
import javafx.scene.control.*; | |
import java.sql.Time; | |
import java.text.SimpleDateFormat; | |
import java.time.Instant; | |
import java.util.*; | |
public class Controller { | |
private SimpleDateFormat theHour; | |
private SimpleDateFormat theSeconds; | |
private String myTemp; | |
@FXML | |
public Label actualDate; | |
@FXML | |
public Label actualHour; | |
@FXML | |
public ProgressBar actualSeconds; | |
@FXML | |
public Button cancelButton; | |
@FXML | |
public Button saveButton; | |
@FXML | |
public Slider volumeSlide; | |
@FXML | |
public TextField nazwaAlarmu; | |
@FXML | |
public ToggleButton buttonDzien1; | |
@FXML | |
public ToggleButton buttonDzien2; | |
@FXML | |
public ToggleButton buttonDzien3; | |
@FXML | |
public ToggleButton buttonDzien4; | |
@FXML | |
public ToggleButton buttonDzien5; | |
@FXML | |
public ToggleButton buttonDzien6; | |
@FXML | |
public ToggleButton buttonDzien7; | |
@FXML | |
public Label minutesLabel; | |
@FXML | |
public Label hoursLabel; | |
@FXML | |
public Slider minutesSlider; | |
@FXML | |
public Slider hoursSlider; | |
@FXML | |
public ProgressBar minutesProgresbar; | |
@FXML | |
public ProgressBar hoursProgresbar; | |
@FXML | |
public Label labelGlosnosc; | |
public void initialize() | |
{ | |
myTemp = ""; | |
System.out.println(this.hoursSlider.getValue()); | |
SimpleDateFormat theDate = new SimpleDateFormat("dd.MM.yyyy"); | |
actualDate.setText(theDate.format(Time.from(Instant.now()))); | |
theHour = new SimpleDateFormat("hh:mm:ss"); | |
theSeconds = new SimpleDateFormat("ss"); | |
Timer timer = new Timer(); | |
timer.scheduleAtFixedRate(new TimerTask() { | |
public void run() { Platform.runLater(() -> { | |
actualHour.setText(theHour.format(Time.from(Instant.now()))); | |
actualSeconds.setProgress(Double.parseDouble( theSeconds.format(Time.from(Instant.now())) )); | |
}); | |
}}, 1000, 1000); | |
} | |
@FXML | |
protected void onSaveButton() { | |
if(getDniTygodnia().size() != 0) | |
{ | |
System.out.print("Ustawiam budzik '" + getNazwaAlarmu() + "' na godzine "); | |
System.out.println(getHoursSlider() + ":" + getMinutesSlider() + ". "); | |
System.out.println("Zabrzmi z głośnością " + getVolumeSlide() + "% w nastepujace dni: "); | |
System.out.println(getDniTygodnia()); | |
} else { | |
System.out.println("Nie ustawiono budzika poniezwaz nie wybrano zadnego dnia tygodnia. "); | |
} | |
System.out.println("Zamykam aplikacje."); | |
System.exit(0); | |
} | |
@FXML | |
protected void onCancelButton() { | |
System.out.println("Zamykam aplikacje."); | |
System.exit(0); | |
} | |
@FXML | |
protected void setOnDraggMinutes() | |
{ | |
if(minutesSlider.getValue() < 10) { | |
minutesLabel.setText('0' + String.valueOf((int) minutesSlider.getValue())); | |
minutesProgresbar.setProgress(minutesSlider.getValue()/60.0); | |
} | |
else { | |
minutesLabel.setText(String.valueOf((int) minutesSlider.getValue())); | |
minutesProgresbar.setProgress(minutesSlider.getValue()/60.0); | |
} | |
} | |
@FXML | |
protected void setOnDraggHours() | |
{ | |
if(hoursSlider.getValue() < 10) { | |
hoursLabel.setText('0' + String.valueOf((int) hoursSlider.getValue())); | |
hoursProgresbar.setProgress(hoursSlider.getValue()/24.0); | |
} | |
else { | |
hoursLabel.setText(String.valueOf((int) hoursSlider.getValue())); | |
hoursProgresbar.setProgress(hoursSlider.getValue()/24.0); | |
} | |
} | |
@FXML | |
protected void setOnDraggVolume() | |
{ | |
if(myTemp == null || myTemp.length()<10) { | |
myTemp = labelGlosnosc.getText(); } | |
labelGlosnosc.setText(" - - g ł o ś n o ś ć : " + Integer.toString(getVolumeSlide()) + " % - - "); | |
} | |
@FXML | |
protected void setOnReleaseVolume() | |
{ | |
if(myTemp != null || myTemp.length() < 10) { | |
labelGlosnosc.setText(myTemp); | |
myTemp = null; | |
} | |
} | |
@FXML | |
private ArrayList<String> getDniTygodnia() { | |
ArrayList<String> returnVal = new ArrayList<>(); | |
if(buttonDzien1.isSelected()) returnVal.add("Poniedziałek"); | |
if(buttonDzien2.isSelected()) returnVal.add("Wtorek"); | |
if(buttonDzien3.isSelected()) returnVal.add("Środa"); | |
if(buttonDzien4.isSelected()) returnVal.add("Czwartek"); | |
if(buttonDzien5.isSelected()) returnVal.add("Piątek"); | |
if(buttonDzien6.isSelected()) returnVal.add("Sobota"); | |
if(buttonDzien7.isSelected()) returnVal.add("Niedziela"); | |
return returnVal; | |
} | |
@FXML | |
private int getVolumeSlide() { | |
return (int) volumeSlide.getValue(); | |
} | |
@FXML | |
private String getNazwaAlarmu() { | |
return nazwaAlarmu.getText(); | |
} | |
@FXML | |
private int getMinutesSlider() { | |
return (int) minutesSlider.getValue(); | |
} | |
@FXML | |
private int getHoursSlider() { | |
return (int) hoursSlider.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 sample; | |
import javafx.application.Application; | |
import javafx.fxml.FXMLLoader; | |
import javafx.scene.Parent; | |
import javafx.scene.Scene; | |
import javafx.stage.Stage; | |
public class Main extends Application { | |
@Override | |
public void start(Stage primaryStage) throws Exception | |
{ | |
Parent root = FXMLLoader.load(getClass().getResource("sample.fxml")); | |
primaryStage.setTitle("Budzik application"); | |
primaryStage.setScene(new Scene(root, 330, 400)); | |
primaryStage.setResizable(false); | |
primaryStage.show(); | |
} | |
public static void main(String[] args) | |
{ | |
launch(args); | |
} | |
} |
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"?> | |
<?import javafx.geometry.*?> | |
<?import javafx.scene.*?> | |
<?import javafx.scene.effect.*?> | |
<?import javafx.scene.text.*?> | |
<?import javafx.scene.control.*?> | |
<?import javafx.scene.layout.*?> | |
<VBox alignment="TOP_CENTER" maxWidth="330.0" minHeight="395.0" minWidth="330.0" prefHeight="395.0" prefWidth="330.0" | |
stylesheets="@style.css" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" | |
fx:controller="sample.Controller"> | |
<HBox prefHeight="100.0" prefWidth="200.0" VBox.vgrow="NEVER"> | |
<Pane prefHeight="200.0" prefWidth="100.0"/> | |
<Pane maxWidth="136.0" minWidth="136.0" prefHeight="200.0" prefWidth="136.0"> | |
<Label fx:id="hoursLabel" layoutX="25.0" layoutY="-5.0" styleClass="buzzerLabel" text="00"> | |
<font> | |
<Font size="96.0"/> | |
</font> | |
</Label> | |
<ProgressBar fx:id="hoursProgresbar" layoutX="-17.0" layoutY="47.0" minHeight="2.0" prefHeight="8.0" | |
prefWidth="75.0" progress="0.0" rotate="-90.0"/> | |
<Slider fx:id="hoursSlider" blockIncrement="15.0" layoutX="65.0" layoutY="30.0" max="23.0" | |
maxHeight="41.0" maxWidth="16.0" minHeight="41.0" minWidth="16.0" minorTickCount="1" | |
onMouseDragged="#setOnDraggHours" opacity="0.0" orientation="VERTICAL" prefHeight="41.0" | |
prefWidth="16.0" scaleX="8.0" scaleY="2.0"> | |
<effect> | |
<DropShadow/> | |
</effect> | |
<cursor> | |
<Cursor fx:constant="HAND"/> | |
</cursor> | |
</Slider> | |
</Pane> | |
<Pane maxWidth="10.0" minHeight="10.0" minWidth="10.0" prefHeight="100.0" prefWidth="10.0"> | |
<Label layoutX="-9.0" layoutY="-15.0" styleClass="buzzerLabel" text=":"> | |
<font> | |
<Font size="96.0"/> | |
</font> | |
</Label> | |
</Pane> | |
<Pane maxWidth="136.0" minWidth="136.0" prefHeight="200.0" prefWidth="136.0"> | |
<Label fx:id="minutesLabel" layoutX="2.0" layoutY="-5.0" styleClass="buzzerLabel" text="00"> | |
<font> | |
<Font size="96.0"/> | |
</font> | |
</Label> | |
<ProgressBar fx:id="minutesProgresbar" layoutX="75.0" layoutY="47.0" minHeight="2.0" | |
prefHeight="8.0" prefWidth="75.0" progress="0.0" rotate="-90.0"/> | |
<Slider fx:id="minutesSlider" blockIncrement="15.0" layoutX="92.0" layoutY="30.0" max="59.0" | |
maxWidth="14.0" minHeight="41.0" minWidth="10.0" minorTickCount="1" | |
onMouseDragged="#setOnDraggMinutes" opacity="0.0" orientation="VERTICAL" prefHeight="41.0" | |
prefWidth="10.0" scaleX="7.0" scaleY="2.0" snapToTicks="true"> | |
<effect> | |
<DropShadow/> | |
</effect> | |
<cursor> | |
<Cursor fx:constant="HAND"/> | |
</cursor> | |
</Slider> | |
</Pane> | |
<Pane prefHeight="200.0" prefWidth="100.0"/> | |
</HBox> | |
<Separator prefWidth="200.0"> | |
<VBox.margin> | |
<Insets bottom="8.0" left="11.0" right="11.0" top="8.0"/> | |
</VBox.margin> | |
</Separator> | |
<HBox alignment="CENTER" maxHeight="65.0" minHeight="65.0" prefHeight="100.0" prefWidth="200.0" spacing="3.0" | |
VBox.vgrow="NEVER"> | |
<VBox.margin> | |
<Insets/> | |
</VBox.margin> | |
<ToggleButton fx:id="buttonDzien1" mnemonicParsing="false" styleClass="daysButtons" text="Pn"> | |
<opaqueInsets> | |
<Insets/> | |
</opaqueInsets> | |
<HBox.margin> | |
<Insets/> | |
</HBox.margin> | |
</ToggleButton> | |
<ToggleButton fx:id="buttonDzien2" mnemonicParsing="false" styleClass="daysButtons" text="Wt"> | |
<opaqueInsets> | |
<Insets/> | |
</opaqueInsets> | |
</ToggleButton> | |
<ToggleButton fx:id="buttonDzien3" mnemonicParsing="false" styleClass="daysButtons" text="Śr"> | |
<opaqueInsets> | |
<Insets/> | |
</opaqueInsets> | |
</ToggleButton> | |
<ToggleButton fx:id="buttonDzien4" mnemonicParsing="false" styleClass="daysButtons" text="Cz"> | |
<opaqueInsets> | |
<Insets/> | |
</opaqueInsets> | |
</ToggleButton> | |
<ToggleButton fx:id="buttonDzien5" mnemonicParsing="false" styleClass="daysButtons" text="Pt"> | |
<opaqueInsets> | |
<Insets/> | |
</opaqueInsets> | |
</ToggleButton> | |
<ToggleButton fx:id="buttonDzien6" mnemonicParsing="false" styleClass="daysButtons" text="Sb"> | |
<opaqueInsets> | |
<Insets/> | |
</opaqueInsets> | |
</ToggleButton> | |
<ToggleButton fx:id="buttonDzien7" mnemonicParsing="false" styleClass="daysButtons" text="Nd"> | |
<opaqueInsets> | |
<Insets/> | |
</opaqueInsets> | |
</ToggleButton> | |
</HBox> | |
<Separator prefWidth="200.0"> | |
<VBox.margin> | |
<Insets bottom="8.0" left="11.0" right="11.0" top="8.0"/> | |
</VBox.margin> | |
</Separator> | |
<TextField fx:id="nazwaAlarmu" alignment="CENTER" promptText="n a z w a a l a r m u" styleClass="textEdit"> | |
<VBox.margin> | |
<Insets bottom="5.0" left="10.0" right="10.0" top="5.0"/> | |
</VBox.margin> | |
</TextField> | |
<Separator prefWidth="200.0"> | |
<VBox.margin> | |
<Insets bottom="8.0" left="11.0" right="11.0" top="8.0"/> | |
</VBox.margin> | |
</Separator> | |
<Label fx:id="labelGlosnosc" alignment="CENTER" styleClass="captionLabel" | |
text="0% u s t a w g ł o ś n o ś c a l a r m u 100%" textFill="#b9b9b9"> | |
<VBox.margin> | |
<Insets top="5.0"/> | |
</VBox.margin> | |
</Label> | |
<Slider fx:id="volumeSlide" onMouseDragged="#setOnDraggVolume" onMouseReleased="#setOnReleaseVolume"> | |
<VBox.margin> | |
<Insets bottom="3.0" left="20.0" right="20.0" top="6.0"/> | |
</VBox.margin> | |
</Slider> | |
<Separator prefWidth="200.0"> | |
<VBox.margin> | |
<Insets bottom="11.0" left="11.0" right="11.0" top="8.0"/> | |
</VBox.margin> | |
</Separator> | |
<HBox alignment="CENTER" prefHeight="50.0" prefWidth="200.0" spacing="10.0" VBox.vgrow="NEVER"> | |
<Button fx:id="saveButton" mnemonicParsing="false" onAction="#onSaveButton" styleClass="bottomButtons" | |
text="zapisz"> | |
<HBox.margin> | |
<Insets left="11.0" right="8.0"/> | |
</HBox.margin> | |
</Button> | |
<VBox alignment="CENTER" prefHeight="200.0" prefWidth="100.0"> | |
<Label fx:id="actualHour" styleClass="currentHour" text="8:27"> | |
<VBox.margin> | |
<Insets bottom="5.0"/> | |
</VBox.margin> | |
</Label> | |
<ProgressBar fx:id="actualSeconds" maxHeight="8.0" minHeight="8.0" prefHeight="8.0" | |
prefWidth="200.0" progress="0.0"/> | |
<Label fx:id="actualDate" styleClass="currentHour" text="22.01.2019"/> | |
</VBox> | |
<Button fx:id="cancelButton" mnemonicParsing="false" onAction="#onCancelButton" styleClass="bottomButtons" | |
text="anuluj"> | |
<HBox.margin> | |
<Insets left="8.0" right="11.0"/> | |
</HBox.margin> | |
</Button> | |
</HBox> | |
<Separator prefWidth="200.0"> | |
<VBox.margin> | |
<Insets left="11.0" right="11.0" top="12.0"/> | |
</VBox.margin> | |
</Separator> | |
</VBox> |
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
.buzzerLabel { | |
-fx-font: 96 "Arial"; | |
} | |
.textEdit { | |
-fx-font: 14 "Arial"; | |
-fx-font-weight: bold; | |
} | |
.captionLabel { | |
-fx-font: 13 "Arial"; | |
-fx-font-weight: bold; | |
} | |
.currentHour { | |
-fx-font: 12 "Arial"; | |
-fx-font-weight: bold; | |
} | |
.bottomButtons { | |
-fx-font: 22 "Arial"; | |
-fx-text-alignment: "center"; | |
-fx-padding: 20 1 1 1; | |
-fx-min-width: 100; | |
-fx-max-width: 100; | |
-fx-min-height: 55; | |
-fx-max-height: 55; | |
} | |
.bottomButtons:pressed { | |
-fx-background-color: #3376c9; | |
-fx-border-color: #ff1010; | |
} | |
.daysButtons { | |
-fx-font: 28 "Arial"; | |
-fx-text-alignment: "center"; | |
-fx-padding: 25 1 1 1; | |
-fx-min-width: 43; | |
-fx-max-width: 43; | |
-fx-min-height: 55; | |
-fx-max-height: 55; | |
} | |
.daysButtons:selected { | |
-fx-font: 28 "Arial"; | |
-fx-text-fill: "red"; | |
-fx-text-alignment: "center"; | |
-fx-padding: 25 1 1 1; | |
-fx-min-width: 43; | |
-fx-max-width: 43; | |
-fx-min-height: 55; | |
-fx-max-height: 55; | |
} | |
.daysButtons:selected:focused { | |
-fx-font: 28 "Arial"; | |
-fx-text-fill: "red"; | |
-fx-text-alignment: "center"; | |
-fx-padding: 25 1 1 1; | |
-fx-min-width: 43; | |
-fx-max-width: 43; | |
-fx-min-height: 55; | |
-fx-max-height: 55; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment