Changeset 121 for trunk/src/org/expeditee/gui/FrameKeyboardActions.java
- Timestamp:
- 07/03/08 16:48:09 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/expeditee/gui/FrameKeyboardActions.java
r115 r121 82 82 // permission check 83 83 if (on != null && !on.hasPermission(Permission.full)) { 84 FrameGraphics85 . DisplayMessage("Insufficient permission to edit this item");84 MessageBay 85 .displayMessage("Insufficient permission to edit this item"); 86 86 return; 87 87 } … … 577 577 && clicked.getParent() != null 578 578 && clicked.getParent().getNameItem() != clicked) { 579 FrameGraphics.DisplayMessage("Insufficient Permission");579 MessageBay.displayMessage("Insufficient Permission"); 580 580 return; 581 581 } … … 621 621 if (current instanceof Text) { 622 622 if (current != null && !current.hasPermission(Permission.copy)) { 623 FrameGraphics624 . DisplayMessage("Insufficient permission to copy that item");623 MessageBay 624 .displayMessage("Insufficient permission to copy that item"); 625 625 return; 626 626 } 627 627 copyItemToClipboard(current); 628 // FrameGraphics.DisplayMessage("Item copied to clipboard");628 // MessageBay.displayMessage("Item copied to clipboard"); 629 629 return; 630 630 } 631 631 if (current != null && !current.hasPermission(Permission.full)) { 632 FrameGraphics633 . DisplayMessage("Insufficient permission edit that item");632 MessageBay 633 .displayMessage("Insufficient permission edit that item"); 634 634 return; 635 635 } … … 656 656 return; 657 657 if (current != null && !current.hasPermission(Permission.full)) { 658 FrameGraphics659 . DisplayMessage("Insufficient permission to cut that item");658 MessageBay 659 .displayMessage("Insufficient permission to cut that item"); 660 660 return; 661 661 } … … 667 667 return; 668 668 if (current != null && !current.hasPermission(Permission.full)) { 669 FrameGraphics670 . DisplayMessage("Insufficient permission toggle the items mark");669 MessageBay 670 .displayMessage("Insufficient permission toggle the items mark"); 671 671 return; 672 672 } … … 742 742 743 743 if (item != null && !item.hasPermission(Permission.full)) { 744 FrameGraphics745 . DisplayMessage("Insufficient permission to copy that item");744 MessageBay 745 .displayMessage("Insufficient permission to copy that item"); 746 746 return null; 747 747 } … … 840 840 break; 841 841 default: 842 FrameGraphics.DisplayMessageOnce(displayMessage);842 MessageBay.displayMessageOnce(displayMessage); 843 843 return; 844 844 } … … 892 892 Collection<Item> enclosed = FrameUtils.getCurrentItems(on); 893 893 if (on == null && (enclosed == null || enclosed.size() == 0)) 894 FrameGraphics.DisplayMessage(displayMessage);894 MessageBay.displayMessage(displayMessage); 895 895 } 896 896 … … 932 932 // if no item was found, return 933 933 if (toDropFrom == null) { 934 FrameGraphics 935 .ErrorMessage("No item could be found to drop from"); 934 MessageBay.errorMessage("No item could be found to drop from"); 936 935 return; 937 936 } 938 937 939 938 if (!(toDropFrom instanceof Text)) { 940 FrameGraphics941 . DisplayMessage("Only text items can be dropped from");939 MessageBay 940 .displayMessage("Only text items can be dropped from"); 942 941 return; 943 942 } … … 948 947 949 948 if (column == null) { 950 FrameGraphics.ErrorMessage("No column found to align items to");949 MessageBay.errorMessage("No column found to align items to"); 951 950 return; 952 951 } … … 1025 1024 FrameMouseActions.getY()); 1026 1025 } else { 1027 FrameGraphics1028 . WarningMessage("Can not create items outside the frame area");1026 MessageBay 1027 .warningMessage("Can not create items outside the frame area"); 1029 1028 // ensures correct repainting when items don't move 1030 1029 DisplayIO.setCursorPosition(DisplayIO.getMouseX(), … … 1045 1044 int deltaY = firstItem.getY() - dummyItem.getY(); 1046 1045 1047 for (Item i : Fr ame.FreeItems) {1046 for (Item i : FreeItems.getInstance()) { 1048 1047 i.setPosition(i.getX() - deltaX, i.getY() - deltaY); 1049 1048 } … … 1057 1056 FrameGraphics.Repaint(); 1058 1057 } catch (RuntimeException e) { 1059 // FrameGraphics.ErrorMessage(e.getMessage());1058 // MessageBay.errorMessage(e.getMessage()); 1060 1059 e.printStackTrace(); 1061 1060 } … … 1237 1236 if (item == null) { 1238 1237 if (Frame.itemAttachedToCursor()) 1239 toSize.addAll(Fr ame.FreeItems);1238 toSize.addAll(FreeItems.getInstance()); 1240 1239 else { 1241 FrameGraphics1242 . DisplayMessage("There are no Items selected on the Frame or on the Cursor");1240 MessageBay 1241 .displayMessage("There are no Items selected on the Frame or on the Cursor"); 1243 1242 return; 1244 1243 } 1245 1244 } else { 1246 1245 if (item.isFrameName()) { 1247 FrameGraphics.DisplayMessage("Can not resize the frame name");1246 MessageBay.displayMessage("Can not resize the frame name"); 1248 1247 return; 1249 1248 } 1250 1249 // check permissions 1251 1250 if (!item.hasPermission(Permission.full)) { 1252 FrameGraphics1253 . DisplayMessage("Insufficient permission to change the size of that item");1251 MessageBay 1252 .displayMessage("Insufficient permission to change the size of that item"); 1254 1253 return; 1255 1254 } … … 1362 1361 1363 1362 // if (color == null) { 1364 // FrameGraphics.DisplayMessage("FillColor is now transparent");1363 // MessageBay.displayMessage("FillColor is now transparent"); 1365 1364 // } 1366 1365 … … 1385 1384 if (item == null) { 1386 1385 if (Frame.itemAttachedToCursor()) { 1387 color = Fr ame.FreeItems.get(0).getColor();1386 color = FreeItems.getInstance().get(0).getColor(); 1388 1387 } else { 1389 1388 return; … … 1394 1393 // check permissions 1395 1394 if (!item.hasPermission(Permission.full)) { 1396 FrameGraphics1397 . DisplayMessage("Insufficient permission to the frame's background color");1395 MessageBay 1396 .displayMessage("Insufficient permission to the frame's background color"); 1398 1397 return; 1399 1398 } … … 1405 1404 // if (currentFrame.getBackgroundColor() == null) 1406 1405 // FrameGraphics 1407 // . DisplayMessage("Background color is now transparent");1406 // .displayMessage("Background color is now transparent"); 1408 1407 FrameGraphics.Repaint(); 1409 1408 return; … … 1411 1410 // check permissions 1412 1411 if (!item.hasPermission(Permission.full)) { 1413 FrameGraphics1414 . DisplayMessage("Insufficient permission to change that item's color");1412 MessageBay 1413 .displayMessage("Insufficient permission to change that item's color"); 1415 1414 return; 1416 1415 } … … 1439 1438 // if color is being set to default display a message to indicate that 1440 1439 // if (color == null) { 1441 // FrameGraphics.DisplayMessage("Color is set to default");1440 // MessageBay.displayMessage("Color is set to default"); 1442 1441 // } 1443 1442 1444 1443 if (setBackgroundColor) { 1445 1444 if (item == null && Frame.itemAttachedToCursor()) { 1446 for (Item i : Fr ame.FreeItems)1445 for (Item i : FreeItems.getInstance()) 1447 1446 i.setBackgroundColor(color); 1448 1447 } else { … … 1452 1451 } else { 1453 1452 if (item == null && Frame.itemAttachedToCursor()) { 1454 for (Item i : Fr ame.FreeItems)1453 for (Item i : FreeItems.getInstance()) 1455 1454 i.setColor(color); 1456 1455 } else { … … 1470 1469 private static void ToggleAnnotation(Item toToggle) { 1471 1470 if (toToggle == null) { 1472 FrameGraphics.DisplayMessage("There is no Item selected to toggle");1471 MessageBay.displayMessage("There is no Item selected to toggle"); 1473 1472 return; 1474 1473 } … … 1476 1475 // check permissions 1477 1476 if (!toToggle.hasPermission(Permission.full)) { 1478 FrameGraphics1479 . DisplayMessage("Insufficient permission to toggle that item's annotation");1477 MessageBay 1478 .displayMessage("Insufficient permission to toggle that item's annotation"); 1480 1479 return; 1481 1480 } … … 1494 1493 private static void ToggleFontStyle(Item toToggle) { 1495 1494 if (toToggle == null) { 1496 FrameGraphics.DisplayMessage("There is no Item selected to toggle");1495 MessageBay.displayMessage("There is no Item selected to toggle"); 1497 1496 return; 1498 1497 } … … 1500 1499 // check permissions 1501 1500 if (!toToggle.hasPermission(Permission.full)) { 1502 FrameGraphics1503 . DisplayMessage("Insufficient permission to toggle that item's annotation");1501 MessageBay 1502 .displayMessage("Insufficient permission to toggle that item's annotation"); 1504 1503 return; 1505 1504 } … … 1522 1521 private static void ToggleFontFamily(Item toToggle) { 1523 1522 if (toToggle == null) { 1524 FrameGraphics.DisplayMessage("There is no Item selected to toggle");1523 MessageBay.displayMessage("There is no Item selected to toggle"); 1525 1524 return; 1526 1525 } … … 1528 1527 // check permissions 1529 1528 if (!toToggle.hasPermission(Permission.full)) { 1530 FrameGraphics 1531 .DisplayMessage("Insufficient permission to toggle that item's annotation"); 1529 MessageBay.displayMessage("Insufficient permission to toggle that item's annotation"); 1532 1530 return; 1533 1531 } … … 1565 1563 // permission check 1566 1564 if (!toAdd.hasPermission(Permission.full)) { 1567 FrameGraphics1568 . DisplayMessage("Insufficicent permission to add the date to that item");1565 MessageBay 1566 .displayMessage("Insufficicent permission to add the date to that item"); 1569 1567 return; 1570 1568 } … … 1617 1615 FrameGraphics.Repaint(); 1618 1616 } else { 1619 FrameGraphics1620 . DisplayMessage("Only text items can have the date prepended to them");1617 MessageBay 1618 .displayMessage("Only text items can have the date prepended to them"); 1621 1619 } 1622 1620 // otherwise, create a new text item … … 1640 1638 private static void CreateFrameset(Item item) { 1641 1639 if (item == null) { 1642 FrameGraphics1643 . DisplayMessage("There is no selected item to use for the frameset name");1640 MessageBay 1641 .displayMessage("There is no selected item to use for the frameset name"); 1644 1642 return; 1645 1643 } 1646 1644 1647 1645 if (!(item instanceof Text)) { 1648 FrameGraphics1649 . DisplayMessage("Framesets can only be created from text items");1646 MessageBay 1647 .displayMessage("Framesets can only be created from text items"); 1650 1648 return; 1651 1649 } … … 1653 1651 // dont create frameset if the item is linked 1654 1652 if (item.getLink() != null) { 1655 FrameGraphics1656 . DisplayMessage("A frameset can not be created from a linked item");1653 MessageBay 1654 .displayMessage("A frameset can not be created from a linked item"); 1657 1655 return; 1658 1656 } … … 1660 1658 // check permissions 1661 1659 if (!item.hasPermission(Permission.full)) { 1662 FrameGraphics1663 . DisplayMessage("Insufficient permission to create a frameset from this item");1660 MessageBay 1661 .displayMessage("Insufficient permission to create a frameset from this item"); 1664 1662 return; 1665 1663 } … … 1678 1676 DisplayIO.setCursor(Item.DEFAULT_CURSOR); 1679 1677 } catch (Exception e) { 1680 FrameGraphics.ErrorMessage(e.getMessage());1678 MessageBay.errorMessage(e.getMessage()); 1681 1679 } 1682 1680 } … … 1695 1693 + "1"); 1696 1694 assert (profile != null); 1695 FrameUtils.Parse(currentFrame); 1697 1696 FrameUtils.ParseProfile(profile); 1698 1697 } else {
Note:
See TracChangeset
for help on using the changeset viewer.