-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathDemoDockSchema.java
63 lines (53 loc) · 1.41 KB
/
DemoDockSchema.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
// Copyright © 2016-2024 Andy Goryachev <[email protected]>
package demo.dock;
import goryachev.common.util.ASettingsStore;
import goryachev.fxdock.FxDockPane;
import goryachev.fxdock.FxDockSchema;
import javafx.stage.Stage;
/**
* Demo Schema creates custom dock windows and dock panes.
*/
public class DemoDockSchema
extends FxDockSchema
{
/** type id for a browser pane */
public static final String BROWSER = "BROWSER";
/** type id for a CPane demo */
public static final String CPANE = "CPANE";
/** type id for a HPane demo */
public static final String HPANE = "HPANE";
/** type id for a login pane */
public static final String LOGIN = "LOGIN";
/** type id for a VPane demo */
public static final String VPANE = "VPANE";
public DemoDockSchema(ASettingsStore store)
{
super(store);
}
/** creates custom pane using the type id */
public FxDockPane createPane(String id)
{
switch(id)
{
case BROWSER:
return new DemoBrowser();
case CPANE:
return new DemoCPane();
case HPANE:
return new DemoHPane();
case LOGIN:
return new DemoLoginPane();
default:
// id determines the background color
return new DemoPane(id);
}
}
public Stage createWindow(String name)
{
return new DemoWindow();
}
public Stage createDefaultWindow()
{
return DemoWindow.openBrowser("https://github.com/andy-goryachev/FxDock");
}
}