-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathStylerOwner.java
More file actions
64 lines (54 loc) · 1.96 KB
/
Copy pathStylerOwner.java
File metadata and controls
64 lines (54 loc) · 1.96 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
package snap.styler;
import snap.view.SNPViewController;
import snap.view.ViewEvent;
/**
* A simple subclass of view controller to work with a Styler.
*/
public class StylerOwner extends SNPViewController {
// The Styler
private Styler _styler;
/**
* Returns the styler.
*/
public Styler getStyler() { return _styler; }
/**
* Sets the styler.
*/
public void setStyler(Styler aStyler)
{
_styler = aStyler;
}
/**
* Initializes the UI panel. This method provides the ability to alter any settings or components of the View that
* were not set by {@link #createUI()}.
* <br><br>
* This method is called automatically by SnapKit after the view has been initialized, and does not need to be
* called inside of an implementation.
*/
@Override
protected void initUI() {
}
/**
* Called automatically by SnapKit after a user reacts with a UI component, this method allows the resetting of
* the UI. It will not cause accidental {@code respondUI(ViewEvent)} calls. It allows the user to reset or change
* aspects of the UI after an interaction, such as might be required for an animation or image draw.
* <br> <br>
* This method is overridable with no default implementation.
*/
@Override
protected void resetUI() {
}
/**
* Called automatically by SnapKit when it detects a ViewEvent. This method should be overridden to respond to UI
* controls, and provide feedback to user interactions.
* <br>
* If you are coming from a Swing environment, this class serves the same purposes as the action listeners attached
* to each individual component. In this case, all of the events are funnelled into the same method, making it
* easier to keep track of interactions. Everything is managed from the same location.
*
* @param anEvent
*/
@Override
protected void respondUI(ViewEvent anEvent) {
}
}