RSE
Release 3.2

org.eclipse.rse.ui
Class MassagerFoldCase

java.lang.Object
  extended by org.eclipse.rse.ui.MassagerFoldCase
All Implemented Interfaces:
ISystemMassager
Direct Known Subclasses:
MassagerFoldCaseOutsideQuotes, MassagerFoldCaseUnlessQuoted

public class MassagerFoldCase
extends Object
implements ISystemMassager

This massager folds the input text into either uppercase or lowercase, depending on the value pass to the constructor or setter.

Note by default this also trims the


Constructor Summary
MassagerFoldCase()
          Constructor using uppercase as the case direction
MassagerFoldCase(boolean foldToUpperCase)
          Constructor using given case direction
 
Method Summary
 boolean getFoldToUpperCase()
          Return property about whether to fold to uppercase or lowercase
 boolean getTrimBlanks()
          Return property about whether to trim blanks for not
 String massage(String text)
          Given the user-entered input, return the massaged version of it.
 void setFoldToUpperCase(boolean foldToUpperCase)
          Toggle whether to fold to uppercase or lowercase
 void setTrimBlanks(boolean trimBlanks)
          Toggle whether to trim blanks for not
protected  String toLowerCase(String input)
          Overrridable method that actually does the lowercasing
protected  String toUpperCase(String input)
          Overrridable method that actually does the uppercasing
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MassagerFoldCase

public MassagerFoldCase()
Constructor using uppercase as the case direction


MassagerFoldCase

public MassagerFoldCase(boolean foldToUpperCase)
Constructor using given case direction

Parameters:
foldToUpperCase - - whether to fold to uppercase (true) or lowercase (false).
Method Detail

setFoldToUpperCase

public void setFoldToUpperCase(boolean foldToUpperCase)
Toggle whether to fold to uppercase or lowercase

Parameters:
foldToUpperCase - - whether to fold to uppercase (true) or lowercase (false).

setTrimBlanks

public void setTrimBlanks(boolean trimBlanks)
Toggle whether to trim blanks for not

Parameters:
trimBlanks - - whether to trim blanks (true) or leave them (false).

getFoldToUpperCase

public boolean getFoldToUpperCase()
Return property about whether to fold to uppercase or lowercase

Returns:
true if folder to uppercase, false if folded to lowercaese

getTrimBlanks

public boolean getTrimBlanks()
Return property about whether to trim blanks for not

Returns:
true if blanks are trimmed

massage

public String massage(String text)
Description copied from interface: ISystemMassager
Given the user-entered input, return the massaged version of it. If no massaging required, return the input as is.

Specified by:
massage in interface ISystemMassager
See Also:
ISystemMassager.massage(String)

toUpperCase

protected String toUpperCase(String input)
Overrridable method that actually does the uppercasing


toLowerCase

protected String toLowerCase(String input)
Overrridable method that actually does the lowercasing


RSE
Release 3.2

Copyright (c) IBM Corporation and others 2000, 2010. All Rights Reserved.