From: <pen...@pe...> - 2009-07-06 20:16:26
|
Author: mdamour Date: 2009-07-06 15:16:18 -0500 (Mon, 06 Jul 2009) New Revision: 9335 Modified: tools/report-designer/trunk/report-designer/src/org/pentaho/reporting/designer/core/Translations.properties tools/report-designer/trunk/report-designer/src/org/pentaho/reporting/designer/core/actions/global/ShowPreviewPaneAction.java tools/report-designer/trunk/report-designer/src/org/pentaho/reporting/designer/core/actions/global/ToggleInspectionsToolWindowAction.java tools/report-designer/trunk/report-designer/src/org/pentaho/reporting/designer/core/actions/global/TogglePropertiesToolWindowAction.java tools/report-designer/trunk/report-designer/src/org/pentaho/reporting/designer/core/actions/global/ToggleStructureToolWindowAction.java tools/report-designer/trunk/report-designer/src/org/pentaho/reporting/designer/core/actions/report/RunAsPopupAction.java tools/report-designer/trunk/report-designer/src/org/pentaho/reporting/designer/core/actions/report/SelectionWaitingAction.java tools/report-designer/trunk/report-designer/src/org/pentaho/reporting/designer/core/actions/report/ShowAddDataSourcePopupAction.java tools/report-designer/trunk/report-designer/src/org/pentaho/reporting/designer/core/editor/ReportRendererComponent.java tools/report-designer/trunk/report-designer/src/org/pentaho/reporting/designer/core/editor/preview/DesignerPreviewPane.java tools/report-designer/trunk/report-designer/src/org/pentaho/reporting/designer/core/editor/report/AbstractRenderComponent.java Log: PRD-1444 missing hot keys, worked in 2.0 Modified: tools/report-designer/trunk/report-designer/src/org/pentaho/reporting/designer/core/Translations.properties =================================================================== --- tools/report-designer/trunk/report-designer/src/org/pentaho/reporting/designer/core/Translations.properties 2009-07-06 19:29:41 UTC (rev 9334) +++ tools/report-designer/trunk/report-designer/src/org/pentaho/reporting/designer/core/Translations.properties 2009-07-06 20:16:18 UTC (rev 9335) @@ -1680,6 +1680,19 @@ OVERWRITE_DIALOG_TITLE=Overwrite FILE_EXTENSION_VERIFICATION_TITLE=Verify File Extention +ToggleInspectionsToolWindowAction.Accelerator=alt 1 +TogglePropertiesToolWindowAction.Accelerator=alt 2 +ToggleStructureToolWindowAction.Accelerator=alt 3 + +ShowAddDataSourcePopupAction.Text=Add DataSources +ShowAddDataSourcePopupAction.Description=Add DataSources + +SelectionWaitingAction.Text=Select Objects +SelectionWaitingAction.Description=Select Objects + +RunAsPopupAction.Text=Run +RunAsPopupAction.Description=Run + MoveElement=Move Element MoveElementLayer=Move Element Layer EditDataSource=Edit Data Source Modified: tools/report-designer/trunk/report-designer/src/org/pentaho/reporting/designer/core/actions/global/ShowPreviewPaneAction.java =================================================================== --- tools/report-designer/trunk/report-designer/src/org/pentaho/reporting/designer/core/actions/global/ShowPreviewPaneAction.java 2009-07-06 19:29:41 UTC (rev 9334) +++ tools/report-designer/trunk/report-designer/src/org/pentaho/reporting/designer/core/actions/global/ShowPreviewPaneAction.java 2009-07-06 20:16:18 UTC (rev 9335) @@ -27,7 +27,7 @@ /** * Todo: Document Me - * + * * @author Ezequiel Cuellar */ public final class ShowPreviewPaneAction extends AbstractReportContextAction implements ToggleStateAction @@ -36,12 +36,20 @@ public ShowPreviewPaneAction() { - this(IconLoader.getInstance().getPreviewIcon()); + this(IconLoader.getInstance().getPreviewIcon(), true); } - public ShowPreviewPaneAction(Icon aIcon) + public ShowPreviewPaneAction(Icon aIcon, boolean preview) { putValue(Action.NAME, TranslationManager.getCoreInstance().getTranslation("ShowPreviewPaneCommand.Text")); + if (preview) + { + putValue(Action.SHORT_DESCRIPTION, TranslationManager.getCoreInstance().getTranslation("ShowPreviewPaneCommand.Text")); + } + else + { + putValue(Action.SHORT_DESCRIPTION, TranslationManager.getCoreInstance().getTranslation("ShowEditorPaneCommand.Text")); + } putValue(Action.SMALL_ICON, aIcon); } @@ -84,4 +92,3 @@ } } - Modified: tools/report-designer/trunk/report-designer/src/org/pentaho/reporting/designer/core/actions/global/ToggleInspectionsToolWindowAction.java =================================================================== --- tools/report-designer/trunk/report-designer/src/org/pentaho/reporting/designer/core/actions/global/ToggleInspectionsToolWindowAction.java 2009-07-06 19:29:41 UTC (rev 9334) +++ tools/report-designer/trunk/report-designer/src/org/pentaho/reporting/designer/core/actions/global/ToggleInspectionsToolWindowAction.java 2009-07-06 20:16:18 UTC (rev 9335) @@ -7,6 +7,8 @@ import org.pentaho.reporting.designer.core.ReportDesignerView; import org.pentaho.reporting.designer.core.actions.ToggleStateAction; import org.pentaho.reporting.designer.core.util.IconLoader; +import org.pentaho.reporting.designer.core.util.KeyStrokeUtil; +import org.pentaho.reporting.designer.core.util.TranslationManager; /** * @author Michael D'Amour @@ -19,6 +21,8 @@ { putValue(Action.NAME, "Messages"); putValue(Action.SMALL_ICON, IconLoader.getInstance().getGenericSquareDisabled()); + putValue(Action.ACCELERATOR_KEY, KeyStrokeUtil.getKeyStroke(TranslationManager.getCoreInstance().getTranslation( + "ToggleInspectionsToolWindowAction.Accelerator"))); } public void actionPerformed(final ActionEvent e) Modified: tools/report-designer/trunk/report-designer/src/org/pentaho/reporting/designer/core/actions/global/TogglePropertiesToolWindowAction.java =================================================================== --- tools/report-designer/trunk/report-designer/src/org/pentaho/reporting/designer/core/actions/global/TogglePropertiesToolWindowAction.java 2009-07-06 19:29:41 UTC (rev 9334) +++ tools/report-designer/trunk/report-designer/src/org/pentaho/reporting/designer/core/actions/global/TogglePropertiesToolWindowAction.java 2009-07-06 20:16:18 UTC (rev 9335) @@ -7,6 +7,8 @@ import org.pentaho.reporting.designer.core.ReportDesignerView; import org.pentaho.reporting.designer.core.actions.ToggleStateAction; import org.pentaho.reporting.designer.core.util.IconLoader; +import org.pentaho.reporting.designer.core.util.KeyStrokeUtil; +import org.pentaho.reporting.designer.core.util.TranslationManager; /** * Todo: Document Me @@ -21,6 +23,8 @@ { putValue(Action.NAME, "Element Properties"); putValue(Action.SMALL_ICON, IconLoader.getInstance().getGenericSquareDisabled()); + putValue(Action.ACCELERATOR_KEY, KeyStrokeUtil.getKeyStroke(TranslationManager.getCoreInstance().getTranslation( + "TogglePropertiesToolWindowAction.Accelerator"))); } public void actionPerformed(final ActionEvent e) Modified: tools/report-designer/trunk/report-designer/src/org/pentaho/reporting/designer/core/actions/global/ToggleStructureToolWindowAction.java =================================================================== --- tools/report-designer/trunk/report-designer/src/org/pentaho/reporting/designer/core/actions/global/ToggleStructureToolWindowAction.java 2009-07-06 19:29:41 UTC (rev 9334) +++ tools/report-designer/trunk/report-designer/src/org/pentaho/reporting/designer/core/actions/global/ToggleStructureToolWindowAction.java 2009-07-06 20:16:18 UTC (rev 9335) @@ -7,6 +7,8 @@ import org.pentaho.reporting.designer.core.ReportDesignerView; import org.pentaho.reporting.designer.core.actions.ToggleStateAction; import org.pentaho.reporting.designer.core.util.IconLoader; +import org.pentaho.reporting.designer.core.util.KeyStrokeUtil; +import org.pentaho.reporting.designer.core.util.TranslationManager; /** * Todo: Document Me @@ -21,6 +23,8 @@ { putValue(Action.NAME, "Report Explorer"); putValue(Action.SMALL_ICON, IconLoader.getInstance().getGenericSquareDisabled()); + putValue(Action.ACCELERATOR_KEY, KeyStrokeUtil.getKeyStroke(TranslationManager.getCoreInstance().getTranslation( + "ToggleStructureToolWindowAction.Accelerator"))); } public void actionPerformed(final ActionEvent e) Modified: tools/report-designer/trunk/report-designer/src/org/pentaho/reporting/designer/core/actions/report/RunAsPopupAction.java =================================================================== --- tools/report-designer/trunk/report-designer/src/org/pentaho/reporting/designer/core/actions/report/RunAsPopupAction.java 2009-07-06 19:29:41 UTC (rev 9334) +++ tools/report-designer/trunk/report-designer/src/org/pentaho/reporting/designer/core/actions/report/RunAsPopupAction.java 2009-07-06 20:16:18 UTC (rev 9335) @@ -7,6 +7,7 @@ import org.pentaho.reporting.designer.core.actions.AbstractReportContextAction; import org.pentaho.reporting.designer.core.util.IconLoader; +import org.pentaho.reporting.designer.core.util.TranslationManager; /** * Todo: Document Me @@ -17,8 +18,9 @@ { public RunAsPopupAction() { - putValue(Action.NAME, "Run As"); + putValue(Action.NAME, TranslationManager.getCoreInstance().getTranslation("RunAsPopupAction.Text")); putValue(Action.SMALL_ICON, IconLoader.getInstance().getCreateReportIcon()); + putValue(Action.SHORT_DESCRIPTION, TranslationManager.getCoreInstance().getTranslation("RunAsPopupAction.Description")); } public void actionPerformed(final ActionEvent e) Modified: tools/report-designer/trunk/report-designer/src/org/pentaho/reporting/designer/core/actions/report/SelectionWaitingAction.java =================================================================== --- tools/report-designer/trunk/report-designer/src/org/pentaho/reporting/designer/core/actions/report/SelectionWaitingAction.java 2009-07-06 19:29:41 UTC (rev 9334) +++ tools/report-designer/trunk/report-designer/src/org/pentaho/reporting/designer/core/actions/report/SelectionWaitingAction.java 2009-07-06 20:16:18 UTC (rev 9335) @@ -8,6 +8,7 @@ import org.pentaho.reporting.designer.core.ReportDesignerContext; import org.pentaho.reporting.designer.core.util.IconLoader; +import org.pentaho.reporting.designer.core.util.TranslationManager; import org.pentaho.reporting.designer.core.actions.AbstractReportContextAction; import org.pentaho.reporting.designer.core.actions.ToggleStateAction; @@ -37,8 +38,9 @@ public SelectionWaitingAction() { selectionWaitingHandler = new SelectionWaitingHandler(); - putValue(Action.NAME, "Select Objects"); + putValue(Action.NAME, TranslationManager.getCoreInstance().getTranslation("SelectionWaitingAction.Text")); putValue(Action.SMALL_ICON, IconLoader.getInstance().getrubberbandSelectionIcon()); + putValue(Action.SHORT_DESCRIPTION, TranslationManager.getCoreInstance().getTranslation("SelectionWaitingAction.Description")); } protected void updateDesignerContext(final ReportDesignerContext oldContext, final ReportDesignerContext newContext) Modified: tools/report-designer/trunk/report-designer/src/org/pentaho/reporting/designer/core/actions/report/ShowAddDataSourcePopupAction.java =================================================================== --- tools/report-designer/trunk/report-designer/src/org/pentaho/reporting/designer/core/actions/report/ShowAddDataSourcePopupAction.java 2009-07-06 19:29:41 UTC (rev 9334) +++ tools/report-designer/trunk/report-designer/src/org/pentaho/reporting/designer/core/actions/report/ShowAddDataSourcePopupAction.java 2009-07-06 20:16:18 UTC (rev 9335) @@ -9,6 +9,7 @@ import org.pentaho.reporting.designer.core.actions.AbstractReportContextAction; import org.pentaho.reporting.designer.core.editor.ContextMenuUtility; import org.pentaho.reporting.designer.core.util.IconLoader; +import org.pentaho.reporting.designer.core.util.TranslationManager; /** * Todo: Document Me @@ -19,8 +20,9 @@ { public ShowAddDataSourcePopupAction() { - putValue(Action.NAME, "Add DataSources"); + putValue(Action.NAME, TranslationManager.getCoreInstance().getTranslation("ShowAddDataSourcePopupAction.Text")); putValue(Action.SMALL_ICON, IconLoader.getInstance().getDataSetsIcon()); + putValue(Action.SHORT_DESCRIPTION, TranslationManager.getCoreInstance().getTranslation("ShowAddDataSourcePopupAction.Description")); } public void actionPerformed(final ActionEvent e) Modified: tools/report-designer/trunk/report-designer/src/org/pentaho/reporting/designer/core/editor/ReportRendererComponent.java =================================================================== --- tools/report-designer/trunk/report-designer/src/org/pentaho/reporting/designer/core/editor/ReportRendererComponent.java 2009-07-06 19:29:41 UTC (rev 9334) +++ tools/report-designer/trunk/report-designer/src/org/pentaho/reporting/designer/core/editor/ReportRendererComponent.java 2009-07-06 20:16:18 UTC (rev 9335) @@ -481,7 +481,7 @@ theReportTb.setBorder(new EtchedBorder()); theReportTb.setFloatable(false); - final ShowPreviewPaneAction previewAction = new ShowPreviewPaneAction(IconLoader.getInstance().getPreviewIcon()); + final ShowPreviewPaneAction previewAction = new ShowPreviewPaneAction(IconLoader.getInstance().getPreviewIcon(), true); previewAction.setReportDesignerContext(designerContext); final JButton previewButton = new JButton(); previewButton.putClientProperty("hideActionText", Boolean.TRUE); Modified: tools/report-designer/trunk/report-designer/src/org/pentaho/reporting/designer/core/editor/preview/DesignerPreviewPane.java =================================================================== --- tools/report-designer/trunk/report-designer/src/org/pentaho/reporting/designer/core/editor/preview/DesignerPreviewPane.java 2009-07-06 19:29:41 UTC (rev 9334) +++ tools/report-designer/trunk/report-designer/src/org/pentaho/reporting/designer/core/editor/preview/DesignerPreviewPane.java 2009-07-06 20:16:18 UTC (rev 9335) @@ -43,7 +43,7 @@ protected Action[] getToolbarPreActions() { - final ShowPreviewPaneAction action = new ShowPreviewPaneAction(IconLoader.getInstance().getEditIcon()); + final ShowPreviewPaneAction action = new ShowPreviewPaneAction(IconLoader.getInstance().getEditIcon(), false); action.setReportDesignerContext(context); return new Action[]{action}; } Modified: tools/report-designer/trunk/report-designer/src/org/pentaho/reporting/designer/core/editor/report/AbstractRenderComponent.java =================================================================== --- tools/report-designer/trunk/report-designer/src/org/pentaho/reporting/designer/core/editor/report/AbstractRenderComponent.java 2009-07-06 19:29:41 UTC (rev 9334) +++ tools/report-designer/trunk/report-designer/src/org/pentaho/reporting/designer/core/editor/report/AbstractRenderComponent.java 2009-07-06 20:16:18 UTC (rev 9335) @@ -35,6 +35,9 @@ import org.pentaho.reporting.designer.core.ReportDesignerBoot; import org.pentaho.reporting.designer.core.ReportDesignerContext; +import org.pentaho.reporting.designer.core.actions.elements.format.BoldAction; +import org.pentaho.reporting.designer.core.actions.elements.format.ItalicsAction; +import org.pentaho.reporting.designer.core.actions.elements.format.UnderlineAction; import org.pentaho.reporting.designer.core.editor.ContextMenuUtility; import org.pentaho.reporting.designer.core.editor.ReportRenderContext; import org.pentaho.reporting.designer.core.editor.ZoomModelListener; @@ -195,6 +198,29 @@ final MassElementStyleUndoEntryBuilder builder = new MassElementStyleUndoEntryBuilder(visualElements); final MoveDragOperation mop = new MoveDragOperation(visualElements, new Point(), EmptySnapModel.INSTANCE, EmptySnapModel.INSTANCE); + if (arg0.isControlDown() && arg0.getKeyCode() == KeyEvent.VK_B) { + BoldAction ba = new BoldAction(); + ba.setReportDesignerContext(designerContext); + ba.actionPerformed(null); + mop.finish(); + return; + } else + if (arg0.isControlDown() && arg0.getKeyCode() == KeyEvent.VK_I) { + ItalicsAction ia = new ItalicsAction(); + ia.setReportDesignerContext(designerContext); + ia.actionPerformed(null); + mop.finish(); + return; + } else + if (arg0.isControlDown() && arg0.getKeyCode() == KeyEvent.VK_U) { + UnderlineAction ua = new UnderlineAction(); + ua.setReportDesignerContext(designerContext); + ua.actionPerformed(null); + mop.finish(); + return; + } + + if (arg0.isShiftDown() == false && arg0.isAltDown() == false && arg0.isControlDown() == false) { if (arg0.getKeyCode() == KeyEvent.VK_UP) |