org.grinvin.gui.components

Class FilterListComponent

Implemented Interfaces:
AcceptsFilter, AcceptsInvariant, HasAccessControl, HasSelectableValues

public class FilterListComponent
extends JList
implements HasAccessControl, HasSelectableValues, AcceptsInvariant, AcceptsFilter

List component with entries of type GraphFilter.

Nested Class Summary

static class
FilterListComponent.CombineSelectedAND
static class
FilterListComponent.CombineSelectedOR
static class
FilterListComponent.NegateSelectedElements
static class
FilterListComponent.SplitSelectedElements

Field Summary

protected static LocalTransferHandler
TRANSFER_HANDLER

Constructor Summary

FilterListComponent(FilterListModel model)
FilterListComponent(FilterListModel model, int dragOperations, int dropOperations)
Creates a new instance of InvariantListComponent

Method Summary

AcceptsInvariant.Reason
acceptsInvariant(InvariantValue> clazz)
AcceptsInvariant.Reason
acceptsInvariant(Invariant invariant)
boolean
addFilter(GraphFilter filter)
Accept a filter.
AcceptsInvariant.Reason
addInvariant(Invariant invariant)
void
combineSelectedFilters(CompoundGraphFilter.Operator operator)
Combine the currently selected filters into one filter.
void
deleteSelectedElements()
Delete currently selected elements.
int
getDragOperations()
int
getDropOperations()
boolean
isReadOnly()
void
setIsReadOnly(boolean isReadOnly)
void
setPaintWatermark(boolean paintWatermark)
Configure whether to paint the watermark or not.
void
splitSelectedElements()
Split the selected filters again.
void
toggleNegagtionSelectedElements()
Toggle the negation of the currently selected filters.
protected @Override
void paintComponent(Graphics g)
Adds a watermark to the list.

Field Details

TRANSFER_HANDLER

protected static final LocalTransferHandler TRANSFER_HANDLER

Constructor Details

FilterListComponent

public FilterListComponent(FilterListModel model)

FilterListComponent

public FilterListComponent(FilterListModel model,
                           int dragOperations,
                           int dropOperations)
Creates a new instance of InvariantListComponent

Method Details

acceptsInvariant

public AcceptsInvariant.Reason acceptsInvariant(InvariantValue> clazz)
Specified by:
acceptsInvariant in interface AcceptsInvariant

acceptsInvariant

public AcceptsInvariant.Reason acceptsInvariant(Invariant invariant)
Specified by:
acceptsInvariant in interface AcceptsInvariant

addFilter

public boolean addFilter(GraphFilter filter)
Accept a filter.
Specified by:
addFilter in interface AcceptsFilter

addInvariant

public AcceptsInvariant.Reason addInvariant(Invariant invariant)
Specified by:
addInvariant in interface AcceptsInvariant

combineSelectedFilters

public void combineSelectedFilters(CompoundGraphFilter.Operator operator)
Combine the currently selected filters into one filter.

deleteSelectedElements

public void deleteSelectedElements()
Delete currently selected elements.

getDragOperations

public int getDragOperations()
Specified by:
getDragOperations in interface HasAccessControl

getDropOperations

public int getDropOperations()
Specified by:
getDropOperations in interface HasAccessControl

isReadOnly

public boolean isReadOnly()
Specified by:
isReadOnly in interface HasAccessControl

setIsReadOnly

public void setIsReadOnly(boolean isReadOnly)

setPaintWatermark

public void setPaintWatermark(boolean paintWatermark)

splitSelectedElements

public void splitSelectedElements()
Split the selected filters again.

toggleNegagtionSelectedElements

public void toggleNegagtionSelectedElements()
Toggle the negation of the currently selected filters.

void paintComponent

protected @Override void paintComponent(Graphics g)
Adds a watermark to the list.