Changeset 19
- Timestamp:
- 05/06/08 18:15:05 (16 years ago)
- Location:
- trunk/src/org/expeditee
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/expeditee/actions/Misc.java
r7 r19 77 77 */ 78 78 FrameIO.SaveFrame(DisplayIO.getCurrentFrame()); 79 80 while(FrameIO.DeleteFrameset("messages")) 81 ; 79 82 80 83 StatsLogger.WriteStatsFile(); -
trunk/src/org/expeditee/actions/Simple.java
r7 r19 574 574 Text valueItem = null; 575 575 // Begin the search 576 for (Text text : targetFrame.getBodyTextItems( )) {576 for (Text text : targetFrame.getBodyTextItems(true)) { 577 577 String s = text.getTextNoList().toLowerCase(); 578 578 579 if (s.startsWith(targetAttribute)) { 579 580 attributeItem = text; … … 588 589 Point endPoint = attributeItem.getEndParagraphPosition(); 589 590 590 for (Text text : targetFrame.getBodyTextItems( )) {591 for (Text text : targetFrame.getBodyTextItems(true)) { 591 592 Point startPoint = text.getPosition(); 592 593 if (Math.abs(startPoint.y - endPoint.y) < 10 … … 804 805 Text valueItem = null; 805 806 // Begin the search 806 for (Text text : targetFrame.getBodyTextItems( )) {807 for (Text text : targetFrame.getBodyTextItems(true)) { 807 808 String s = text.getTextNoList().toLowerCase(); 808 809 if (s.startsWith(targetAttribute)) { … … 821 822 .getEndParagraphPosition(); 822 823 823 for (Text text : targetFrame.getBodyTextItems( )) {824 for (Text text : targetFrame.getBodyTextItems(true)) { 824 825 Point startPoint = text.getPosition(); 825 826 if (Math.abs(startPoint.y - endPoint.y) < 10 -
trunk/src/org/expeditee/agents/ComputeTree.java
r7 r19 67 67 Double result = null; 68 68 69 for (Item i : frame.getBodyTextItems( )) {69 for (Item i : frame.getBodyTextItems(false)) { 70 70 71 71 Double value = null; -
trunk/src/org/expeditee/agents/Format.java
r4 r19 49 49 Item i = start.getItems().get(j); 50 50 51 if (j > 1&& start.isNormalTextItem(i)) {51 if (j > 0 && start.isNormalTextItem(i)) { 52 52 int col = findColumn(columnHeads, i); 53 53 // if this is the head of a new column -
trunk/src/org/expeditee/agents/SwitchyardTree.java
r4 r19 31 31 startTime = System.currentTimeMillis(); 32 32 33 for (Text textItem : frame.getBodyTextItems( )) {33 for (Text textItem : frame.getBodyTextItems(false)) { 34 34 // Delete all non-annotations with more that one letter 35 35 if (textItem.getTextNoList().length() > 1) … … 42 42 if (childFrame != null) { 43 43 Point lastItemEnd = textItem.getEndParagraphPosition(); 44 for (Text childItem : childFrame.getBodyTextItems( )) {44 for (Text childItem : childFrame.getBodyTextItems(false)) { 45 45 // look for red items 46 46 if (childItem.getColor().equals(Color.RED)) { -
trunk/src/org/expeditee/gui/AttributeUtils.java
r4 r19 637 637 public static void setSingleValue(Text text, String value) { 638 638 assert (value != null); 639 639 640 640 String oldText = text.getTextNoList(); 641 641 String attribute = stripAttribute(oldText); -
trunk/src/org/expeditee/gui/Frame.java
r13 r19 219 219 * @return the list of body text items. 220 220 */ 221 public List<Text> getBodyTextItems( ) {221 public List<Text> getBodyTextItems(boolean includeAnnotations) { 222 222 List<Text> bodyTextItems = new ArrayList<Text>(); 223 223 Text frameTitle = getTitle(); … … 225 225 for (Item i : getItems()) { 226 226 // only add up normal body text items 227 if ((i instanceof Text) && i != frameTitle && !i.isAnnotation()) { 227 if ((i instanceof Text) && i != frameTitle && 228 (includeAnnotations || !i.isAnnotation())) { 228 229 bodyTextItems.add((Text) i); 229 230 } … … 351 352 if (childFrame != null) { 352 353 // read in attribute value pairs 353 for (Text attribute : childFrame.getBodyTextItems( )) {354 for (Text attribute : childFrame.getBodyTextItems(false)) { 354 355 AttributeUtils.SetAttribute(t, attribute); 355 356 } … … 1201 1202 if (it instanceof Text) { 1202 1203 Text t = (Text) it; 1203 if (t.getTextNoList().toLowerCase().startsWith("@start :")1204 || t.getTextNoList().toLowerCase().equals("@start ")) {1204 if (t.getTextNoList().toLowerCase().startsWith("@start") 1205 || t.getTextNoList().toLowerCase().equals("@start:")) { 1205 1206 t.stripFirstWord(); 1206 1207 -
trunk/src/org/expeditee/gui/FrameCreator.java
r7 r19 2 2 3 3 import java.awt.Color; 4 import java.util.List; 4 5 5 6 import org.expeditee.items.Item; … … 41 42 _name = name; 42 43 _lastY += toUse.getTitle().getPosition().y; 44 45 //Check for @Start 46 for (Item it : toUse.getItems()) { 47 if (it instanceof Text) { 48 Text t = (Text) it; 49 if (t.getTextNoList().toLowerCase().equals("@start") || 50 t.getTextNoList().toLowerCase().startsWith("@start:")) { 51 t.stripFirstWord(); 52 53 if (t.getTextNoList().equals("")){ 54 _lastY = t.getY(); 55 _lastX = t.getX(); 56 t.delete(); 57 break; 58 } 59 } 60 } 61 } 43 62 _current = toUse; 44 63 … … 118 137 119 138 public void addText(String toAdd) { 120 /*121 * Text text = _current.createNewText(); text.setText(toAdd);122 *123 * addItem(text);124 */125 139 addText(toAdd, null); 126 140 } -
trunk/src/org/expeditee/gui/FrameGraphics.java
r13 r19 41 41 42 42 // messages shown in the message window 43 public static Text[] Messages = new Text[ 3];43 public static Text[] Messages = new Text[4]; 44 44 45 45 // buffer of the message window … … 598 598 599 599 // if the message slots have not all been used yet 600 if (_MessageCount < 4) {600 if (_MessageCount <= Messages.length) { 601 601 int pos = 15; 602 602 // find the next empty slot, and create the new message 603 603 for (int i = 0; i < Messages.length; i++) { 604 604 if (Messages[i] == null) { 605 Messages[i] = new Text(-1, _MessageCount++ + ": " + message);605 Messages[i] = new Text(-1, "@" + _MessageCount++ + ": " + message); 606 606 Messages[i].setPosition(20, pos); 607 607 Messages[i].setOffset(0, -_MaxSize.height); … … 630 630 Text last = Messages[Messages.length - 1]; 631 631 last.setColor(color); 632 last.setText( _MessageCount++ + ": " + message);632 last.setText("@" + _MessageCount++ + ": " + message); 633 633 last.setLink(link); 634 634 -
trunk/src/org/expeditee/gui/FrameKeyboardActions.java
r13 r19 273 273 private void navigateFrame(int direction) { 274 274 Frame next = null; 275 switch (direction){275 switch (direction) { 276 276 case Text.RIGHT: 277 277 case Text.PAGE_UP: … … 734 734 String autoBullet = getAutoBullet(dummyItem.getTextNoList()); 735 735 736 if (autoBullet.length() > 0) { 737 dummyItem.stripFirstWord(); 738 } 736 if (autoBullet.length() > 0) 737 newItemText = ""; 739 738 dummyItem.setText(newItemText + dummyItem.getTextNoList()); 740 739 } 741 742 740 dummyItem = createText(); 743 741 dummyItem.setText(newItemText); 744 745 742 // If the only item on the frame is the title and the frame name just 746 743 // drop a specified distance below the title … … 753 750 DisplayIO.setCursorPosition(xPos, yPos); 754 751 } else { 755 756 752 int yPos = column.get(0).getY() + 1; 757 758 753 // Either position the new item below the title or just above 759 754 // the first item below the title … … 763 758 + title.getBoundsHeight() 764 759 + dummyItem.getBoundsHeight()); 765 766 760 dummyItem.setPosition(column.get(0).getX(), yPos); 767 761 column.add(dummyItem); 768 769 762 FrameUtils.Align(column, false, 0); 770 763 // Check if it will be outside the frame area … … 787 780 Drop(moreTitle); 788 781 } 789 790 782 // Add the bullet text to the item 791 783 dummyItem.setPosition(DisplayIO.getMouseX(), DisplayIO … … 810 802 int deltaX = firstItem.getX() - dummyItem.getX(); 811 803 int deltaY = firstItem.getY() - dummyItem.getY(); 812 813 for(Item i: Frame.FreeItems) { 814 i.setPosition(i.getX()-deltaX, 815 i.getY() - deltaY); 804 805 for (Item i : Frame.FreeItems) { 806 i.setPosition(i.getX() - deltaX, i.getY() - deltaY); 816 807 } 817 808 } else { -
trunk/src/org/expeditee/gui/FrameUtils.java
r10 r19 930 930 possibles.add(FrameGraphics.MessageLink); 931 931 } 932 y -= FrameGraphics.getMaxFrameSize().getHeight(); 932 933 // otherwise, the mouse is on the frame 933 934 } else {
Note:
See TracChangeset
for help on using the changeset viewer.