public class Mask
extends java.lang.Object
Symbol.getPredefinedSymbol(lavesdk.gui.widgets.Symbol.PredefinedSymbol)
to get a predefined
symbol as a mask icon.
ExecutionTableColumn
and this string should be replaced by "CBA".mask = new ExecutionTableMask("ABC", "CBA");
. Secondly you add this mask to
the column and all cell contents of this column that equals "ABC" are replaced by "CBA".Integer.MAX_VALUE
in an ExecutionTable
and this value should be replaced by an infinity
symbol.mask = new ExecutionTableMask(Integer.MAX_VALUE, Symbol.getPredefinedSymbol(PredefinedSymbol.INFINITY);
.
Secondly you add this mask to the column and all cell contents of this column that equals Integer.MAX_VALUE
are replaced by the symbol.Modifier and Type | Class and Description |
---|---|
static class |
Mask.Type
The type of a mask.
|
Constructor and Description |
---|
Mask(java.lang.Object object,
javax.swing.Icon mask)
Creates a new mask.
|
Mask(java.lang.Object object,
java.lang.Object mask)
Creates a new mask.
|
Modifier and Type | Method and Description |
---|---|
javax.swing.Icon |
getMaskIcon()
Gets the mask icon if
getType() is Mask.Type.ICON_MASK . |
java.lang.Object |
getMaskObject()
Gets the mask object if
getType() is Mask.Type.OBJECT_MASK . |
java.lang.Object |
getObject()
Gets the object that should be masked.
|
Mask.Type |
getType()
Gets the type of the mask.
|
boolean |
matches(java.lang.Object o)
Indicates whether the given object matches the mask.
|
public Mask(java.lang.Object object, java.lang.Object mask)
object
- the object that should be maskedmask
- the mask (should have the same type as the object)public Mask(java.lang.Object object, javax.swing.Icon mask) throws java.lang.IllegalArgumentException
object
- the object that should be maskedmask
- the mask like a predefined Symbol
java.lang.IllegalArgumentException
- public final Mask.Type getType()
public final java.lang.Object getObject()
S
be the set of objects that could be masked and let m
be the mask. For all o
in S
with m.matches(o)
o
is replaced by the mask which is either the mask object (getMaskObject()
)
or the mask icon (getMaskIcon()
).
matches(Object)
to check if an object matches to the mask.null
)matches(Object)
public final java.lang.Object getMaskObject()
getType()
is Mask.Type.OBJECT_MASK
.
S
be the set of objects that could be masked and let m
be the mask. For all o
in S
with m.matches(o)
o
is replaced by the mask which is either the mask object (getMaskObject()
)
or the mask icon (getMaskIcon()
).matches(Object)
public final javax.swing.Icon getMaskIcon()
getType()
is Mask.Type.ICON_MASK
.
S
be the set of objects that could be masked and let m
be the mask. For all o
in S
with m.matches(o)
o
is replaced by the mask which is either the mask object (getMaskObject()
)
or the mask icon (getMaskIcon()
).matches(Object)
public boolean matches(java.lang.Object o)
S
be the set of objects that could be masked and let m
be the mask. For all o
in S
with m.matches(o)
o
is replaced by the mask which is either the mask object (getMaskObject()
)
or the mask icon (getMaskIcon()
).o
- the object otrue
if o matches to the mask's object otherwise false