|
|||||||||
| Home >> All >> org >> eclipse >> pde >> internal >> ui >> [ parts overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.eclipse.pde.internal.ui.parts
Class FormEntry

java.lang.Objectorg.eclipse.pde.internal.ui.parts.FormEntry
- public class FormEntry
- extends java.lang.Object
The helper class for creating entry fields with label and text. Optionally, a button can be added after the text. The attached listener reacts to all the events. Entring new text makes the entry 'dirty', but only when 'commit' is called is 'valueChanged' method called (and only if 'dirty' flag is set). This allows delayed commit.
| Field Summary | |
private org.eclipse.swt.widgets.Button |
browse
|
private boolean |
dirty
|
(package private) boolean |
ignoreModify
|
private org.eclipse.swt.widgets.Control |
label
|
private IFormEntryListener |
listener
|
private org.eclipse.swt.widgets.Text |
text
|
private java.lang.String |
value
|
| Constructor Summary | |
FormEntry(org.eclipse.swt.widgets.Composite parent,
org.eclipse.ui.forms.widgets.FormToolkit toolkit,
java.lang.String labelText,
int style)
The default constructor. |
|
FormEntry(org.eclipse.swt.widgets.Composite parent,
org.eclipse.ui.forms.widgets.FormToolkit toolkit,
java.lang.String labelText,
java.lang.String browseText,
boolean linkLabel)
This constructor create all the controls right away. |
|
| Method Summary | |
private void |
addListeners()
|
void |
cancelEdit()
|
void |
commit()
If dirty, commits the text in the widget to the value and notifies the listener. |
private void |
createControl(org.eclipse.swt.widgets.Composite parent,
org.eclipse.ui.forms.widgets.FormToolkit toolkit,
java.lang.String labelText,
int style,
java.lang.String browseText,
boolean linkLabel)
Create all the controls in the provided parent. |
private void |
editOccured(org.eclipse.swt.events.ModifyEvent e)
|
private void |
fillIntoGrid(org.eclipse.swt.widgets.Composite parent)
|
org.eclipse.swt.widgets.Button |
getButton()
Returns the browse button control. |
org.eclipse.swt.widgets.Text |
getText()
Returns the text control. |
java.lang.String |
getValue()
Returns the current entry value. |
boolean |
isDirty()
Returns true if the text has been modified. |
private void |
keyReleaseOccured(org.eclipse.swt.events.KeyEvent e)
|
void |
setEditable(boolean editable)
|
void |
setFormEntryListener(IFormEntryListener listener)
Attaches the listener for the entry. |
void |
setValue(java.lang.String value)
Sets the value of this entry. |
void |
setValue(java.lang.String value,
boolean blockNotification)
Sets the value of this entry with the possibility to turn the notification off. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
label
private org.eclipse.swt.widgets.Control label
text
private org.eclipse.swt.widgets.Text text
browse
private org.eclipse.swt.widgets.Button browse
value
private java.lang.String value
dirty
private boolean dirty
ignoreModify
boolean ignoreModify
listener
private IFormEntryListener listener
| Constructor Detail |
FormEntry
public FormEntry(org.eclipse.swt.widgets.Composite parent, org.eclipse.ui.forms.widgets.FormToolkit toolkit, java.lang.String labelText, int style)
- The default constructor. Call 'createControl' to make it.
FormEntry
public FormEntry(org.eclipse.swt.widgets.Composite parent, org.eclipse.ui.forms.widgets.FormToolkit toolkit, java.lang.String labelText, java.lang.String browseText, boolean linkLabel)
- This constructor create all the controls right away.
| Method Detail |
createControl
private void createControl(org.eclipse.swt.widgets.Composite parent, org.eclipse.ui.forms.widgets.FormToolkit toolkit, java.lang.String labelText, int style, java.lang.String browseText, boolean linkLabel)
- Create all the controls in the provided parent.
setEditable
public void setEditable(boolean editable)
fillIntoGrid
private void fillIntoGrid(org.eclipse.swt.widgets.Composite parent)
setFormEntryListener
public void setFormEntryListener(IFormEntryListener listener)
- Attaches the listener for the entry.
addListeners
private void addListeners()
commit
public void commit()
- If dirty, commits the text in the widget to the value and notifies the
listener. This call clears the 'dirty' flag.
cancelEdit
public void cancelEdit()
editOccured
private void editOccured(org.eclipse.swt.events.ModifyEvent e)
getText
public org.eclipse.swt.widgets.Text getText()
- Returns the text control.
getButton
public org.eclipse.swt.widgets.Button getButton()
- Returns the browse button control.
getValue
public java.lang.String getValue()
- Returns the current entry value. If the entry is dirty and was not
commited, the value may be different from the text in the widget.
isDirty
public boolean isDirty()
- Returns true if the text has been modified.
keyReleaseOccured
private void keyReleaseOccured(org.eclipse.swt.events.KeyEvent e)
setValue
public void setValue(java.lang.String value)
- Sets the value of this entry.
setValue
public void setValue(java.lang.String value, boolean blockNotification)
- Sets the value of this entry with the possibility to turn the
notification off.
|
|||||||||
| Home >> All >> org >> eclipse >> pde >> internal >> ui >> [ parts overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC
org.eclipse.pde.internal.ui.parts.FormEntry