Line | |
---|
1 | // License: GPL. For details, see LICENSE file.
|
---|
2 | package views;
|
---|
3 |
|
---|
4 | import javax.swing.JButton;
|
---|
5 |
|
---|
6 | import model.TagCatalog.IndoorObject;
|
---|
7 |
|
---|
8 | /**
|
---|
9 | * Button with a specific IndoorObject attached to it.
|
---|
10 | * @author egru
|
---|
11 | *
|
---|
12 | */
|
---|
13 | @SuppressWarnings("serial")
|
---|
14 | class PresetButton extends JButton {
|
---|
15 |
|
---|
16 | private IndoorObject indoorObject;
|
---|
17 |
|
---|
18 | PresetButton(IndoorObject object) {
|
---|
19 | this.setIndoorObject(object);
|
---|
20 | }
|
---|
21 |
|
---|
22 | public IndoorObject getIndoorObject() {
|
---|
23 | return this.indoorObject;
|
---|
24 | }
|
---|
25 |
|
---|
26 | public void setIndoorObject(IndoorObject object) {
|
---|
27 | this.indoorObject = object;
|
---|
28 | this.setText(indoorObject.toString());
|
---|
29 | this.setToolTipText("Fast Tag: "+indoorObject.toString());
|
---|
30 | }
|
---|
31 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.