use of edu.cmu.cs.hcii.cogtool.model.MousePressType in project cogtool by cogtool.
the class ActionSet method createMouseComposite.
protected Composite createMouseComposite() {
Composite mouseComp = new Composite(actionSettings, SWT.NONE);
mouseComp.setLayout(new FormLayout());
mouseButtonLabel = new DisplayLabel(mouseComp, SWT.NONE);
mouseButtonLabel.setText(L10N.get("DE.MouseButtonCaption", "Mouse Button") + ":");
// TODO Why is this here rather than in its natural home in the
// overridden method in ActionPropertySet?
transitionSourceLabelMouse = createTransitionSourceLabel(mouseComp);
transitionSourceNameMouse = createTransitionSourceName(mouseComp);
transitionDestinationLabelMouse = createTransitionDestinationLabel(mouseComp);
transitionDestinationNameMouse = createTransitionDestinationName(mouseComp);
mouseButtonCombo = new ComboWithEnableFix(mouseComp, SWT.DROP_DOWN | SWT.READ_ONLY);
for (MouseButtonState element : MouseButtonState.DISPLAY) {
mouseButtonCombo.add(element.toString());
}
mouseButtonCombo.select(0);
mouseButtonCombo.addSelectionListener(widgetActionChange);
mouseActionLabel = new DisplayLabel(mouseComp, SWT.NONE);
mouseActionLabel.setText(L10N.get("DE.ButtonActionCaption", "Action") + ":");
mouseActionCombo = new ComboWithEnableFix(mouseComp, SWT.DROP_DOWN | SWT.READ_ONLY);
for (MousePressType element : MousePressType.DISPLAY) {
mouseActionCombo.add(element.toString());
}
mouseActionCombo.select(0);
mouseActionCombo.addSelectionListener(widgetActionChange);
// then add modifier set for the mouse clicks.
if (DeviceType.Keyboard.isMember(deviceTypes)) {
buttonModifierSet = new ActionModifierSet(mouseActionCombo, widgetActionChange, vertical);
}
return mouseComp;
}
Aggregations