public class MustMultChoice extends java.lang.Object implements ContextHelp, ModifiedInformer
Modifier and Type | Field and Description |
---|---|
protected MustMultChoiceModel |
mainTableModel |
protected javax.swing.JTable |
table |
Constructor and Description |
---|
MustMultChoice(DataObject Key,
java.lang.String[] keyColumns,
java.lang.String[] keyHeaders)
Constructs a new multiple choice component.
|
Modifier and Type | Method and Description |
---|---|
void |
free()
Releases external resources.
|
java.lang.String |
getHelpTarget() |
java.lang.String |
getHelpTopic() |
MustMultChoiceModel |
getModel()
Returns the multiple choice model.
|
java.lang.String |
getSnapshot()
Returns a snapshot of user's choice to be recovered by
reset(String) . |
javax.swing.JTable |
getTable()
Returns the table e.g. to be added to a viewport.
|
boolean |
isModified()
Indicates whether the component's value differs from its initial value.
|
boolean |
isRequirementUnfulfilled()
Returns true if the component's value is mandatory but not filled.
|
boolean |
isValid()
Returns true if the component's value is valid.
|
void |
requestFocus()
Set focus on the receiving component if isRequestFocusEnabled returns true.
|
void |
reset(java.lang.String snapshot)
Recovers some user choice represented by a snapshot build by
getSnapshot() . |
void |
selectAll()
Selects all input of the component, if it is supported - e.g. in JTextField.
|
void |
setAllFalse()
Sets all selections to false.
|
void |
setEditable(boolean editable)
Sets the flag that determines whether or not this component is editable.
|
void |
setHelpContext(java.lang.String helpTopic)
Sets the component's context help.
|
void |
setHelpContext(java.lang.String helpTopic,
java.lang.String helpTarget)
Sets the component's context help.
|
void |
setPreferedColumnSize(int[] cs)
Sets the preferred column sizes of the table.
|
void |
setRequired(boolean required)
Sets the previously added component to be mandatory.
|
void |
synchronize(MustMultChoice MustMultChoiceToSynchronize) |
protected javax.swing.JTable table
protected MustMultChoiceModel mainTableModel
public MustMultChoice(DataObject Key, java.lang.String[] keyColumns, java.lang.String[] keyHeaders)
key
- the key containing data object, e.g. a groupkeyColumns
- the columns of the key table to be displayedkeyHeaders
- the headers of the table which represents the keyspublic void setHelpContext(java.lang.String helpTopic)
helpTopic
- the context help's topicpublic void setHelpContext(java.lang.String helpTopic, java.lang.String helpTarget)
setHelpContext
in interface ContextHelp
helpTopic
- the context help's topichelpTarget
- the context help's targetpublic java.lang.String getHelpTopic()
getHelpTopic
in interface ContextHelp
public java.lang.String getHelpTarget()
getHelpTarget
in interface ContextHelp
public javax.swing.JTable getTable()
public void setPreferedColumnSize(int[] cs)
cs
- contains the sizes of the displayable columns from left to rightpublic MustMultChoiceModel getModel()
public void setRequired(boolean required)
required
- whether the component is mandatory or notpublic boolean isValid()
public boolean isRequirementUnfulfilled()
public boolean isModified()
ModifiedInformer
isModified
in interface ModifiedInformer
public void selectAll()
public void requestFocus()
public java.lang.String getSnapshot()
reset(String)
.reset(String)
public void reset(java.lang.String snapshot)
getSnapshot()
.snapshot
- the snapshot the represents former user choicepublic void setAllFalse()
public void setEditable(boolean editable)
editable
- a flag indicating whether this component should be user editablepublic void synchronize(MustMultChoice MustMultChoiceToSynchronize)
MustMultChoiceToSynchronize
- public void free()
Copyright 1998-2023 Christoph Mueller, Kaerntner Str. 56, D-70469 Stuttgart, Germany, https://www.perpus.de