Class DialogRow
- java.lang.Object
-
- org.libreoffice.ide.eclipse.core.gui.rows.LabeledRow
-
- org.libreoffice.ide.eclipse.core.gui.rows.DialogRow
-
- All Implemented Interfaces:
java.util.EventListener,org.eclipse.swt.events.ModifyListener,org.eclipse.swt.internal.SWTEventListener
public class DialogRow extends LabeledRow implements org.eclipse.swt.events.ModifyListener
Row class with a text and a configurable button to open a dialog.
-
-
Field Summary
-
Fields inherited from class org.libreoffice.ide.eclipse.core.gui.rows.LabeledRow
LAYOUT_COLUMNS, mBrowse, mField, mLabel, mListener, mProperty
-
-
Constructor Summary
Constructors Constructor Description DialogRow(org.eclipse.swt.widgets.Composite pParent, java.lang.String pProperty, java.lang.String pLabel, boolean pLink)Simple constructor for the Dialog row creation.DialogRow(org.eclipse.swt.widgets.Composite pParent, java.lang.String pProperty, java.lang.String pLabel, java.lang.String pBtnLabel, boolean pLink)Constructor for the Dialog row creation allowing to change the button text.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringdoOpenDialog()Open the dialog when clicking on the right button.java.lang.StringgetValue()Get or calculate the value of this property.voidmodifyText(org.eclipse.swt.events.ModifyEvent pEvent)voidsetValue(java.lang.String pValue)Set a new value to the row.-
Methods inherited from class org.libreoffice.ide.eclipse.core.gui.rows.LabeledRow
addBrowseSelectionListener, createContent, fillRow, fireFieldChangedEvent, getLabel, getProperty, removeFieldChangedlistener, setEnabled, setFieldChangedListener, setLabel, setTooltip, setVisible
-
-
-
-
Constructor Detail
-
DialogRow
public DialogRow(org.eclipse.swt.widgets.Composite pParent, java.lang.String pProperty, java.lang.String pLabel, boolean pLink)Simple constructor for the Dialog row creation. The button text will be set to Browse.- Parameters:
pParent- the composite in which to create the rowpProperty- the property to recognize an event from this rowpLabel- the label on the left of the rowpLink- tells whether to create a browse link or button
-
DialogRow
public DialogRow(org.eclipse.swt.widgets.Composite pParent, java.lang.String pProperty, java.lang.String pLabel, java.lang.String pBtnLabel, boolean pLink)Constructor for the Dialog row creation allowing to change the button text.- Parameters:
pParent- the composite in which to create the rowpProperty- the property to recognize an event from this rowpLabel- the label on the left of the rowpBtnLabel- the label of the button opening the dialogpLink- tells whether to create a browse link or button
-
-
Method Detail
-
doOpenDialog
public java.lang.String doOpenDialog()
Open the dialog when clicking on the right button. Subclasses, may implement this method. Default returns an empty string.- Returns:
- the new value for the row
-
getValue
public java.lang.String getValue()
Get or calculate the value of this property.- Specified by:
getValuein classLabeledRow- Returns:
- the property value
-
modifyText
public void modifyText(org.eclipse.swt.events.ModifyEvent pEvent)
- Specified by:
modifyTextin interfaceorg.eclipse.swt.events.ModifyListener
-
setValue
public void setValue(java.lang.String pValue)
Set a new value to the row.- Parameters:
pValue- the new value
-
-