(int tool)
| 642 | } |
| 643 | |
| 644 | private void showMessage(int tool) { |
| 645 | if (IJ.statusBarProtected()) |
| 646 | return; |
| 647 | if (tool>=UNUSED && tool<getNumTools() && names[tool]!=null) { |
| 648 | String name = names[tool]; |
| 649 | int index = name.indexOf("Action Tool"); |
| 650 | if (index!=-1) |
| 651 | name = name.replace("Action Tool", "Tool"); |
| 652 | else { |
| 653 | index = name.indexOf("Menu Tool"); |
| 654 | if (index!=-1) |
| 655 | name = name.substring(0, index+4); |
| 656 | } |
| 657 | IJ.showStatus(name); |
| 658 | return; |
| 659 | } |
| 660 | String hint = " (alt or long click to switch)"; |
| 661 | String hint2 = " (alt or long click to switch; double click to configure)"; |
| 662 | switch (tool) { |
| 663 | case RECTANGLE: |
| 664 | if (rectType==ROUNDED_RECT_ROI) |
| 665 | IJ.showStatus("Rectangle, *rounded rect* or rotated rect"+hint); |
| 666 | else if (rectType==ROTATED_RECT_ROI) |
| 667 | IJ.showStatus("Rectangle, rounded rect or *rotated rect*"+hint); |
| 668 | else |
| 669 | IJ.showStatus("*Rectangle*, rounded rect or rotated rect"+hint); |
| 670 | return; |
| 671 | case OVAL: |
| 672 | if (ovalType==BRUSH_ROI) |
| 673 | IJ.showStatus("Oval, elliptical or *brush* selections"+hint); |
| 674 | else if (ovalType==ELLIPSE_ROI) |
| 675 | IJ.showStatus("Oval, *elliptical* or brush selections"+hint); |
| 676 | else |
| 677 | IJ.showStatus("*Oval*, elliptical or brush selections"+hint); |
| 678 | return; |
| 679 | case POLYGON: |
| 680 | IJ.showStatus("Polygon selections"); |
| 681 | return; |
| 682 | case FREEROI: |
| 683 | IJ.showStatus("Freehand selections"); |
| 684 | return; |
| 685 | case LINE: |
| 686 | if (arrowMode) |
| 687 | IJ.showStatus("Straight, segmented or freehand lines, or *arrows*"+hint); |
| 688 | else |
| 689 | IJ.showStatus("*Straight*, segmented or freehand lines, or arrows"+hint); |
| 690 | return; |
| 691 | case POLYLINE: |
| 692 | IJ.showStatus("Straight, *segmented* or freehand lines, or arrows"+hint); |
| 693 | return; |
| 694 | case FREELINE: |
| 695 | IJ.showStatus("Straight, segmented or *freehand* lines, or arrows"+hint); |
| 696 | return; |
| 697 | case POINT: |
| 698 | if (multiPointMode) |
| 699 | IJ.showStatus("*Multi-point* or point"+hint2); |
| 700 | else |
| 701 | IJ.showStatus("*Point* or multi-point"+hint2); |
no test coverage detected