]> git.xonotic.org Git - xonotic/xonotic.git/blob - misc/tools/NexuizDemoRecorder/main/src/main/java/com/nexuiz/demorecorder/ui/swinggui/utils/SwingGUIUtils.java
Merge branch 'master' of ssh://git.xonotic.org/xonotic
[xonotic/xonotic.git] / misc / tools / NexuizDemoRecorder / main / src / main / java / com / nexuiz / demorecorder / ui / swinggui / utils / SwingGUIUtils.java
1 package com.nexuiz.demorecorder.ui.swinggui.utils;
2
3 import java.io.File;
4
5 public class SwingGUIUtils {
6         public static boolean isBooleanValue(String value) {
7                 if (value.equalsIgnoreCase("true") || value.equalsIgnoreCase("false")) {
8                         return true;
9                 }
10                 return false;
11         }
12
13         public static boolean isFileChooser(String value) {
14                 if (value.equalsIgnoreCase("filechooser")) {
15                         return true;
16                 }
17                 try {
18                         File file = new File(value);
19                         if (file.exists()) {
20                                 return true;
21                         }
22                 } catch (Throwable e) {
23                 }
24                 return false;
25         }
26 }