|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.northwestern.at.wordhoard.swing.find.CriterionComponent
abstract class CriterionComponent
An abstract base class for search criterion components.
Constructor Summary | |
---|---|
CriterionComponent()
|
Method Summary | |
---|---|
(package private) java.lang.String |
checkTaggingData(Corpus corpus,
Work work,
WorkPart workPart,
long tag)
Checks tagging data. |
(package private) SearchCriterion |
getOtherRowValue(java.lang.Class cls)
Gets the value of another row. |
(package private) javax.swing.JComponent |
getSwingComponent()
Gets the Swing component. |
(package private) abstract SearchCriterion |
getValue()
Gets the value of the component. |
(package private) FindWindow |
getWindow()
Gets the parent find window. |
(package private) void |
handleValueChanged(java.lang.Class cls,
SearchCriterion oldVal,
SearchCriterion newVal)
Handles a value changed event in some other criterion. |
(package private) javax.swing.JComponent |
init(FindWindow window,
Row row,
SearchCriterion val)
Initializes the component. |
(package private) abstract javax.swing.JComponent |
init(SearchCriterion val)
Initializes the component. |
(package private) void |
notifyWindow(SearchCriterion oldVal,
SearchCriterion newVal)
Notifies the parent window that the value has changed. |
(package private) void |
rebuildSelf()
Rebuilds ourself. |
(package private) abstract java.lang.String |
setCriteria(SearchCriteria searchCriteria)
Sets the criteria value. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
CriterionComponent()
Method Detail |
---|
javax.swing.JComponent init(FindWindow window, Row row, SearchCriterion val) throws java.lang.Exception
window
- Parent find window.row
- Parent row.val
- Initial value, or null.
java.lang.Exception
abstract javax.swing.JComponent init(SearchCriterion val) throws java.lang.Exception
Subclasses must implement this method.
val
- Initial value, or null.
java.lang.Exception
abstract SearchCriterion getValue()
Subclasses must implement this method.
abstract java.lang.String setCriteria(SearchCriteria searchCriteria)
Subclasses must implement this method.
searchCriteria
- Search criteria.
void notifyWindow(SearchCriterion oldVal, SearchCriterion newVal)
This method must be called by subclasses whenever a criteria value changes.
oldVal
- Old value.newVal
- New value. void rebuildSelf()
Subclasses must call this method if they want to rebuild themselves in any context other than responding to value change events. The method sends a value changed event back to the calling object with all three arguments null (for the class and old and new values). The object should respond to this special event by rebuilding itself using its current state. This ugly mechanism guarantees that the Swing component is properly sized, positioned, revalidated, and repainted.
void handleValueChanged(java.lang.Class cls, SearchCriterion oldVal, SearchCriterion newVal) throws java.lang.Exception
Subclasses may override this method if they need to react to changes in other criteria. The default implementation does nothing.
On entry, oldVal != newVal is guaranteed.
cls
- The class of the criterion that changed.oldVal
- Old value. Null if the row has just
been created.newVal
- New value. Null if the row has just been
deleted.
java.lang.Exception
SearchCriterion getOtherRowValue(java.lang.Class cls)
cls
- Criterion class of the other row.
FindWindow getWindow()
javax.swing.JComponent getSwingComponent()
java.lang.String checkTaggingData(Corpus corpus, Work work, WorkPart workPart, long tag)
corpus
- Corpus or null.work
- Work or null.workPart
- Work part or null.tag
- Tag mask to check.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |