public boolean canUndo() {
return view.canUndo();
}
-
-
+
+ public boolean canAnnotate() {
+ return view.canAnnotate();
+ }
public boolean canRedo() {
return view.canRedo();
}
Tool.ZoomOut.action.setEnabled(canZoomOut());
Tool.ZoomOriginal.action.setEnabled(canZoomOriginal());
Tool.ZoomBestFit.action.setEnabled(canZoomBestFit());
- comboLabel.setEnabled(canZoomBestFit());
+ comboLabel.setEnabled(canAnnotate());
assign.setEnabled(canZoomBestFit() & !(comboLabel.getText().isEmpty()));
Tool.Foreground.action.setChecked(isAnnotatingForeground());
Tool.Background.action.setChecked(isAnnotatingBackground());
return false;
}
+ public boolean canAnnotate() {
+ if (ctx != null) {
+ return ctx.getAnnotations().canUndo();
+ }
+ return false;
+ }
public boolean canRedo() {
if (ctx != null) {
- return ctx.getAnnotations().canRedo();
+ return ctx.getAnnotations().canAnnotate();
}
return false;
}
return !annotations.isEmpty();
}
+ public boolean canAnnotate() {
+ String[] temp = new String[annotations.size()];
+ int i = 0;
+ for(Annotation ann : annotations)
+ {
+ temp[i++] = ann.getType().toString();
+ System.out.println(ann.getType());
+ }
+ for(int j=0;j<temp.length;j++)
+ {
+ System.out.println(temp[j]);
+ }
+ return !annotations.isEmpty();
+ }
public boolean canRedo() {
return !redos.isEmpty();