|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
gate.gui.annedit.SearchAndAnnotatePanel
public class SearchAndAnnotatePanel
Build a GUI for searching and annotating annotations in a text.
It needs to be called from a OwnedAnnotationEditor
.
Here is an example how to add it to a JPanel panel.
SearchAndAnnotatePanel searchPanel = new SearchAndAnnotatePanel(panel.getBackground(), this, window); panel.add(searchPanel);
Nested Class Summary | |
---|---|
protected class |
SearchAndAnnotatePanel.AnnotateAllMatchesAction
|
protected class |
SearchAndAnnotatePanel.AnnotateMatchAction
|
protected class |
SearchAndAnnotatePanel.FindFirstAction
|
protected class |
SearchAndAnnotatePanel.FindNextAction
|
protected class |
SearchAndAnnotatePanel.FindPreviousAction
|
protected class |
SearchAndAnnotatePanel.SmallButton
A smaller JButton with less margins. |
protected class |
SearchAndAnnotatePanel.UndoAnnotateAllMatchesAction
Remove the annotations added by the last action that annotate all matches. |
Nested classes/interfaces inherited from class javax.swing.JPanel |
---|
JPanel.AccessibleJPanel |
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class java.awt.Container |
---|
Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy |
Field Summary | |
---|---|
protected LinkedList<Annotation> |
annotateAllAnnotationsID
List of annotations ID that have been created by the AnnotateAllMatchesAction. |
protected SearchAndAnnotatePanel.AnnotateAllMatchesAction |
annotateAllMatchesAction
|
protected SearchAndAnnotatePanel.SmallButton |
annotateAllMatchesSmallButton
|
protected SearchAndAnnotatePanel.AnnotateMatchAction |
annotateMatchAction
|
protected AnnotationSetListener |
annotationSetListener
Listener for updating the list of searched annotations. |
protected String |
content
|
protected SearchAndAnnotatePanel.FindFirstAction |
findFirstAction
|
protected SearchAndAnnotatePanel.FindNextAction |
findNextAction
|
protected SearchAndAnnotatePanel.FindPreviousAction |
findPreviousAction
|
protected SearchAndAnnotatePanel.SmallButton |
firstSmallButton
|
protected JButton |
helpRegExpButton
Help button that gives predefined regular expressions. |
protected LinkedList<Vector<Integer>> |
matchedIndexes
Start and end index of the all the matches. |
protected Matcher |
matcher
Shared instance of the matcher. |
protected int |
nextMatchStartsFrom
|
protected Box |
searchBox
The box used to host the search pane. |
protected JCheckBox |
searchCaseSensChk
Checkbox for enabling case sensitive searching. |
protected JCheckBox |
searchEnabledCheck
Checkbox for showing the search UI. |
protected JCheckBox |
searchHighlightsChk
Checkbox for enabling whole word searching. |
protected JPanel |
searchPane
The pane containing the UI for search and annotate functionality. |
protected JCheckBox |
searchRegExpChk
Checkbox for enabling RegEx searching. |
protected JTextField |
searchTextField
Text field for searching |
protected JCheckBox |
searchWholeWordsChk
Checkbox for enabling whole word searching. |
protected SearchAndAnnotatePanel.UndoAnnotateAllMatchesAction |
undoAnnotateAllMatchesAction
|
Fields inherited from class javax.swing.JComponent |
---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
Fields inherited from class java.awt.Component |
---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
SearchAndAnnotatePanel(Color color,
OwnedAnnotationEditor annotationEditor,
Window window)
|
Method Summary | |
---|---|
AnnotationEditorOwner |
getOwner()
|
protected void |
initGui(Color color)
Build the GUI with JPanels and Boxes. |
protected void |
initListeners()
|
Methods inherited from class javax.swing.JPanel |
---|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected AnnotationSetListener annotationSetListener
protected Box searchBox
protected JPanel searchPane
protected JTextField searchTextField
protected JCheckBox searchRegExpChk
protected JButton helpRegExpButton
protected JCheckBox searchCaseSensChk
protected JCheckBox searchWholeWordsChk
protected JCheckBox searchHighlightsChk
protected JCheckBox searchEnabledCheck
protected Matcher matcher
protected SearchAndAnnotatePanel.FindFirstAction findFirstAction
protected SearchAndAnnotatePanel.FindPreviousAction findPreviousAction
protected SearchAndAnnotatePanel.FindNextAction findNextAction
protected SearchAndAnnotatePanel.AnnotateMatchAction annotateMatchAction
protected SearchAndAnnotatePanel.AnnotateAllMatchesAction annotateAllMatchesAction
protected SearchAndAnnotatePanel.UndoAnnotateAllMatchesAction undoAnnotateAllMatchesAction
protected int nextMatchStartsFrom
protected String content
protected LinkedList<Vector<Integer>> matchedIndexes
protected LinkedList<Annotation> annotateAllAnnotationsID
protected SearchAndAnnotatePanel.SmallButton firstSmallButton
protected SearchAndAnnotatePanel.SmallButton annotateAllMatchesSmallButton
Constructor Detail |
---|
public SearchAndAnnotatePanel(Color color, OwnedAnnotationEditor annotationEditor, Window window)
Method Detail |
---|
protected void initGui(Color color)
color
- Color of the background.
_ _ _ _ _
V Search & Annotate |_| Case |_| Regexp |_| Whole |_| Highlights
_______________________________________________
|V_Searched_Expression__________________________| |?|
|First| |Prev.| |Next| |Annotate| |Ann. all next|protected void initListeners()
public AnnotationEditorOwner getOwner()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |