org.grinvin.gui.components
Class InvariantListComponent
JList
org.grinvin.gui.components.InvariantListComponent
- AcceptsInvariant, HasAccessControl, HasSelectableValues
public class InvariantListComponent
extends JList
List component with entries of type
Invariant
. Provides drag support
for invariants. Dropping is not allowed.
TRANSFER_HANDLER
protected static final LocalTransferHandler TRANSFER_HANDLER
InvariantListComponent
public InvariantListComponent(InvariantListModel model,
int dragOperations,
int dropOperations)
Creates a new instance of InvariantListComponent
acceptsInvariant
public AcceptsInvariant.Reason acceptsInvariant(InvariantValue> clazz)
Check whether invariants that return this type can be accepted.
This is used to determine if an invariant created by an
invariant factory can be accepted, without the need to
create that invariant.
- acceptsInvariant in interface AcceptsInvariant
deleteSelectedElements
public void deleteSelectedElements()
Delete currently selected elements.
setIsReadOnly
public void setIsReadOnly(boolean isReadOnly)
setPaintWatermark
public void setPaintWatermark(boolean paintWatermark)
Configure whether to paint the watermark or not. If no watermark
is painted, the list background is completely transparent.
Note that this behavious is different from a
GraphCellListComponent
which has no watermark.
void paintComponent
protected @Override void paintComponent(Graphics g)
Adds a watermark to the list.