home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 1998 November
/
Chip_1998-11_cd.bin
/
tema
/
Cafe
/
WDESAMPL.BIN
/
FindReplace.java
< prev
next >
Wrap
Text File
|
1997-08-28
|
2KB
|
65 lines
import java.lang.*;
import java.awt.*;
class FindReplace extends java.lang.Object
{
public FindReplace(String findthis, TextComponent tc)
{
this(findthis,"",tc);
}
public FindReplace(String findthis, String replacethis, TextComponent thebody)
{
setFind(findthis);
setReplace(replacethis);
setBody(thebody);
}
String m_findme;
String m_replace;
boolean m_matchCase;
boolean m_selectedArea;
boolean m_replaceAll;
boolean m_cancel;
boolean m_foundIt;
boolean m_replaceIt;
int m_numoccur = 0;
int m_current_index = 0;
java.awt.TextComponent m_body;
public void setReplaceIt(boolean replace) { m_replaceIt = replace; }
public boolean isReplaceIt() { return m_replaceIt; }
public void setBody(TextComponent body) { m_body = body; }
public TextComponent getBody() { return m_body; }
public void setFind(String findthis) { m_findme = findthis;}
public String getFind() { return m_findme; }
public void setReplace(String replacethis) { m_replace = replacethis; }
public String getReplace() { return m_replace; }
public void setIndex(int index) { m_current_index = index; }
public int getIndex() { return m_current_index; }
public void setFoundIt(boolean foundit) { m_foundIt = foundit; }
public boolean isFoundIt() { return m_foundIt; }
public void setOccur(int numtimes) { m_numoccur = numtimes; }
public int getOccur() { return m_numoccur; }
public void incOccur() { m_numoccur++; }
public void setCase(boolean matchcase) { m_matchCase = matchcase; }
public boolean isCase() { return m_matchCase; }
public void setSelectArea(boolean select) { m_selectedArea = select; }
public boolean isSelectArea() { return m_selectedArea; }
public void setReplaceAll(boolean replaceall) { m_replaceAll = replaceall; }
public boolean isReplaceAll() { return m_replaceAll; }
public void setCancel(boolean cancel) { m_cancel = cancel; }
public boolean isCancel() { return m_cancel; }
}