当前位置: 首页>>代码示例>>Java>>正文


Java Action.isChecked方法代码示例

本文整理汇总了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);
	}
}
 
开发者ID:1Tristan,项目名称:VariantSync,代码行数:8,代码来源:ResourceChangesView.java

示例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);
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:8,代码来源:PerformanceView.java

示例3: onPause

import org.eclipse.jface.action.Action; //导入方法依赖的package包/类
/**
 * User clicked button 'pause'.
 */
protected void onPause(Action action) {
	this.paused = action.isChecked();
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:7,代码来源:SourceGraphView.java

示例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);
}
 
开发者ID:subclipse,项目名称:subclipse,代码行数:45,代码来源:MergeResultsView.java

示例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"));

}
 
开发者ID:debrief,项目名称:limpet,代码行数:48,代码来源:XyPlotView.java

示例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);
	}
 
开发者ID:wolfgang-ch,项目名称:mytourbook,代码行数:23,代码来源:PhotoGallery.java

示例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);
	}
 
开发者ID:wolfgang-ch,项目名称:mytourbook,代码行数:23,代码来源:PhotoGallery.java


注:本文中的org.eclipse.jface.action.Action.isChecked方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。