org.eclipse.gef.ui.actions.RedoRetargetAction Java Examples
The following examples show how to use
org.eclipse.gef.ui.actions.RedoRetargetAction.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ERDiagramActionBarContributor.java From ermasterr with Apache License 2.0 | 4 votes |
/** * {@inheritDoc} */ @Override protected void buildActions() { addRetargetAction(new RetargetAction(ActionFactory.SELECT_ALL.getId(), "selectAll")); addRetargetAction(new RetargetAction(ActionFactory.PRINT.getId(), "print")); addRetargetAction(new DeleteRetargetAction()); addRetargetAction(new RetargetAction(ActionFactory.COPY.getId(), "copy")); addRetargetAction(new RetargetAction(ActionFactory.PASTE.getId(), "paste")); addRetargetAction(new UndoRetargetAction()); addRetargetAction(new RedoRetargetAction()); final ZoomInRetargetAction zoomInAction = new ZoomInRetargetAction(); zoomInAction.setImageDescriptor(ERDiagramActivator.getImageDescriptor(ImageKey.ZOOM_IN)); final ZoomOutRetargetAction zoomOutAction = new ZoomOutRetargetAction(); zoomOutAction.setImageDescriptor(ERDiagramActivator.getImageDescriptor(ImageKey.ZOOM_OUT)); addRetargetAction(zoomInAction); addRetargetAction(zoomOutAction); addRetargetAction(new ZoomAdjustRetargetAction()); final RetargetAction gridAction = new RetargetAction(GEFActionConstants.TOGGLE_GRID_VISIBILITY, ResourceString.getResourceString("action.title.grid"), IAction.AS_CHECK_BOX); gridAction.setImageDescriptor(ERDiagramActivator.getImageDescriptor(ImageKey.GRID)); addRetargetAction(gridAction); final RetargetAction gridSnapAction = new RetargetAction(GEFActionConstants.TOGGLE_SNAP_TO_GEOMETRY, ResourceString.getResourceString("action.title.grid.snap"), IAction.AS_CHECK_BOX); gridSnapAction.setImageDescriptor(ERDiagramActivator.getImageDescriptor(ImageKey.GRID_SNAP)); addRetargetAction(gridSnapAction); final RetargetAction tooltipAction = new RetargetAction(TooltipAction.ID, ResourceString.getResourceString("action.title.tooltip"), IAction.AS_CHECK_BOX); tooltipAction.setImageDescriptor(ERDiagramActivator.getImageDescriptor(ImageKey.TOOLTIP)); addRetargetAction(tooltipAction); final RetargetAction lockEditAction = new RetargetAction(LockEditAction.ID, ResourceString.getResourceString("action.title.lock.edit"), IAction.AS_CHECK_BOX); lockEditAction.setImageDescriptor(ERDiagramActivator.getImageDescriptor(ImageKey.LOCK_EDIT)); addRetargetAction(lockEditAction); addRetargetAction(new ExportToDBRetargetAction()); final AlignmentRetargetAction alignLeftAction = new AlignmentRetargetAction(PositionConstants.LEFT); alignLeftAction.setImageDescriptor(ERDiagramActivator.getImageDescriptor(ImageKey.ALIGN_LEFT)); alignLeftAction.setDisabledImageDescriptor(null); addRetargetAction(alignLeftAction); final AlignmentRetargetAction alignCenterAction = new AlignmentRetargetAction(PositionConstants.CENTER); alignCenterAction.setImageDescriptor(ERDiagramActivator.getImageDescriptor(ImageKey.ALIGN_CENTER)); alignCenterAction.setDisabledImageDescriptor(null); addRetargetAction(alignCenterAction); final AlignmentRetargetAction alignRightAction = new AlignmentRetargetAction(PositionConstants.RIGHT); alignRightAction.setImageDescriptor(ERDiagramActivator.getImageDescriptor(ImageKey.ALIGN_RIGHT)); alignRightAction.setDisabledImageDescriptor(null); addRetargetAction(alignRightAction); final AlignmentRetargetAction alignTopAction = new AlignmentRetargetAction(PositionConstants.TOP); alignTopAction.setImageDescriptor(ERDiagramActivator.getImageDescriptor(ImageKey.ALIGN_TOP)); alignTopAction.setDisabledImageDescriptor(null); addRetargetAction(alignTopAction); final AlignmentRetargetAction alignMiddleAction = new AlignmentRetargetAction(PositionConstants.MIDDLE); alignMiddleAction.setImageDescriptor(ERDiagramActivator.getImageDescriptor(ImageKey.ALIGN_MIDDLE)); alignMiddleAction.setDisabledImageDescriptor(null); addRetargetAction(alignMiddleAction); final AlignmentRetargetAction alignBottomAction = new AlignmentRetargetAction(PositionConstants.BOTTOM); alignBottomAction.setImageDescriptor(ERDiagramActivator.getImageDescriptor(ImageKey.ALIGN_BOTTOM)); alignBottomAction.setDisabledImageDescriptor(null); addRetargetAction(alignBottomAction); final MatchWidthRetargetAction matchWidthAction = new MatchWidthRetargetAction(); matchWidthAction.setImageDescriptor(ERDiagramActivator.getImageDescriptor(ImageKey.MATCH_WIDTH)); matchWidthAction.setDisabledImageDescriptor(null); addRetargetAction(matchWidthAction); final MatchHeightRetargetAction matchHeightAction = new MatchHeightRetargetAction(); matchHeightAction.setImageDescriptor(ERDiagramActivator.getImageDescriptor(ImageKey.MATCH_HEIGHT)); matchHeightAction.setDisabledImageDescriptor(null); addRetargetAction(matchHeightAction); addRetargetAction(new HorizontalLineRetargetAction()); addRetargetAction(new VerticalLineRetargetAction()); addRetargetAction(new ChangeBackgroundColorRetargetAction()); }
Example #2
Source File: ERDiagramActionBarContributor.java From erflute with Apache License 2.0 | 4 votes |
@Override protected void buildActions() { addRetargetAction(new RetargetAction(ActionFactory.SELECT_ALL.getId(), "selectAll")); addRetargetAction(new RetargetAction(ActionFactory.PRINT.getId(), "print")); addRetargetAction(new DeleteRetargetAction()); addRetargetAction(new RetargetAction(ActionFactory.COPY.getId(), "copy")); addRetargetAction(new RetargetAction(ActionFactory.PASTE.getId(), "paste")); addRetargetAction(new UndoRetargetAction()); addRetargetAction(new RedoRetargetAction()); final ZoomInRetargetAction zoomInAction = new ZoomInRetargetAction(); zoomInAction.setImageDescriptor(Activator.getImageDescriptor(ImageKey.ZOOM_IN)); final ZoomOutRetargetAction zoomOutAction = new ZoomOutRetargetAction(); zoomOutAction.setImageDescriptor(Activator.getImageDescriptor(ImageKey.ZOOM_OUT)); addRetargetAction(zoomInAction); addRetargetAction(zoomOutAction); addRetargetAction(new ZoomAdjustRetargetAction()); final RetargetAction gridAction = new RetargetAction(GEFActionConstants.TOGGLE_GRID_VISIBILITY, DisplayMessages.getMessage("action.title.grid"), IAction.AS_CHECK_BOX); gridAction.setImageDescriptor(Activator.getImageDescriptor(ImageKey.GRID)); addRetargetAction(gridAction); final RetargetAction tooltipAction = new RetargetAction(ToggleMainColumnAction.ID, DisplayMessages.getMessage("action.title.tooltip"), IAction.AS_CHECK_BOX); tooltipAction.setImageDescriptor(Activator.getImageDescriptor(ImageKey.TOOLTIP)); addRetargetAction(tooltipAction); final RetargetAction toggleMainColumnAction = new RetargetAction(ToggleMainColumnAction.ID, DisplayMessages.getMessage("action.title.mainColumn"), IAction.AS_CHECK_BOX); toggleMainColumnAction.setImageDescriptor(Activator.getImageDescriptor(ImageKey.MAIN_COLUMN)); addRetargetAction(toggleMainColumnAction); final RetargetAction exportDdlAction = new RetargetAction(ExportToDDLAction.ID, DisplayMessages.getMessage("dialog.title.export.ddl"), IAction.AS_CHECK_BOX); exportDdlAction.setImageDescriptor(Activator.getImageDescriptor(ImageKey.EXPORT_DDL)); addRetargetAction(exportDdlAction); final RetargetAction lockEditAction = new RetargetAction(LockEditAction.ID, DisplayMessages.getMessage("action.title.lock.edit"), IAction.AS_CHECK_BOX); lockEditAction.setImageDescriptor(Activator.getImageDescriptor(ImageKey.LOCK_EDIT)); addRetargetAction(lockEditAction); addRetargetAction(new ExportToDBRetargetAction()); final AlignmentRetargetAction alignLeftAction = new AlignmentRetargetAction(PositionConstants.LEFT); alignLeftAction.setImageDescriptor(Activator.getImageDescriptor(ImageKey.ALIGN_LEFT)); alignLeftAction.setDisabledImageDescriptor(null); addRetargetAction(alignLeftAction); final AlignmentRetargetAction alignCenterAction = new AlignmentRetargetAction(PositionConstants.CENTER); alignCenterAction.setImageDescriptor(Activator.getImageDescriptor(ImageKey.ALIGN_CENTER)); alignCenterAction.setDisabledImageDescriptor(null); addRetargetAction(alignCenterAction); final AlignmentRetargetAction alignRightAction = new AlignmentRetargetAction(PositionConstants.RIGHT); alignRightAction.setImageDescriptor(Activator.getImageDescriptor(ImageKey.ALIGN_RIGHT)); alignRightAction.setDisabledImageDescriptor(null); addRetargetAction(alignRightAction); final AlignmentRetargetAction alignTopAction = new AlignmentRetargetAction(PositionConstants.TOP); alignTopAction.setImageDescriptor(Activator.getImageDescriptor(ImageKey.ALIGN_TOP)); alignTopAction.setDisabledImageDescriptor(null); addRetargetAction(alignTopAction); final AlignmentRetargetAction alignMiddleAction = new AlignmentRetargetAction(PositionConstants.MIDDLE); alignMiddleAction.setImageDescriptor(Activator.getImageDescriptor(ImageKey.ALIGN_MIDDLE)); alignMiddleAction.setDisabledImageDescriptor(null); addRetargetAction(alignMiddleAction); final AlignmentRetargetAction alignBottomAction = new AlignmentRetargetAction(PositionConstants.BOTTOM); alignBottomAction.setImageDescriptor(Activator.getImageDescriptor(ImageKey.ALIGN_BOTTOM)); alignBottomAction.setDisabledImageDescriptor(null); addRetargetAction(alignBottomAction); final MatchWidthRetargetAction matchWidthAction = new MatchWidthRetargetAction(); matchWidthAction.setImageDescriptor(Activator.getImageDescriptor(ImageKey.MATCH_WIDTH)); matchWidthAction.setDisabledImageDescriptor(null); addRetargetAction(matchWidthAction); final MatchHeightRetargetAction matchHeightAction = new MatchHeightRetargetAction(); matchHeightAction.setImageDescriptor(Activator.getImageDescriptor(ImageKey.MATCH_HEIGHT)); matchHeightAction.setDisabledImageDescriptor(null); addRetargetAction(matchHeightAction); addRetargetAction(new HorizontalLineRetargetAction()); addRetargetAction(new VerticalLineRetargetAction()); addRetargetAction(new ChangeBackgroundColorRetargetAction()); }
Example #3
Source File: DesignerActionBarContributor.java From birt with Eclipse Public License 1.0 | 4 votes |
protected void buildActions( ) { if ( isBuilt ) return; isBuilt = true; addRetargetAction( new UndoRetargetAction( ) ); addRetargetAction( new RedoRetargetAction( ) ); addRetargetAction( new DeleteRetargetAction( ) ); addRetargetAction( new ZoomInRetargetAction( ) ); addRetargetAction( new ZoomOutRetargetAction( ) ); addRetargetAction( new RetargetAction( ActionFactory.CUT.getId( ), null ) ); addRetargetAction( new RetargetAction( ActionFactory.COPY.getId( ), null ) ); addRetargetAction( new RetargetAction( ActionFactory.PASTE.getId( ), null ) ); addRetargetAction( new RetargetAction( ImportCSSStyleAction.ID, ImportCSSStyleAction.ACTION_TEXT ) ); addRetargetAction( new RetargetAction( AddStyleAction.ID, Messages.getString( "DesignerActionBarContributor.style.new" ) ) ); //$NON-NLS-1$ addRetargetAction( new RetargetAction( ApplyStyleMenuAction.ID, null ) ); addRetargetAction( new RetargetAction( EditStyleMenuAction.ID, null ) ); addRetargetAction( new RetargetAction( DeleteStyleMenuAction.ID, null ) ); addRetargetAction( new RetargetAction( EditGroupMenuAction.ID, null ) ); addRetargetAction( new RetargetAction( InsertGroupMenuAction.ID, null ) ); registerActions( new RegisterAction[]{ new RegisterAction( GEFActionConstants.TOGGLE_RULER_VISIBILITY, Messages.getString( "DesignerActionBarContributor.menu.element-showRuler" ), //$NON-NLS-1$ IAction.AS_CHECK_BOX ) } ); registerActions( new RegisterAction[]{ new RegisterAction( ToggleMarginVisibilityAction.ID, ToggleMarginVisibilityAction.LABEL, IAction.AS_CHECK_BOX ) } ); registerActions( getInsertElementActions( ) ); registerActions( elementActions ); addRetargetAction( new RetargetAction( ImportLibraryAction.ID, ImportLibraryAction.ACTION_TEXT ) ); addRetargetAction( new RetargetAction( InsertAggregationAction.ID, InsertAggregationAction.TEXT ) ); addRetargetAction( new RetargetAction( InsertRelativeTimePeriodAction.ID, InsertRelativeTimePeriodAction.TEXT ) ); }