org.openoffice.ide.eclipse.core.gui.rows
Class TextRow

java.lang.Object
  extended by org.openoffice.ide.eclipse.core.gui.rows.LabeledRow
      extended by org.openoffice.ide.eclipse.core.gui.rows.TextRow
All Implemented Interfaces:
java.util.EventListener, org.eclipse.swt.events.FocusListener, org.eclipse.swt.events.KeyListener, org.eclipse.swt.internal.SWTEventListener
Direct Known Subclasses:
TypeRow

public class TextRow
extends LabeledRow
implements org.eclipse.swt.events.FocusListener, org.eclipse.swt.events.KeyListener

GUI row for a text input. It supports only the Grid Layout and can be extended to manage more complex texts.

Author:
cedricbosdo
See Also:
for a file row based on this class, for a UNO type selection row based on this class

Field Summary
 
Fields inherited from class org.openoffice.ide.eclipse.core.gui.rows.LabeledRow
LAYOUT_COLUMNS, mBrowse, mField, mLabel, mListener, mProperty
 
Constructor Summary
TextRow(org.eclipse.swt.widgets.Composite pParent, java.lang.String pProperty, java.lang.String pLabel)
          Create a new text row.
 
Method Summary
 void focusGained(org.eclipse.swt.events.FocusEvent pEvent)
          
 void focusLost(org.eclipse.swt.events.FocusEvent pEvent)
          
 java.lang.String getValue()
          Get or calculate the value of this property.
 void keyPressed(org.eclipse.swt.events.KeyEvent pEvent)
          
 void keyReleased(org.eclipse.swt.events.KeyEvent pEvent)
          
 void setFocus()
          Sets the focus on the row.
 void setValue(java.lang.String pValue)
          Set the value of the row.
 
Methods inherited from class org.openoffice.ide.eclipse.core.gui.rows.LabeledRow
addBrowseSelectionListener, createContent, fillRow, fireFieldChangedEvent, getLabel, getProperty, removeFieldChangedlistener, setEnabled, setFieldChangedListener, setLabel, setTooltip, setVisible
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TextRow

public TextRow(org.eclipse.swt.widgets.Composite pParent,
               java.lang.String pProperty,
               java.lang.String pLabel)
Create a new text row.

Parameters:
pParent - the parent composite where to create the row
pProperty - the property name of the row's value
pLabel - the label of the row
Method Detail

focusGained

public void focusGained(org.eclipse.swt.events.FocusEvent pEvent)

Specified by:
focusGained in interface org.eclipse.swt.events.FocusListener

focusLost

public void focusLost(org.eclipse.swt.events.FocusEvent pEvent)

Specified by:
focusLost in interface org.eclipse.swt.events.FocusListener

keyPressed

public void keyPressed(org.eclipse.swt.events.KeyEvent pEvent)

Specified by:
keyPressed in interface org.eclipse.swt.events.KeyListener

keyReleased

public void keyReleased(org.eclipse.swt.events.KeyEvent pEvent)

Specified by:
keyReleased in interface org.eclipse.swt.events.KeyListener

getValue

public java.lang.String getValue()
Get or calculate the value of this property.

Specified by:
getValue in class LabeledRow
Returns:
the property value

setValue

public void setValue(java.lang.String pValue)
Set the value of the row.

Parameters:
pValue - the value to set

setFocus

public void setFocus()
Sets the focus on the row.