Java 类org.eclipse.swt.events.ArmEvent 实例源码

项目:ldparteditor    文件:KeyStateManager.java   
public static void addKeyText(final MenuItem mntm, final String text, final Task t) {
    mntm.setText(text + "\t" + taskKeyMap.get(t)); //$NON-NLS-1$
    mntm.addArmListener(new ArmListener() {
        @Override
        public void widgetArmed(ArmEvent e) {
            mntm.setText(text + "\t" + taskKeyMap.get(t)); //$NON-NLS-1$
        }
    });
}
项目:ldparteditor    文件:KeyStateManager.java   
public static void addKeyText(final MenuItem mntm, final String text, final TextTask t) {
    mntm.setText(text + "\t" + textTaskKeyMap.get(t)); //$NON-NLS-1$
    mntm.addArmListener(new ArmListener() {
        @Override
        public void widgetArmed(ArmEvent e) {
            mntm.setText(text + "\t" + textTaskKeyMap.get(t)); //$NON-NLS-1$
        }
    });
}
项目:jo-widgets    文件:SwtMenu.java   
private void installTooltip(final MenuItem menuItem, final IToolTipTextProvider toolTipTextProvider) {
    final ArmListener armListener = new ArmListener() {

        @Override
        public void widgetArmed(final ArmEvent e) {
            final boolean wasVisible = toolTip.isVisible();
            toolTip.setVisible(false);

            final String toolTipText = toolTipTextProvider.getToolTipText();
            final boolean hasToolTip = toolTipText != null && !toolTipText.isEmpty();

            if (wasVisible) {
                if (hasToolTip) {
                    showToolTip(toolTipText);
                }
            }
            else if (hasToolTip) {
                lastArmListener = this;
                final ArmListener thisListener = this;
                Display.getCurrent().timerExec(400, new Runnable() {

                    @Override
                    public void run() {
                        if (lastArmListener == thisListener) {
                            showToolTip(toolTipText);
                        }
                    }
                });
            }

        }
    };

    if (toolTip != null) {
        menuItem.addArmListener(armListener);
    }
}
项目:EarthquakeBulletin    文件:EventMenuListener.java   
@Override
public void widgetArmed(final ArmEvent e) {
    manageItems();
}
项目:EarthquakeBulletin    文件:HelpMenuListener.java   
@Override
public void widgetArmed(final ArmEvent e) {
    execute();
}
项目:EarthquakeBulletin    文件:FileMenuListener.java   
@Override
public void widgetArmed(final ArmEvent e) {
    manageExportCsvItem();
}
项目:RouterLogger    文件:EditMenuListener.java   
@Override
public void widgetArmed(final ArmEvent ae) {
    execute();
}
项目:RouterLogger    文件:ConnectionMenuListener.java   
@Override
public void widgetArmed(final ArmEvent event) {
    execute();
}
项目:RouterLogger    文件:HelpMenuListener.java   
@Override
public void widgetArmed(final ArmEvent e) {
    execute();
}
项目:RouterLogger    文件:EditClearSubMenuListener.java   
@Override
public void widgetArmed(final ArmEvent ae) {
    execute();
}
项目:mytourbook    文件:AdvancedMenuForActions.java   
@Override
public void widgetArmed(final ArmEvent event) {
    onArmEvent(event);
}
项目:CyclesMod    文件:EditMenuListener.java   
@Override
public void widgetArmed(final ArmEvent e) {
    execute();
}
项目:CyclesMod    文件:HelpMenuListener.java   
@Override
public void widgetArmed(final ArmEvent e) {
    execute();
}
项目:mytourbook    文件:AdvancedMenuForActions.java   
private void onArmEvent(final ArmEvent event) {

        final MenuItem menuItem = (MenuItem) event.widget;

        if (_isAutoOpen && menuItem.isEnabled()) {

            final Object itemData = menuItem.getData();
            if (itemData instanceof ActionContributionItem) {

                final String itemId = ((ActionContributionItem) itemData).getId();
                final String actionId = _actionContributionItem.getId();

                if (itemId != null && itemId.equals(actionId)) {

                    /*
                     * the item is hovered which is associated with the action for the advanced menu
                     */

                    _armItemTimeAction = System.currentTimeMillis();

                    _armMenuItem = menuItem;
                    _armActionText = _actionContributionItem.getAction().getText();

                    onAnimation10Start();

                    return;
                }
            }
        }

        restoreMenuItemText();

        _armMenuItem = null;
        _isAnimating = false;

        // system time is needed because OSX has the same time for all arm events until the menu is closed
        _armItemTimeOther = System.currentTimeMillis();
    }