Class HistoryText
- java.lang.Object
-
- org.bidib.wizard.mvc.common.view.text.HistoryText
-
public class HistoryText extends Object
Controller (manager of models) for HistoryTextArea.- Version:
- $Id: HistoryText.java 13414 2008-08-24 08:38:18Z k_satoda $
- Author:
- Slava Pestov
-
-
Constructor Summary
Constructors Constructor Description HistoryText(JTextComponent text, String name)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddCurrentToHistory()Adds the currently entered item to the history.voiddoBackwardSearch()voiddoForwardSearch()voidfireActionPerformed()DocumentgetDocument()intgetIndex()intgetInputStart()Subclasses can override this to provide funky history behavior, for JTextPanes and such.booleangetInstantPopups()Returns if selecting a value from the popup should immediately fire an ActionEvent.HistoryModelgetModel()Returns the underlying history controller.StringgetText()Subclasses can override this to provide funky history behavior, for JTextPanes and such.voidhistoryNext()voidhistoryPrevious()voidsetIndex(int index)voidsetInstantPopups(boolean instantPopups)Sets if selecting a value from the popup should immediately fire an ActionEvent.voidsetModel(String name)Sets the history list controller.voidsetText(String text)Subclasses can override this to provide funky history behavior, for JTextPanes and such.voidshowPopupMenu(boolean search)voidshowPopupMenu(String t, int x, int y)static voidshowPopupMenu(JPopupMenu popup, Component comp, int x, int y, boolean point)Shows the specified popup menu, ensuring it is displayed within the bounds of the screen.
-
-
-
Constructor Detail
-
HistoryText
public HistoryText(JTextComponent text, String name)
-
-
Method Detail
-
fireActionPerformed
public void fireActionPerformed()
-
getIndex
public int getIndex()
-
setIndex
public void setIndex(int index)
-
getModel
public HistoryModel getModel()
Returns the underlying history controller.- Since:
- jEdit 4.3pre1
-
setModel
public void setModel(String name)
Sets the history list controller.- Parameters:
name- The model name- Since:
- jEdit 4.3pre1
-
setInstantPopups
public void setInstantPopups(boolean instantPopups)
Sets if selecting a value from the popup should immediately fire an ActionEvent.
-
getInstantPopups
public boolean getInstantPopups()
Returns if selecting a value from the popup should immediately fire an ActionEvent.
-
addCurrentToHistory
public void addCurrentToHistory()
Adds the currently entered item to the history.
-
doBackwardSearch
public void doBackwardSearch()
-
doForwardSearch
public void doForwardSearch()
-
historyPrevious
public void historyPrevious()
-
historyNext
public void historyNext()
-
getDocument
public Document getDocument()
-
getText
public String getText()
Subclasses can override this to provide funky history behavior, for JTextPanes and such.
-
setText
public void setText(String text)
Subclasses can override this to provide funky history behavior, for JTextPanes and such.
-
getInputStart
public int getInputStart()
Subclasses can override this to provide funky history behavior, for JTextPanes and such.
-
showPopupMenu
public void showPopupMenu(String t, int x, int y)
-
showPopupMenu
public void showPopupMenu(boolean search)
-
showPopupMenu
public static void showPopupMenu(JPopupMenu popup, Component comp, int x, int y, boolean point)
Shows the specified popup menu, ensuring it is displayed within the bounds of the screen.- Parameters:
popup- The popup menucomp- The component to show it forx- The x co-ordinatey- The y co-ordinatepoint- If true, then the popup originates from a single point; otherwise it will originate from the component itself. This affects positioning in the case where the popup does not fit onscreen.- Since:
- jEdit 4.1pre1
-
-