de.nierbeck.timeTrack.views
Class TextObserver

java.lang.Object
  extended by de.nierbeck.timeTrack.views.TextObserver
All Implemented Interfaces:
java.util.Observer

public class TextObserver
extends java.lang.Object
implements java.util.Observer

Author:
Achim

Constructor Summary
TextObserver(org.eclipse.swt.widgets.Composite parent, int style)
           
 
Method Summary
 void addFocusListener(org.eclipse.swt.events.FocusListener listener)
          Adds a listener to the focus event
 void addModifyListener(org.eclipse.swt.events.ModifyListener listener)
          Adds listener to observer
 void addSelectionListener(org.eclipse.swt.events.SelectionListener listener)
          Adds listener to observer
 void addVerifyListener(org.eclipse.swt.events.VerifyListener listener)
          Adds listener to observer
 void append(java.lang.String string)
          Delegate Method
 void clearSelection()
          Delegate Method
 org.eclipse.swt.graphics.Point computeSize(int wHint, int hHint, boolean changed)
          Delegate Method
 org.eclipse.swt.graphics.Rectangle computeTrim(int x, int y, int width, int height)
          Delegate Method
 void copy()
          Delegate Method
 void cut()
          Delegate Method
 int getBorderWidth()
          Delegate Method
 int getCaretLineNumber()
          Delegate Method
 org.eclipse.swt.graphics.Point getCaretLocation()
          Delegate Method
 int getCaretPosition()
          Delegate Method
 int getCharCount()
          Delegate Method
 boolean getDoubleClickEnabled()
          Delegate Method
 char getEchoChar()
          Delegate Method
 boolean getEditable()
          Delegate Method
 int getLineCount()
          Delegate Method
 java.lang.String getLineDelimiter()
          Delegate Method
 int getLineHeight()
          Delegate Method
 int getOrientation()
          Delegate Method
 org.eclipse.swt.graphics.Point getSelection()
          Delegate Method
 int getSelectionCount()
          Delegate Method
 java.lang.String getSelectionText()
          Delegate Method
 int getTabs()
          Delegate Method
 java.lang.String getText()
          Delegate Method
 java.lang.String getText(int start, int end)
          Delegate Method
 int getTextLimit()
          Delegate Method
 int getTopIndex()
          Delegate Method
 int getTopPixel()
          Delegate Method
 void insert(java.lang.String string)
          Delegate Method
 void paste()
          Delegate Method
 void removeModifyListener(org.eclipse.swt.events.ModifyListener listener)
          removes the modyfy listener
 void removeSelectionListener(org.eclipse.swt.events.SelectionListener listener)
          removes the given selection listener
 void removeVerifyListener(org.eclipse.swt.events.VerifyListener listener)
          removes the given verify listener
 void selectAll()
          Delegate Method
 void setBounds(org.eclipse.swt.graphics.Rectangle rect)
          Delegate Method
 void setDoubleClickEnabled(boolean doubleClick)
          Delegate Method
 void setEchoChar(char echo)
          Delegate Method
 void setEditable(boolean editable)
          Delegate Method
 void setFont(org.eclipse.swt.graphics.Font font)
          Delegate Method
 void setLayoutData(org.eclipse.swt.layout.RowData durationData)
          Delegate Method
 void setOrientation(int orientation)
          Delegate Method
 void setRedraw(boolean redraw)
          Delegate Method
 void setSelection(int start)
          Delegate Method
 void setSelection(int start, int end)
          Delegate Method
 void setSelection(org.eclipse.swt.graphics.Point selection)
          Delegate Method
 void setTabs(int tabs)
          Delegate Method
 void setText(java.lang.String string)
          Delegate Method
 void setTextLimit(int limit)
          Delegate Method
 void setTopIndex(int index)
          Delegate Method
 void showSelection()
          Delegate Method
 void update(java.util.Observable o, java.lang.Object arg)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TextObserver

public TextObserver(org.eclipse.swt.widgets.Composite parent,
                    int style)
Parameters:
parent - - the Parent of the Composit
style - - the Style of the Composit
Method Detail

update

public final void update(java.util.Observable o,
                         java.lang.Object arg)
