Révision 2461
| tmp/org.txm.chartsengine.rcp/src/org/txm/chartsengine/rcp/handlers/MoveUpChartView.java (revision 2461) | ||
|---|---|---|
| 1 |
package org.txm.chartsengine.rcp.handlers; |
|
| 2 |
|
|
| 3 |
import org.eclipse.core.commands.AbstractHandler; |
|
| 4 |
import org.eclipse.core.commands.ExecutionEvent; |
|
| 5 |
import org.eclipse.core.commands.ExecutionException; |
|
| 6 |
import org.txm.chartsengine.rcp.SWTChartsComponentsProvider; |
|
| 7 |
import org.txm.chartsengine.rcp.editors.ChartEditor; |
|
| 8 |
|
|
| 9 |
/** |
|
| 10 |
* Resets the chart view of the active chart editor part. |
|
| 11 |
* |
|
| 12 |
* @author sjacquot |
|
| 13 |
* |
|
| 14 |
*/ |
|
| 15 |
public class MoveUpChartView extends AbstractHandler {
|
|
| 16 |
|
|
| 17 |
|
|
| 18 |
@Override |
|
| 19 |
public Object execute(ExecutionEvent event) throws ExecutionException {
|
|
| 20 |
ChartEditor chartEditor = SWTChartsComponentsProvider.getActiveChartEditor(event); |
|
| 21 |
|
|
| 22 |
try {
|
|
| 23 |
chartEditor.pan(0, 0, 0, 1, 0.1); |
|
| 24 |
} |
|
| 25 |
catch (Exception e) {
|
|
| 26 |
// nothing to do |
|
| 27 |
} |
|
| 28 |
return chartEditor; |
|
| 29 |
} |
|
| 30 |
|
|
| 31 |
} |
|
| 0 | 32 | |
| tmp/org.txm.chartsengine.rcp/src/org/txm/chartsengine/rcp/handlers/ZoomInChartView.java (revision 2461) | ||
|---|---|---|
| 1 |
package org.txm.chartsengine.rcp.handlers; |
|
| 2 |
|
|
| 3 |
import org.eclipse.core.commands.AbstractHandler; |
|
| 4 |
import org.eclipse.core.commands.ExecutionEvent; |
|
| 5 |
import org.eclipse.core.commands.ExecutionException; |
|
| 6 |
import org.eclipse.swt.graphics.Point; |
|
| 7 |
import org.txm.chartsengine.rcp.SWTChartsComponentsProvider; |
|
| 8 |
import org.txm.chartsengine.rcp.editors.ChartEditor; |
|
| 9 |
|
|
| 10 |
/** |
|
| 11 |
* Resets the chart view of the active chart editor part. |
|
| 12 |
* |
|
| 13 |
* @author sjacquot |
|
| 14 |
* |
|
| 15 |
*/ |
|
| 16 |
public class ZoomInChartView extends AbstractHandler {
|
|
| 17 |
|
|
| 18 |
|
|
| 19 |
@Override |
|
| 20 |
public Object execute(ExecutionEvent event) throws ExecutionException {
|
|
| 21 |
ChartEditor chartEditor = SWTChartsComponentsProvider.getActiveChartEditor(event); |
|
| 22 |
|
|
| 23 |
try {
|
|
| 24 |
Point p = chartEditor.getChartComposite().getSize(); |
|
| 25 |
chartEditor.zoom(p.x / 2, p.y / 2, true); |
|
| 26 |
} |
|
| 27 |
catch (Exception e) {
|
|
| 28 |
// nothing to do |
|
| 29 |
} |
|
| 30 |
return chartEditor; |
|
| 31 |
} |
|
| 32 |
|
|
| 33 |
} |
|
| 0 | 34 | |
| tmp/org.txm.chartsengine.rcp/src/org/txm/chartsengine/rcp/handlers/ZoomOutChartView.java (revision 2461) | ||
|---|---|---|
| 1 |
package org.txm.chartsengine.rcp.handlers; |
|
| 2 |
|
|
| 3 |
import org.eclipse.core.commands.AbstractHandler; |
|
| 4 |
import org.eclipse.core.commands.ExecutionEvent; |
|
| 5 |
import org.eclipse.core.commands.ExecutionException; |
|
| 6 |
import org.eclipse.swt.graphics.Point; |
|
| 7 |
import org.txm.chartsengine.rcp.SWTChartsComponentsProvider; |
|
| 8 |
import org.txm.chartsengine.rcp.editors.ChartEditor; |
|
| 9 |
|
|
| 10 |
/** |
|
| 11 |
* Resets the chart view of the active chart editor part. |
|
| 12 |
* |
|
| 13 |
* @author sjacquot |
|
| 14 |
* |
|
| 15 |
*/ |
|
| 16 |
public class ZoomOutChartView extends AbstractHandler {
|
|
| 17 |
|
|
| 18 |
|
|
| 19 |
@Override |
|
| 20 |
public Object execute(ExecutionEvent event) throws ExecutionException {
|
|
| 21 |
ChartEditor chartEditor = SWTChartsComponentsProvider.getActiveChartEditor(event); |
|
| 22 |
|
|
| 23 |
try {
|
|
| 24 |
Point p = chartEditor.getChartComposite().getSize(); |
|
| 25 |
chartEditor.zoom(p.x / 2, p.y / 2, false); |
|
| 26 |
} |
|
| 27 |
catch (Exception e) {
|
|
| 28 |
// nothing to do |
|
| 29 |
} |
|
| 30 |
return chartEditor; |
|
| 31 |
} |
|
| 32 |
|
|
| 33 |
} |
|
| 0 | 34 | |
| tmp/org.txm.chartsengine.rcp/src/org/txm/chartsengine/rcp/handlers/MoveDownChartView.java (revision 2461) | ||
|---|---|---|
| 1 |
package org.txm.chartsengine.rcp.handlers; |
|
| 2 |
|
|
| 3 |
import org.eclipse.core.commands.AbstractHandler; |
|
| 4 |
import org.eclipse.core.commands.ExecutionEvent; |
|
| 5 |
import org.eclipse.core.commands.ExecutionException; |
|
| 6 |
import org.txm.chartsengine.rcp.SWTChartsComponentsProvider; |
|
| 7 |
import org.txm.chartsengine.rcp.editors.ChartEditor; |
|
| 8 |
|
|
| 9 |
/** |
|
| 10 |
* Resets the chart view of the active chart editor part. |
|
| 11 |
* |
|
| 12 |
* @author sjacquot |
|
| 13 |
* |
|
| 14 |
*/ |
|
| 15 |
public class MoveDownChartView extends AbstractHandler {
|
|
| 16 |
|
|
| 17 |
|
|
| 18 |
@Override |
|
| 19 |
public Object execute(ExecutionEvent event) throws ExecutionException {
|
|
| 20 |
ChartEditor chartEditor = SWTChartsComponentsProvider.getActiveChartEditor(event); |
|
| 21 |
|
|
| 22 |
try {
|
|
| 23 |
chartEditor.pan(0, 0, 0, -1, 0.1); |
|
| 24 |
} |
|
| 25 |
catch (Exception e) {
|
|
| 26 |
// nothing to do |
|
| 27 |
} |
|
| 28 |
return chartEditor; |
|
| 29 |
} |
|
| 30 |
|
|
| 31 |
} |
|
| 0 | 32 | |
| tmp/org.txm.chartsengine.rcp/src/org/txm/chartsengine/rcp/handlers/MoveLeftChartView.java (revision 2461) | ||
|---|---|---|
| 1 |
package org.txm.chartsengine.rcp.handlers; |
|
| 2 |
|
|
| 3 |
import org.eclipse.core.commands.AbstractHandler; |
|
| 4 |
import org.eclipse.core.commands.ExecutionEvent; |
|
| 5 |
import org.eclipse.core.commands.ExecutionException; |
|
| 6 |
import org.txm.chartsengine.rcp.SWTChartsComponentsProvider; |
|
| 7 |
import org.txm.chartsengine.rcp.editors.ChartEditor; |
|
| 8 |
|
|
| 9 |
/** |
|
| 10 |
* Resets the chart view of the active chart editor part. |
|
| 11 |
* |
|
| 12 |
* @author sjacquot |
|
| 13 |
* |
|
| 14 |
*/ |
|
| 15 |
public class MoveLeftChartView extends AbstractHandler {
|
|
| 16 |
|
|
| 17 |
|
|
| 18 |
@Override |
|
| 19 |
public Object execute(ExecutionEvent event) throws ExecutionException {
|
|
| 20 |
ChartEditor chartEditor = SWTChartsComponentsProvider.getActiveChartEditor(event); |
|
| 21 |
|
|
| 22 |
try {
|
|
| 23 |
chartEditor.pan(0, 0, -1, 0, 0.1); |
|
| 24 |
} |
|
| 25 |
catch (Exception e) {
|
|
| 26 |
// nothing to do |
|
| 27 |
} |
|
| 28 |
return chartEditor; |
|
| 29 |
} |
|
| 30 |
|
|
| 31 |
} |
|
| 0 | 32 | |
| tmp/org.txm.chartsengine.rcp/src/org/txm/chartsengine/rcp/handlers/MoveRightChartView.java (revision 2461) | ||
|---|---|---|
| 1 |
package org.txm.chartsengine.rcp.handlers; |
|
| 2 |
|
|
| 3 |
import org.eclipse.core.commands.AbstractHandler; |
|
| 4 |
import org.eclipse.core.commands.ExecutionEvent; |
|
| 5 |
import org.eclipse.core.commands.ExecutionException; |
|
| 6 |
import org.txm.chartsengine.rcp.SWTChartsComponentsProvider; |
|
| 7 |
import org.txm.chartsengine.rcp.editors.ChartEditor; |
|
| 8 |
|
|
| 9 |
/** |
|
| 10 |
* Resets the chart view of the active chart editor part. |
|
| 11 |
* |
|
| 12 |
* @author sjacquot |
|
| 13 |
* |
|
| 14 |
*/ |
|
| 15 |
public class MoveRightChartView extends AbstractHandler {
|
|
| 16 |
|
|
| 17 |
|
|
| 18 |
@Override |
|
| 19 |
public Object execute(ExecutionEvent event) throws ExecutionException {
|
|
| 20 |
ChartEditor chartEditor = SWTChartsComponentsProvider.getActiveChartEditor(event); |
|
| 21 |
|
|
| 22 |
try {
|
|
| 23 |
chartEditor.pan(0, 0, 1, 0, 0.1); |
|
| 24 |
} |
|
| 25 |
catch (Exception e) {
|
|
| 26 |
// nothing to do |
|
| 27 |
} |
|
| 28 |
return chartEditor; |
|
| 29 |
} |
|
| 30 |
|
|
| 31 |
} |
|
| 0 | 32 | |
| tmp/org.txm.chartsengine.rcp/plugin.xml (revision 2461) | ||
|---|---|---|
| 68 | 68 |
icon="icons/reset_view.png" |
| 69 | 69 |
style="push"> |
| 70 | 70 |
</command> |
| 71 |
<command |
|
| 72 |
commandId="ZoomInChartView" |
|
| 73 |
icon="icons/magnifier_zoom_in.png" |
|
| 74 |
style="push"> |
|
| 75 |
</command> |
|
| 76 |
<command |
|
| 77 |
commandId="ZoomOutChartView" |
|
| 78 |
icon="icons/magifier_zoom_out.png" |
|
| 79 |
style="push"> |
|
| 80 |
</command> |
|
| 81 |
<command |
|
| 82 |
commandId="MoveUpChartView" |
|
| 83 |
icon="icons/arrow_up.png" |
|
| 84 |
style="push"> |
|
| 85 |
</command> |
|
| 86 |
<command |
|
| 87 |
commandId="MoveDownChartView" |
|
| 88 |
icon="icons/arrow_down.png" |
|
| 89 |
style="push"> |
|
| 90 |
</command> |
|
| 91 |
<command |
|
| 92 |
commandId="MoveLeftChartView" |
|
| 93 |
icon="icons/arrow_left.png" |
|
| 94 |
style="push"> |
|
| 95 |
</command> |
|
| 96 |
<command |
|
| 97 |
commandId="MoveRightChartView" |
|
| 98 |
icon="icons/arrow_right.png" |
|
| 99 |
style="push"> |
|
| 100 |
</command> |
|
| 71 | 101 |
</menuContribution> |
| 72 | 102 |
<menuContribution |
| 73 | 103 |
allPopups="false" |
| ... | ... | |
| 154 | 184 |
point="org.eclipse.ui.commands"> |
| 155 | 185 |
<command |
| 156 | 186 |
defaultHandler="org.txm.chartsengine.rcp.handlers.ResetChartView" |
| 157 |
description="Reset tha chart view"
|
|
| 187 |
description="Reset the chart view"
|
|
| 158 | 188 |
id="ResetChartView" |
| 159 | 189 |
name="%command.name"> |
| 160 | 190 |
</command> |
| ... | ... | |
| 172 | 202 |
</command> |
| 173 | 203 |
<command defaultHandler="org.txm.chartsengine.rcp.handlers.ExportChart" id="ExportChart" name="%command.name.92"> |
| 174 | 204 |
</command> |
| 205 |
<command |
|
| 206 |
defaultHandler="org.txm.chartsengine.rcp.handlers.MoveRightChartView" |
|
| 207 |
description="Move to the right the chart view" |
|
| 208 |
id="MoveRightChartView" |
|
| 209 |
name="Move right"> |
|
| 210 |
</command> |
|
| 211 |
<command |
|
| 212 |
defaultHandler="org.txm.chartsengine.rcp.handlers.MoveLeftChartView" |
|
| 213 |
description="Move on the left the chart view" |
|
| 214 |
id="MoveLeftChartView" |
|
| 215 |
name="Move left"> |
|
| 216 |
</command> |
|
| 217 |
<command |
|
| 218 |
defaultHandler="org.txm.chartsengine.rcp.handlers.MoveDownChartView" |
|
| 219 |
description="Move down the chart view" |
|
| 220 |
id="MoveDownChartView" |
|
| 221 |
name="Move down"> |
|
| 222 |
</command> |
|
| 223 |
<command |
|
| 224 |
defaultHandler="org.txm.chartsengine.rcp.handlers.MoveUpChartView" |
|
| 225 |
description="Move up the chart view" |
|
| 226 |
id="MoveUpChartView" |
|
| 227 |
name="Move up"> |
|
| 228 |
</command> |
|
| 229 |
<command |
|
| 230 |
defaultHandler="org.txm.chartsengine.rcp.handlers.ZoomOutChartView" |
|
| 231 |
description="Zoom out of the view" |
|
| 232 |
id="ZoomOutChartView" |
|
| 233 |
name="Zoom Out"> |
|
| 234 |
</command> |
|
| 235 |
<command |
|
| 236 |
defaultHandler="org.txm.chartsengine.rcp.handlers.ZoomInChartView" |
|
| 237 |
description="Zoom in the chart view" |
|
| 238 |
id="ZoomInChartView" |
|
| 239 |
name="Zoom In"> |
|
| 240 |
</command> |
|
| 175 | 241 |
</extension> |
| 176 | 242 |
<extension |
| 177 | 243 |
point="org.eclipse.core.expressions.definitions"> |
Formats disponibles : Unified diff