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

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

public class TypeRow
extends TextRow

Row for the selection of a UNO type.

The row allows to type the text in a text field or selecting the type using the UNO type browser. The text field support a simple auto-completion.

Author:
cedricbosdo

Field Summary
 
Fields inherited from class org.openoffice.ide.eclipse.core.gui.rows.LabeledRow
LAYOUT_COLUMNS, mBrowse, mField, mLabel, mListener, mProperty
 
Constructor Summary
TypeRow(org.eclipse.swt.widgets.Composite pParent, java.lang.String pProperty, java.lang.String pLabel, int pType)
          Creates a row for the selection of a UNO type.
 
Method Summary
protected  void createContent(org.eclipse.swt.widgets.Composite pParent, org.eclipse.swt.widgets.Control pLabel, org.eclipse.swt.widgets.Control pField, java.lang.String pBrowseText)
          Stores the row controls, creates the button if its text is not null and layout the controls.
 void includeSequences(boolean pInclude)
          Set whether the row should support include auto-completion for sequences.
 void includeSimpleTypes(boolean pInclude)
          Set whether the row should support include auto-completion for simple UNO types.
 void includeVoid(boolean pInclude)
          Set whether the row should support include auto-completion for the void type.
 
Methods inherited from class org.openoffice.ide.eclipse.core.gui.rows.TextRow
focusGained, focusLost, getValue, keyPressed, keyReleased, setFocus, setValue
 
Methods inherited from class org.openoffice.ide.eclipse.core.gui.rows.LabeledRow
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

TypeRow

public TypeRow(org.eclipse.swt.widgets.Composite pParent,
               java.lang.String pProperty,
               java.lang.String pLabel,
               int pType)
Creates a row for the selection of a UNO type.

The types mask is an integer from 0 to 2048-1. The type mask can be obtained by bit-OR of the types constants defined in InternalUnoType class.

Parameters:
pParent - the parent composite where to create the row
pProperty - the property name of the row
pLabel - the label of the row
pType - the types mask of the row.
Method Detail

includeSequences

public void includeSequences(boolean pInclude)
Set whether the row should support include auto-completion for sequences. Sequences aren't included in the auto-completion by default.

Parameters:
pInclude - true if the row can auto-complete sequences

includeSimpleTypes

public void includeSimpleTypes(boolean pInclude)
Set whether the row should support include auto-completion for simple UNO types. If the simple types are not included in the auto-completion, the void type isn't included too. Simple types aren't included in the auto-completion by default.

Parameters:
pInclude - true if the row can auto-complete sequences
See Also:
to include/exclude the void type

includeVoid

public void includeVoid(boolean pInclude)
Set whether the row should support include auto-completion for the void type. The void type is included in the auto-completion by default as long as the simple types are included.

Parameters:
pInclude - true if the row can auto-complete sequences
See Also:
for more precisions on the inclusion of the void type dependence on the other simple types inclusion.

createContent

protected void createContent(org.eclipse.swt.widgets.Composite pParent,
                             org.eclipse.swt.widgets.Control pLabel,
                             org.eclipse.swt.widgets.Control pField,
                             java.lang.String pBrowseText)
Stores the row controls, creates the button if its text is not null and layout the controls.

Overrides:
createContent in class LabeledRow
Parameters:
pParent - the parent composite where to create the controls
pLabel - the control for the label
pField - the control for the field
pBrowseText - the text to show on the right button of the row.