Specified by:
update in interface java.util.Observer
Parameters:
o - - the Observable
arg - - the argument
See Also:
Observer.update(java.util.Observable, java.lang.Object)

addModifyListener

public final void addModifyListener(org.eclipse.swt.events.ModifyListener listener)
Adds listener to observer

Parameters:
listener - - the listener to add

addSelectionListener

public final void addSelectionListener(org.eclipse.swt.events.SelectionListener listener)
Adds listener to observer

Parameters:
listener - - the listener to add

addVerifyListener

public final void addVerifyListener(org.eclipse.swt.events.VerifyListener listener)
Adds listener to observer

Parameters:
listener - - the listener to add

append

public final void append(java.lang.String string)
Delegate Method

Parameters:
string - - delegated to Text

clearSelection

public final void clearSelection()
Delegate Method


computeSize

public final org.eclipse.swt.graphics.Point computeSize(int wHint,
                                                        int hHint,
                                                        boolean changed)
Delegate Method

Parameters:
wHint - - delegated to Text
hHint - - delegated to Text
changed - - delegated to Text
Returns:
the Point from Text

computeTrim

public final org.eclipse.swt.graphics.Rectangle computeTrim(int x,
                                                            int y,
                                                            int width,
                                                            int height)
Delegate Method

Parameters:
x - - delegated to Text
y - - delegated to Text
width - - delegated to Text
height - - delegated to Text
Returns:
the Rectangle from Text

copy

public final void copy()
Delegate Method

See Also:
Text.copy()

cut

public final void cut()
Delegate Method

See Also:
Text.cut()

getBorderWidth

public final int getBorderWidth()
Delegate Method

Returns:
the borderWidht from Text
See Also:
Text.getBorderWidth()

getCaretLineNumber

public final int getCaretLineNumber()
Delegate Method

Returns:
the linenumber from Text
See Also:
Text.getCaretLineNumber()

getCaretLocation

public final org.eclipse.swt.graphics.Point getCaretLocation()
Delegate Method

Returns:
the point from Text
See Also:
Text.getCaretLocation()

getCaretPosition

public final int getCaretPosition()
Delegate Method

Returns:
the position from Text
See Also:
Text.getCaretPosition()

getCharCount

public final int getCharCount()
Delegate Method

Returns:
the count from text
See Also:
Text.getCharCount()

getDoubleClickEnabled

public final boolean getDoubleClickEnabled()
Delegate Method

Returns:
the enabled flag from Text
See Also:
Text.getDoubleClickEnabled()

getEchoChar

public final char getEchoChar()
Delegate Method

Returns:
the echo char from Text
See Also:
Text.getEchoChar()

getEditable

public final boolean getEditable()
Delegate Method

Returns:
flag from Text
See Also:
Text.getEditable()

getLineCount

public final int getLineCount()
Delegate Method

Returns:
line count
See Also:
Text.getLineCount()

getLineDelimiter

public final java.lang.String getLineDelimiter()
Delegate Method

Returns:
the line delimiter
See Also:
Text.getLineDelimiter()

getLineHeight

public final int getLineHeight()
Delegate Method

Returns:
line height
See Also:
Text.getLineHeight()

getOrientation

public final int getOrientation()
Delegate Method

Returns:
orientation
See Also:
Text.getOrientation()

getSelection

public final org.eclipse.swt.graphics.Point getSelection()
Delegate Method

Returns:
point of selection
See Also:
Text.getSelection()

getSelectionCount

public final int getSelectionCount()
Delegate Method

Returns:
selection count
See Also:
Text.getSelectionCount()

getSelectionText

public final java.lang.String getSelectionText()
Delegate Method

Returns:
the selection text
See Also:
Text.getSelectionText()

getTabs

public final int getTabs()
Delegate Method

Returns:
tabsize
See Also:
Text.getTabs()

getText

public final java.lang.String getText()
Delegate Method

Returns:
text
See Also:
Text.getText()

getText

public final java.lang.String getText(int start,
                                      int end)
Delegate Method

Parameters:
start - - delegated to text
end - - delegated to text
Returns:
the Text on that position
See Also:
Text.getText(int, int)

getTextLimit

public final int getTextLimit()
Delegate Method

Returns:
textlimit
See Also:
Text.getTextLimit()

getTopIndex

