| java.lang.Object org.netbeans.editor.FindSupport
FindSupport | public class FindSupport (Code) | | Find management
author: Miloslav Metelka version: 1.00 |
Inner Class :public interface FinderCreator | |
Inner Class :public static class DefaultFinderCreator implements FinderCreator | |
Method Summary | |
public void | addPropertyChangeListener(PropertyChangeListener l) Add weak listener to listen to change of any property. | public synchronized void | addPropertyChangeListener(String findPropertyName, PropertyChangeListener l) | public boolean | find(Map props, boolean oppositeDir) Find the text from the caret position. | public int[] | findInBlock(JTextComponent c, int startPos, int blockStartPos, int blockEndPos, Map props, boolean oppositeDir) Find the searched expression
Parameters: startPos - position from which to search. | void | firePropertyChange(String settingName, Object oldValue, Object newValue) | int[] | getBlocks(int[] blocks, BaseDocument doc, int startPos, int endPos) | public FinderFactory.BlocksFinder | getBlocksFinder(BaseDocument doc, Map props) | public Map | getDefaultFindProperties() | public Map | getFindProperties() | public Object | getFindProperty(String name) | public static FindSupport | getFindSupport() | public FinderCreator | getFinderCreator() | Object | getPropertyNoInit(String name) Get find property without performing initialization of find properties. | public FinderFactory.StringFinder | getStringBwdFinder(BaseDocument doc, Map props) | public FinderFactory.StringFinder | getStringFinder(BaseDocument doc, Map props) | public int | getWrapSearchMarkPos(BaseDocument doc) | public boolean | incSearch(Map props) | public void | incSearchReset() | public void | putFindProperties(Map propsToAdd) Add/replace properties from some other map to current find properties. | public void | putFindProperty(String name, Object newValue) Set find property with specified name and fire change. | public void | removePropertyChangeListener(PropertyChangeListener l) | public boolean | replace(Map props, boolean oppositeDir) | public void | replaceAll(Map props) | public void | setFinderCreator(FinderCreator finderCreator) | public void | setWrapSearchMarkPos(BaseDocument doc, int pos) |
finderCreator | FinderCreator finderCreator(Code) | | Current finder creator. It can be changed by setFinderCreator.
|
addPropertyChangeListener | public void addPropertyChangeListener(PropertyChangeListener l)(Code) | | Add weak listener to listen to change of any property. The caller must
hold the listener object in some instance variable to prevent it from
being garbage collected.
|
find | public boolean find(Map props, boolean oppositeDir)(Code) | | Find the text from the caret position.
Parameters: props - search properties Parameters: oppositeDir - whether search in opposite direction |
findInBlock | public int[] findInBlock(JTextComponent c, int startPos, int blockStartPos, int blockEndPos, Map props, boolean oppositeDir) throws BadLocationException(Code) | | Find the searched expression
Parameters: startPos - position from which to search. It must be inside the block. Parameters: blockStartPos - starting position of the block. It must be valid positiongreater or equal than zero. It must be lower than or equal toblockEndPos (except blockEndPos=-1). Parameters: blockEndPos - ending position of the block. It can be -1 for the end ofdocument. It must be greater or equal than blockStartPos(except blockEndPos=-1). Parameters: props - search properties Parameters: oppositeDir - whether search in opposite direction Parameters: displayWrap - whether display messages about the wrapping either null when nothing was found or integer array with threemembers ret[0] - starting position of the found string ret[1] -ending position of the found string ret[2] - 1 or 0 when wrap wasor wasn't performed in order to find the string |
getDefaultFindProperties | public Map getDefaultFindProperties()(Code) | | |
getFindProperties | public Map getFindProperties()(Code) | | |
getFindProperty | public Object getFindProperty(String name)(Code) | | Get find property with specified name
|
getFindSupport | public static FindSupport getFindSupport()(Code) | | Get shared instance of find support
|
getFinderCreator | public FinderCreator getFinderCreator()(Code) | | Get current finder creator
|
getPropertyNoInit | Object getPropertyNoInit(String name)(Code) | | Get find property without performing initialization of find properties.
This is useful for example for base document when it wants to query
whether it should do highlight search.
|
getWrapSearchMarkPos | public int getWrapSearchMarkPos(BaseDocument doc)(Code) | | Get position of wrap mark for some document
|
incSearch | public boolean incSearch(Map props)(Code) | | |
incSearchReset | public void incSearchReset()(Code) | | |
putFindProperties | public void putFindProperties(Map propsToAdd)(Code) | | Add/replace properties from some other map to current find properties. If
the added properties are different than the original ones, the property
change is fired.
|
putFindProperty | public void putFindProperty(String name, Object newValue)(Code) | | Set find property with specified name and fire change.
|
removePropertyChangeListener | public void removePropertyChangeListener(PropertyChangeListener l)(Code) | | Remove listener for changes in properties
|
replaceAll | public void replaceAll(Map props)(Code) | | |
setFinderCreator | public void setFinderCreator(FinderCreator finderCreator)(Code) | | Set customized finder creator
|
setWrapSearchMarkPos | public void setWrapSearchMarkPos(BaseDocument doc, int pos)(Code) | | Set new position of wrap mark for some document
|
|
|