Class DialogRow
java.lang.Object
org.libreoffice.ide.eclipse.core.gui.rows.LabeledRow
org.libreoffice.ide.eclipse.core.gui.rows.DialogRow
- All Implemented Interfaces:
EventListener,org.eclipse.swt.events.ModifyListener,org.eclipse.swt.internal.SWTEventListener
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 -
Method Summary
Modifier and TypeMethodDescriptionOpen the dialog when clicking on the right button.getValue()Get or calculate the value of this property.voidmodifyText(org.eclipse.swt.events.ModifyEvent event) voidSet 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 Details
-
DialogRow
public DialogRow(org.eclipse.swt.widgets.Composite parent, String property, String label, boolean link) Simple constructor for the Dialog row creation. The button text will be set to Browse.- Parameters:
parent- the composite in which to create the rowproperty- the property to recognize an event from this rowlabel- the label on the left of the rowlink- tells whether to create a browse link or button
-
DialogRow
public DialogRow(org.eclipse.swt.widgets.Composite parent, String property, String label, String btnLabel, boolean link) Constructor for the Dialog row creation allowing to change the button text.- Parameters:
parent- the composite in which to create the rowproperty- the property to recognize an event from this rowlabel- the label on the left of the rowbtnLabel- the label of the button opening the dialoglink- tells whether to create a browse link or button
-
-
Method Details
-
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
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 event) - Specified by:
modifyTextin interfaceorg.eclipse.swt.events.ModifyListener
-
setValue
Set a new value to the row.- Parameters:
pValue- the new value
-