This repository was archived by the owner on Jul 9, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCFAppBar.bas
More file actions
87 lines (56 loc) · 1.68 KB
/
CFAppBar.bas
File metadata and controls
87 lines (56 loc) · 1.68 KB
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
B4J=true
Group=Cuppy Framework\Cuppy\Controls
ModulesStructureVersion=1
Type=Class
Version=5.51
@EndOfDesignText@
'Custom View class
#Region Internal Segment
Sub Class_Globals
Private fx As JFX
Private mEventName As String 'ignore
Private mCallBack As Object 'ignore
Private mBase As Pane
Private Label1 As Label
Public InnerPane As Pane
End Sub
Public Sub Initialize (Callback As Object, EventName As String)
mEventName = EventName
mCallBack = Callback
End Sub
Public Sub DesignerCreateView (Base As Pane, Lbl As Label, Props As Map)
mBase = Base
mBase.LoadLayout("AppBarLayout")
'set using theme...
SetBg(CFStyleManager.DefaultTheme.Get("primary"))
End Sub
Private Sub Base_Resize (Width As Double, Height As Double)
End Sub
Public Sub GetBase As Pane
Return mBase
End Sub
#End Region
#Region Actions and Effects
Public Sub SetBg(color As String)
CSSUtils.SetStyleProperty( Label1, "-fx-background-color", color)
CSSUtils.SetStyleProperty( InnerPane, "-fx-background-color", color)
End Sub
Public Sub setRotationX(angle As Float)
CFControlsUtils.setRotationX(Label1, angle) 'rotate
CFControlsUtils.setPaneRotationX(InnerPane , angle) 'rotate
End Sub
Public Sub setBorder(color As String , width As Int)
CFControlsUtils.setBorder(Label1, color, width)
CFControlsUtils.setPaneBorder(InnerPane, color, width)
End Sub
Public Sub setBorderRadius(radius As Int)
CFControlsUtils.setBorderRadius(Label1, radius)
CFControlsUtils.setPaneBorderRadius(InnerPane, radius)
End Sub
Public Sub setPaneEffect(effect As String)
CFControlsUtils.setEffect(Label1, effect)
End Sub
Public Sub removeEffects()
CFControlsUtils.removeEffect(Label1)
End Sub
#End Region