Skip to content

Package: DetailBarPropertyEntry

DetailBarPropertyEntry

nameinstructionbranchcomplexitylinemethod
DetailBarPropertyEntry(PropertyBarEntry)
M: 0 C: 15
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 6
100%
M: 0 C: 1
100%
DetailBarPropertyEntry(PropertyBarEntry, boolean)
M: 18 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 7 C: 0
0%
M: 1 C: 0
0%
DetailBarPropertyEntry(PropertyBarEntry, boolean, boolean, int)
M: 11 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 4 C: 0
0%
M: 1 C: 0
0%
accept(DetailBarVisitor)
M: 6 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 2 C: 0
0%
M: 1 C: 0
0%
getPosition()
M: 3 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
getPropertyBarEntry()
M: 0 C: 3
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
isEditable()
M: 3 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
isReadOnly()
M: 3 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%

Coverage

1: package networkconfigurator;
2:
3: /**
4: *
5: * @author HFW416 Jannik
6: */
7: public class DetailBarPropertyEntry {
8:         /**
9:          * the value of the entry for the detail bar property.
10:          */
11:         private final PropertyBarEntry propertyBarEntry;
12:         /**
13:          * if the value is true, the content of the entry is displayed in an input field.
14:          */
15:         private boolean editable = false;
16:         /**
17:          * if the value is true, the content of the entry can not be changed.
18:          */
19:         private boolean readOnly = false;
20:         /**
21:          * represents the position in the detail bar. If the value is -1, the entry is appended to the
22:          * end of the bar.
23:          */
24:         private int position = -1;
25:
26:         /**
27:          * Constructor for the detail bar property entry.
28:          *
29:          * @param value
30:          * the value of the entry for the detail bar property.
31:          */
32:         public DetailBarPropertyEntry(final PropertyBarEntry value) {
33:                 super();
34:                 this.propertyBarEntry = value;
35:         }
36:
37:         /**
38:          * Constructor for the detail bar property entry.
39:          *
40:          * @param value
41:          * the value of the entry for the detail bar property.
42:          * @param editable
43:          * if the value is true, the content of the entry is displayed in an input field.
44:          */
45:         public DetailBarPropertyEntry(final PropertyBarEntry value, final boolean editable) {
46:                 super();
47:                 this.propertyBarEntry = value;
48:                 this.editable = editable;
49:         }
50:
51:         /**
52:          * Constructor for the detail bar property entry.
53:          *
54:          * @param value
55:          * the value of the entry for the detail bar property.
56:          * @param editable
57:          * if the value is true, the content of the entry is displayed in an input field.
58:          * @param readOnly
59:          * if the value is true, the content of the entry can not be changed.
60:          * @param position
61:          * represents the position in the detail bar. If the value is -1, the entry is
62:          * appended to the end of the bar.
63:          */
64:         public DetailBarPropertyEntry(final PropertyBarEntry value, final boolean editable,
65:                         final boolean readOnly, final int position) {
66:                 this(value, editable);
67:                 this.readOnly = readOnly;
68:                 this.position = position;
69:         }
70:
71:         /**
72:          * getter for isEditable.
73:          *
74:          * @return isEditable
75:          */
76:         public final boolean isEditable() {
77:                 return editable;
78:         }
79:
80:         /**
81:          * getter for isReadOnly.
82:          *
83:          * @return isReadOnly
84:          */
85:         public final boolean isReadOnly() {
86:                 return readOnly;
87:         }
88:
89:         /**
90:          * getter for getPosition.
91:          *
92:          * @return getPosition
93:          */
94:         public final int getPosition() {
95:                 return position;
96:         }
97:
98:         /**
99:          * getter for getValue.
100:          *
101:          * @return getValue
102:          */
103:         public final PropertyBarEntry getPropertyBarEntry() {
104:                 return propertyBarEntry;
105:         }
106:
107:         /**
108:          *
109:          * accept-method for nodevisitor (VisitorPattern).
110:          *
111:          * @param visitor
112:          * the visitor.
113:          */
114:         public final void accept(final DetailBarVisitor visitor) {
115:                 this.propertyBarEntry.accept(visitor);
116:         }
117: }