use of org.eclipse.draw2d.ActionEvent in project yamcs-studio by yamcs.
the class RapButtonModel method fireActionPerformed.
/**
* Notifies any ActionListeners on this ButtonModel that an action has been performed.
*
* @since 2.0
*/
@Override
protected void fireActionPerformed() {
super.fireActionPerformed();
Iterator<?> iter = eventListeners.getListeners(ActionListener.class);
ActionEvent action = new ActionEvent(this);
while (iter.hasNext()) ((ActionListener) iter.next()).actionPerformed(action);
}
use of org.eclipse.draw2d.ActionEvent in project yamcs-studio by yamcs.
the class ScrollbarFigure method setUpClickable.
/**
* Sets the Clickable that represents the up arrow of the Scrollbar to <i>up</i>.
*
* @param up
* the up button
* @since 2.0
*/
public void setUpClickable(Clickable up) {
hookFocusListener(up);
if (buttonUp != null) {
remove(buttonUp);
}
buttonUp = up;
if (up != null) {
if (up instanceof Orientable)
((Orientable) up).setDirection(isHorizontal() ? Orientable.WEST : Orientable.NORTH);
buttonUp.setFiringMethod(Clickable.REPEAT_FIRING);
buttonUp.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
stepUp();
}
});
add(buttonUp, ScrollBarLayout.UP_ARROW);
}
}
use of org.eclipse.draw2d.ActionEvent in project yamcs-studio by yamcs.
the class ScrollbarFigure method setPageUp.
/**
* Sets the pageup button to the passed Clickable. The pageup button is the rectangular figure between the down
* arrow button and the ScrollBar's thumb figure.
*
* @param up
* the page up figure
* @since 2.0
*/
public void setPageUp(Clickable up) {
hookFocusListener(up);
if (pageUp != null)
remove(pageUp);
pageUp = up;
if (pageUp != null) {
pageUp.setFiringMethod(Clickable.REPEAT_FIRING);
pageUp.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent event) {
pageUp();
}
});
add(pageUp, ScrollBarLayout.PAGE_UP);
}
}
use of org.eclipse.draw2d.ActionEvent in project yamcs-studio by yamcs.
the class ScrollbarFigure method setPageDown.
/**
* Sets the pagedown button to the passed Clickable. The pagedown button is the figure between the down arrow button
* and the ScrollBar's thumb figure.
*
* @param down
* the page down figure
* @since 2.0
*/
public void setPageDown(Clickable down) {
hookFocusListener(down);
if (pageDown != null)
remove(pageDown);
pageDown = down;
if (pageDown != null) {
pageDown.setFiringMethod(Clickable.REPEAT_FIRING);
pageDown.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent event) {
pageDown();
}
});
add(down, ScrollBarLayout.PAGE_DOWN);
}
}
use of org.eclipse.draw2d.ActionEvent in project whole by wholeplatform.
the class ContentPaneFigure method createFoldingToggle.
public Toggle createFoldingToggle(Toggle toggle, final int paneIndexOrTag, int... paneIndexes) {
toggle.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent event) {
new AnimableRunnable() {
public void doRun() {
toggleVisibility(paneIndexOrTag);
}
}.syncExec();
}
});
createActionableFoldingToggle(toggle, paneIndexes);
bindFoldingToggle(foldingToggles.size() - 1, paneIndexOrTag);
return toggle;
}
Aggregations