|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.eclipse.swt.events.SelectionAdapter
org.opensubsystems.patterns.thickclient.application.swt.ToggleButtonSelectionAdapter
public class ToggleButtonSelectionAdapter
This adapter make sure that the toggle button is displayed when user wants to edit the table cell content.
| Field Summary | |
|---|---|
protected org.eclipse.swt.custom.TableEditor |
m_editor
Editor used to edit the table. |
protected int |
m_iColumn
Which column is edited by this editor. |
protected java.util.Set |
m_setListeners
Set where all listeners listening to the event notifications specific to this object are stored. |
protected java.lang.String |
m_strButtonText
Text on the toggle button. |
protected org.eclipse.swt.widgets.Table |
m_table
Table this adapter is attached to. |
protected org.eclipse.swt.widgets.Button |
m_toggleButton
Button used to toggle the content. |
| Constructor Summary | |
|---|---|
ToggleButtonSelectionAdapter(org.eclipse.swt.widgets.Table editableTable,
int iColumn)
Construct new adapter. |
|
ToggleButtonSelectionAdapter(org.eclipse.swt.widgets.Table editableTable,
int iColumn,
java.lang.String strToggleButtonText)
Construct new adapter. |
|
| Method Summary | |
|---|---|
void |
addToggleListener(ToggleButtonListener listener)
Add listener for this object. |
void |
hideEditor()
Hide editor if it is displayed in current table. |
boolean |
isVisible()
Check if the editor is visble |
protected void |
notifyToggleListeners(org.eclipse.swt.widgets.TableItem item,
int iColumn,
java.lang.Object objData,
java.lang.String strValue)
Notify all listeners about event. |
void |
removeToggleListener(ToggleButtonListener listener)
Remove listener from this object. |
void |
widgetSelected(org.eclipse.swt.events.SelectionEvent event)
|
| Methods inherited from class org.eclipse.swt.events.SelectionAdapter |
|---|
widgetDefaultSelected |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.util.Set m_setListeners
protected org.eclipse.swt.widgets.Table m_table
protected org.eclipse.swt.custom.TableEditor m_editor
protected int m_iColumn
protected org.eclipse.swt.widgets.Button m_toggleButton
protected java.lang.String m_strButtonText
| Constructor Detail |
|---|
public ToggleButtonSelectionAdapter(org.eclipse.swt.widgets.Table editableTable,
int iColumn)
editableTable - - table this adapter is attached to.iColumn - - 0 based index of column toggled by this editor.
public ToggleButtonSelectionAdapter(org.eclipse.swt.widgets.Table editableTable,
int iColumn,
java.lang.String strToggleButtonText)
editableTable - - table this adapter is attached to.iColumn - - 0 based index of column toggled by this editor.strToggleButtonText - - text to display on the toggle button, if null
is passed in, no button will be displayed
and the toggle will occur just by clicking
on the row| Method Detail |
|---|
public void widgetSelected(org.eclipse.swt.events.SelectionEvent event)
widgetSelected in interface org.eclipse.swt.events.SelectionListenerwidgetSelected in class org.eclipse.swt.events.SelectionAdapterpublic void addToggleListener(ToggleButtonListener listener)
listener - - listener to addpublic void removeToggleListener(ToggleButtonListener listener)
listener - - listener to removepublic void hideEditor()
public boolean isVisible()
protected void notifyToggleListeners(org.eclipse.swt.widgets.TableItem item,
int iColumn,
java.lang.Object objData,
java.lang.String strValue)
item - - table item which was togglediColumn - - column which was toggledobjData - - data represented by the controlstrValue - - what was the value and the moment of modification
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||