本文整理汇总了Java中org.eclipse.jface.action.Action.isChecked方法的典型用法代码示例。如果您正苦于以下问题:Java Action.isChecked方法的具体用法?Java Action.isChecked怎么用?Java Action.isChecked使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.jface.action.Action
的用法示例。
在下文中一共展示了Action.isChecked方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: updateFilter
import org.eclipse.jface.action.Action; //导入方法依赖的package包/类
protected void updateFilter(Action action) {
if (action.isChecked()) {
viewer.addFilter(synchroFilter);
} else {
viewer.removeFilter(synchroFilter);
}
}
示例2: onPause
import org.eclipse.jface.action.Action; //导入方法依赖的package包/类
/**
* Stop collecting all data.
*/
protected void onPause(Action action) {
this.paused = action.isChecked();
CollectedDataAccess.setPaused(this.paused);
}
示例3: onPause
import org.eclipse.jface.action.Action; //导入方法依赖的package包/类
/**
* User clicked button 'pause'.
*/
protected void onPause(Action action) {
this.paused = action.isChecked();
}
示例4: createMenus
import org.eclipse.jface.action.Action; //导入方法依赖的package包/类
private void createMenus() {
openAction = new OpenFileInSystemEditorAction(getSite().getPage(), treeViewer);
MenuManager menuMgr = new MenuManager("#MergeResultsViewPopupMenu"); //$NON-NLS-1$
menuMgr.setRemoveAllWhenShown(true);
menuMgr.addMenuListener(new IMenuListener() {
public void menuAboutToShow(IMenuManager manager) {
MergeResultsView.this.fillContextMenu(manager);
}
});
Menu menu = menuMgr.createContextMenu(treeViewer.getControl());
treeViewer.getControl().setMenu(menu);
getSite().registerContextMenu(menuMgr, treeViewer);
toggleLayoutActions = new ToggleLayoutAction[] {
new ToggleLayoutAction(this, Messages.MergeResultsView_flat,
Activator.IMAGE_LAYOUT_FLAT,
MODE_FLAT),
new ToggleLayoutAction(this, Messages.MergeResultsView_compressed,
Activator.IMAGE_LAYOUT_COMPRESSED,
MODE_COMPRESSED_FOLDERS)
};
IActionBars actionBars = getViewSite().getActionBars();
IMenuManager actionBarsMenu = actionBars.getMenuManager();
removeAction.setEnabled(false);
actionBarsMenu.add(removeAction);
actionBarsMenu.add(removeAllAction);
actionBarsMenu.add(new Separator());
actionBarsMenu.add(toggleLayoutActions[0]);
actionBarsMenu.add(toggleLayoutActions[1]);
actionBarsMenu.add(new Separator());
toggleConflictsOnlyAction = new Action("Show conflicts only") { //$NON-NLS-1$
public void run() {
store.setValue(MergeResultsView.CONFLICTS_ONLY_PREFERENCE, toggleConflictsOnlyAction.isChecked());
if (toggleConflictsOnlyAction.isChecked()) setContentDescription(Messages.MergeResultsView_conflictsMode);
else setContentDescription(""); //$NON-NLS-1$
refresh();
}
};
toggleConflictsOnlyAction.setChecked(store.getBoolean(MergeResultsView.CONFLICTS_ONLY_PREFERENCE));
toggleConflictsOnlyAction.setImageDescriptor(Activator.getDefault().getImageDescriptor(Activator.IMAGE_CONFLICT));
actionBarsMenu.add(toggleConflictsOnlyAction);
}
示例5: makeActions
import org.eclipse.jface.action.Action; //导入方法依赖的package包/类
@Override
protected void makeActions()
{
super.makeActions();
switchAxes = new Action("Switch axes", SWT.TOGGLE)
{
@Override
public void run()
{
if (switchAxes.isChecked())
{
chart.setOrientation(SWT.VERTICAL);
}
else
{
chart.setOrientation(SWT.HORIZONTAL);
}
}
};
switchAxes.setText("Switch axes");
switchAxes.setToolTipText("Switch X and Y axes");
switchAxes.setImageDescriptor(Activator
.getImageDescriptor("icons/angle.png"));
fitToWindow = new Action("Fit to window", SWT.COMMAND)
{
@Override
public void run()
{
// work through the axes to reset the range
final IAxis[] xAxes = chart.getAxisSet().getAxes();
for (final IAxis axis : xAxes)
{
// ok, do fit
axis.adjustRange();
}
// and re-plot it
chart.redraw();
}
};
fitToWindow.setText("Fit to window");
fitToWindow.setToolTipText("Resize plot to view all data");
fitToWindow.setImageDescriptor(Activator
.getImageDescriptor("icons/fit_to_win.png"));
}
示例6: actionImageFilterGPS
import org.eclipse.jface.action.Action; //导入方法依赖的package包/类
public void actionImageFilterGPS(final Action filterAction) {
/*
* get selected filter, uncheck other
*/
if (filterAction == _actionPhotoFilterGPS) {
_photoFilterGPS = filterAction.isChecked() ? PhotoFilterGPS.WITH_GPS : PhotoFilterGPS.NO_FILTER;
_actionPhotoFilterNoGPS.setChecked(false);
} else if (filterAction == _actionPhotoFilterNoGPS) {
_photoFilterGPS = filterAction.isChecked() ? PhotoFilterGPS.NO_GPS : PhotoFilterGPS.NO_FILTER;
_actionPhotoFilterGPS.setChecked(false);
}
// update gallery
filterGallery(_photoFilterGPS, _photoFilterTour);
}
示例7: actionImageFilterTour
import org.eclipse.jface.action.Action; //导入方法依赖的package包/类
public void actionImageFilterTour(final Action filterAction) {
/*
* get selected filter, uncheck other
*/
if (filterAction == _actionPhotoFilterTour) {
_photoFilterTour = filterAction.isChecked() ? PhotoFilterTour.WITH_TOURS : PhotoFilterTour.NO_FILTER;
_actionPhotoFilterNoTour.setChecked(false);
} else if (filterAction == _actionPhotoFilterNoTour) {
_photoFilterTour = filterAction.isChecked() ? PhotoFilterTour.NO_TOURS : PhotoFilterTour.NO_FILTER;
_actionPhotoFilterTour.setChecked(false);
}
// update gallery
filterGallery(_photoFilterGPS, _photoFilterTour);
}