|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.openoffice.ide.eclipse.core.gui.rows.LabeledRow
public abstract class LabeledRow
Basic class for a property row. Subclasses will override:
Field Summary | |
---|---|
static int |
LAYOUT_COLUMNS
|
protected org.eclipse.swt.widgets.Control |
mBrowse
|
protected org.eclipse.swt.widgets.Control |
mField
|
protected org.eclipse.swt.widgets.Control |
mLabel
|
protected IFieldChangedListener |
mListener
|
protected java.lang.String |
mProperty
|
Constructor Summary | |
---|---|
LabeledRow(org.eclipse.swt.widgets.Composite pParent,
java.lang.String pProperty,
org.eclipse.swt.widgets.Control pLabel,
org.eclipse.swt.widgets.Control pField,
java.lang.String pBrowseText,
boolean pLink)
Create a field base. |
|
LabeledRow(java.lang.String pProperty)
Simple constructor only defining the property. |
Method Summary | |
---|---|
void |
addBrowseSelectionListener(org.eclipse.swt.events.SelectionListener pListener)
Add a selection listener to the browse link or button (depends on the arguments of the constructor). |
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,
boolean pLink)
Stores the row controls, creates the button if its text is not null and layout the controls. |
protected void |
fillRow(org.eclipse.swt.widgets.Composite pParent)
Method organizing the different graphic components in the parent composite. |
protected void |
fireFieldChangedEvent(FieldEvent pEvent)
Fires a change of the row. |
java.lang.String |
getLabel()
Returns the row label. |
java.lang.String |
getProperty()
Property getter. |
abstract java.lang.String |
getValue()
Get or calculate the value of this property. |
void |
removeFieldChangedlistener()
Removes the field changes listener. |
void |
setEnabled(boolean pEnabled)
Set the enabled state of the field and the browse button if the latter exists. |
void |
setFieldChangedListener(IFieldChangedListener pListener)
Defines the listener that will react to the field changes. |
void |
setLabel(java.lang.String pNewLabel)
Replace the current label by a new one. |
void |
setTooltip(java.lang.String pTooltip)
Set the tooltip message of the row. |
void |
setVisible(boolean pVisible)
Toggle the visibily of the line. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int LAYOUT_COLUMNS
protected org.eclipse.swt.widgets.Control mLabel
protected org.eclipse.swt.widgets.Control mField
protected org.eclipse.swt.widgets.Control mBrowse
protected java.lang.String mProperty
protected IFieldChangedListener mListener
Constructor Detail |
---|
public LabeledRow(java.lang.String pProperty)
pProperty
- property value given in the field changed event.public LabeledRow(org.eclipse.swt.widgets.Composite pParent, java.lang.String pProperty, org.eclipse.swt.widgets.Control pLabel, org.eclipse.swt.widgets.Control pField, java.lang.String pBrowseText, boolean pLink)
pParent
- Composite in which the row will be addedpProperty
- Property value given in the field changed event.pLabel
- Control to use for the label. The most common is a text
control, but it could be something else like an hyperlink.pField
- Control containing the field data.pBrowseText
- Button text. If null
, the button isn't
created.pLink
- the browse is shown as a link if true
, otherwise
it is a button.Method Detail |
---|
public void setTooltip(java.lang.String pTooltip)
pTooltip
- the tooltip messagepublic void setLabel(java.lang.String pNewLabel)
pNewLabel
- New label to usepublic java.lang.String getLabel()
public void addBrowseSelectionListener(org.eclipse.swt.events.SelectionListener pListener)
pListener
- the listener to addprotected void createContent(org.eclipse.swt.widgets.Composite pParent, org.eclipse.swt.widgets.Control pLabel, org.eclipse.swt.widgets.Control pField, java.lang.String pBrowseText, boolean pLink)
null
and layout the controls.
pParent
- the parent composite where to create the controlspLabel
- the control for the labelpField
- the control for the fieldpBrowseText
- the text to show on the right button of the row.pLink
- the browse is shown as a link if true
, otherwise
it is a button.public java.lang.String getProperty()
public abstract java.lang.String getValue()
protected void fillRow(org.eclipse.swt.widgets.Composite pParent)
pParent
- Parent composite.public void setFieldChangedListener(IFieldChangedListener pListener)
pListener
- field changes listenerpublic void removeFieldChangedlistener()
protected void fireFieldChangedEvent(FieldEvent pEvent)
pEvent
- the event to throw for the changepublic void setVisible(boolean pVisible)
pVisible
- if true
the components will visible, otherwise
they will be hidden.public void setEnabled(boolean pEnabled)
pEnabled
- true
activate the row, otherwise the
row is desactivated
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |