Skip to content

Commit

Permalink
transform tool
Browse files Browse the repository at this point in the history
  • Loading branch information
Lewis Hemens committed Sep 11, 2011
1 parent 20aadfb commit 685ed9e
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions src/com/lewish/asciiflow/client/tools/TransformTool.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
package com.lewish.asciiflow.client.tools;

import com.google.gwt.resources.client.ImageResource;
import com.google.inject.Inject;
import com.google.inject.Singleton;
import com.lewish.asciiflow.client.Canvas;
import com.lewish.asciiflow.client.HistoryManager;
import com.lewish.asciiflow.client.Tool;
import com.lewish.asciiflow.client.common.Box;
import com.lewish.asciiflow.client.resources.AsciiflowClientBundle;

@Singleton
public class TransformTool extends Tool {

@Inject
public TransformTool(Canvas canvas, HistoryManager historyManager,
AsciiflowClientBundle clientBundle) {
super(canvas, historyManager, clientBundle);
}

@Override
public void mouseOver(int x, int y) {
String value = canvas.getValue(x, y);
if ("+".equals(value)) {

}
};

@Override
public String getLabel() {
return "Transform";
}

@Override
public String getDescription() {
return "Click on box corners and line ends to resize and move them.";
}

@Override
public ImageResource getImageResource() {
// TODO
return clientBundle.freeformToolImage();
}

}

0 comments on commit 685ed9e

Please sign in to comment.