Class WDataTable.ActionConstraint
- java.lang.Object
-
- com.github.bordertech.wcomponents.WDataTable.ActionConstraint
-
- All Implemented Interfaces:
Serializable
- Enclosing class:
- WDataTable
public static final class WDataTable.ActionConstraint extends Object implements Serializable
Describes a constraint on a table action.- Author:
- Yiannis Paschalidis
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ActionConstraint(int minSelectedRowCount, int maxSelectedRowCount, boolean error, String message)
Creates an action constraint.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getMaxSelectedRowCount()
Indicates the maximum number of rows which can be selected for the error/warning not to occur.String
getMessage()
int
getMinSelectedRowCount()
Indicates the minimum number of rows which must be selected for the error/warning not to occur.boolean
isError()
Indicates whether the constraint is an error or warning.void
setError(boolean error)
Sets whether the constraint is an error or warning.void
setMaxSelectedRowCount(int maxSelectedRowCount)
void
setMessage(String message)
void
setMinSelectedRowCount(int minSelectedRowCount)
-
-
-
Constructor Detail
-
ActionConstraint
public ActionConstraint(int minSelectedRowCount, int maxSelectedRowCount, boolean error, String message)
Creates an action constraint.- Parameters:
minSelectedRowCount
- the minimum number of rows which must be selected to fulfil the constraint, or zero for any number of rows.maxSelectedRowCount
- the maximum number of rows which can be selected to fulfil the constraint, or zero for any number of rows.error
- true if the constaint is an error, false for a warning.message
- the message to display when the constraint is not met.
-
-
Method Detail
-
getMinSelectedRowCount
public int getMinSelectedRowCount()
Indicates the minimum number of rows which must be selected for the error/warning not to occur.- Returns:
- the minimum selected row count.
-
setMinSelectedRowCount
public void setMinSelectedRowCount(int minSelectedRowCount)
- Parameters:
minSelectedRowCount
- The minimum selected row count to set.
-
getMaxSelectedRowCount
public int getMaxSelectedRowCount()
Indicates the maximum number of rows which can be selected for the error/warning not to occur.- Returns:
- the maximum selected row count.
-
setMaxSelectedRowCount
public void setMaxSelectedRowCount(int maxSelectedRowCount)
- Parameters:
maxSelectedRowCount
- The maximum selected row count to set.
-
isError
public boolean isError()
Indicates whether the constraint is an error or warning.- Returns:
- true if the constaint is an error, false for a warning.
-
setError
public void setError(boolean error)
Sets whether the constraint is an error or warning.- Parameters:
error
- true if the constaint is an error, false for a warning.
-
getMessage
public String getMessage()
- Returns:
- Returns the message.
-
setMessage
public void setMessage(String message)
- Parameters:
message
- The message to set.
-
-