TIBCO ActiveMatrix Mediation Implementation Type v3.3.1

com.tibco.amsb.core.task.ui.property
Class MultiLineTextListener

java.lang.Object
  extended by com.tibco.amsb.core.task.ui.property.MultiLineTextListener
All Implemented Interfaces:
java.util.EventListener, org.eclipse.swt.events.ModifyListener, org.eclipse.swt.internal.SWTEventListener

public class MultiLineTextListener
extends java.lang.Object
implements org.eclipse.swt.events.ModifyListener

A text area wishing to expand itself as the user adds lines can add this modify listener and the expansion will happen automagically.


Field Summary
protected  int lastLineCount
           
protected  int maximumLineCount
           
protected  int minimumLineCount
           
protected  org.eclipse.swt.custom.StyledText styledText
           
protected  org.eclipse.swt.widgets.Text text
           
 
Constructor Summary
MultiLineTextListener(org.eclipse.swt.custom.StyledText text)
          Use this constructor if the text box is a styled text widget.
MultiLineTextListener(org.eclipse.swt.custom.StyledText text, int min, int max)
          Use this constructor if the text box is a styled text widget.
MultiLineTextListener(org.eclipse.swt.widgets.Text text)
          Use this constructor for normal text widgets.
MultiLineTextListener(org.eclipse.swt.widgets.Text text, int min, int max)
          Use this constribute for Text widgets.
 
Method Summary
protected  void forceLayoutForScrollParent(org.eclipse.swt.custom.StyledText text)
           
protected  void forceLayoutForScrollParent(org.eclipse.swt.widgets.Text text)
           
 void modifyText(org.eclipse.swt.events.ModifyEvent event)
          Internal method used to watch the text widget and adjust the size as the text is changed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

text

protected org.eclipse.swt.widgets.Text text

styledText

protected org.eclipse.swt.custom.StyledText styledText

lastLineCount

protected int lastLineCount

minimumLineCount

protected int minimumLineCount

maximumLineCount

protected int maximumLineCount
Constructor Detail

MultiLineTextListener

public MultiLineTextListener(org.eclipse.swt.widgets.Text text)
Use this constructor for normal text widgets.

Parameters:
text -

MultiLineTextListener

public MultiLineTextListener(org.eclipse.swt.custom.StyledText text)
Use this constructor if the text box is a styled text widget.

Parameters:
text - - styled text widget

MultiLineTextListener

public MultiLineTextListener(org.eclipse.swt.widgets.Text text,
                             int min,
                             int max)
Use this constribute for Text widgets.

Parameters:
text - - the text widget
min - - minimum number of lines to display
max - - maximum number of lines before the scrollbar appears

MultiLineTextListener

public MultiLineTextListener(org.eclipse.swt.custom.StyledText text,
                             int min,
                             int max)
Use this constructor if the text box is a styled text widget.

Parameters:
text - - styled text widget
min - - minimum number of lines to display
max - - maximum number of lines before the scrollbar appears
Method Detail

modifyText

public void modifyText(org.eclipse.swt.events.ModifyEvent event)
Internal method used to watch the text widget and adjust the size as the text is changed.

Specified by:
modifyText in interface org.eclipse.swt.events.ModifyListener
Parameters:
event - an event containing information about the modify

forceLayoutForScrollParent

protected void forceLayoutForScrollParent(org.eclipse.swt.widgets.Text text)

forceLayoutForScrollParent

protected void forceLayoutForScrollParent(org.eclipse.swt.custom.StyledText text)

TIBCO ActiveMatrix Mediation Implementation Type v3.3.1

Copyright © 2010 TIBCO Software Inc. All Rights Reserved.