public final int getTopIndex()
Delegate Method

Returns:
top Index
See Also:
Text.getTopIndex()

getTopPixel

public final int getTopPixel()
Delegate Method

Returns:
top Pixel
See Also:
Text.getTopPixel()

insert

public final void insert(java.lang.String string)
Delegate Method

Parameters:
string - - delegated to Text
See Also:
Text.insert(java.lang.String)

paste

public final void paste()
Delegate Method

See Also:
Text.paste()

removeModifyListener

public final void removeModifyListener(org.eclipse.swt.events.ModifyListener listener)
removes the modyfy listener

Parameters:
listener - - the listener which has to be removed from the listeners
See Also:
Text.removeModifyListener(org.eclipse.swt.events.ModifyListener)

removeSelectionListener

public final void removeSelectionListener(org.eclipse.swt.events.SelectionListener listener)
removes the given selection listener

Parameters:
listener - - the listener to be removed

removeVerifyListener

public final void removeVerifyListener(org.eclipse.swt.events.VerifyListener listener)
removes the given verify listener

Parameters:
listener - - the listener to be removed

selectAll

public final void selectAll()
Delegate Method

See Also:
Text.selectAll()

setDoubleClickEnabled

public final void setDoubleClickEnabled(boolean doubleClick)
Delegate Method

Parameters:
doubleClick - - delegated to Text
See Also:
Text.setDoubleClickEnabled(boolean)

setEchoChar

public final void setEchoChar(char echo)
Delegate Method

Parameters:
echo - - delegated to Text
See Also:
Text.setEchoChar(char)

setEditable

public final void setEditable(boolean editable)
Delegate Method

Parameters:
editable - - delegated to Text
See Also:
Text.setEditable(boolean)

setFont

public final void setFont(org.eclipse.swt.graphics.Font font)
Delegate Method

Parameters:
font - - delegated to Text
See Also:
Text.setFont(org.eclipse.swt.graphics.Font)

setOrientation

public final void setOrientation(int orientation)
Delegate Method

Parameters:
orientation - - delegated to Text
See Also:
Text.setOrientation(int)

setRedraw

public final void setRedraw(boolean redraw)
Delegate Method

Parameters:
redraw - - delegated to Text
See Also:
Text.setRedraw(boolean)

setSelection

public final void setSelection(int start)
Delegate Method

Parameters:
start - - delegated to Text
See Also:
Text.setSelection(int)

setSelection

public final void setSelection(int start,
                               int end)
Delegate Method

Parameters:
start - - delegated to Text
end - - delegated to Text
See Also:
Text.setSelection(int, int)

setSelection

public final void setSelection(org.eclipse.swt.graphics.Point selection)
Delegate Method

Parameters:
selection - - delegated to Text
See Also:
Text.setSelection(org.eclipse.swt.graphics.Point)

setTabs

public final void setTabs(int tabs)
Delegate Method

Parameters:
tabs - - delegated to Text
See Also:
Text.setTabs(int)

setText

public final void setText(java.lang.String string)
Delegate Method

Parameters:
string - - delegated to Text
See Also:
Text.setText(java.lang.String)

setTextLimit

public final void setTextLimit(int limit)
Delegate Method

Parameters:
limit - - delegated to Text
See Also:
Text.setTextLimit(int)

setTopIndex

public final void setTopIndex(int index)
Delegate Method

Parameters:
index - - delegated to Text
See Also:
Text.setTopIndex(int)

showSelection

public final void showSelection()
Delegate Method

See Also:
Text.showSelection()

setLayoutData

public final void setLayoutData(org.eclipse.swt.layout.RowData durationData)
Delegate Method

Parameters:
durationData - - delegated to Text
See Also:
Control.setLayoutData(java.lang.Object)

addFocusListener

public final void addFocusListener(org.eclipse.swt.events.FocusListener listener)
Adds a listener to the focus event

Parameters:
listener - - the listener to be added

setBounds

public final void setBounds(org.eclipse.swt.graphics.Rectangle rect)
Delegate Method

Parameters:
rect - - delegated to Text
See Also:
Control.setBounds(org.eclipse.swt.graphics.Rectangle)


Copyright © 2003-2006 Nierbeck. All Rights Reserved.