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

public class DialogRow extends LabeledRow implements org.eclipse.swt.events.ModifyListener
Row class with a text and a configurable button to open a dialog.
  • 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 row
      property - the property to recognize an event from this row
      label - the label on the left of the row
      link - 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 row
      property - the property to recognize an event from this row
      label - the label on the left of the row
      btnLabel - the label of the button opening the dialog
      link - tells whether to create a browse link or button
  • Method Details

    • doOpenDialog

      public 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 String getValue()
      Get or calculate the value of this property.
      Specified by:
      getValue in class LabeledRow
      Returns:
      the property value
    • modifyText

      public void modifyText(org.eclipse.swt.events.ModifyEvent event)
      Specified by:
      modifyText in interface org.eclipse.swt.events.ModifyListener
    • setValue

      public void setValue(String pValue)
      Set a new value to the row.
      Parameters:
      pValue - the new value