Ignore:
Timestamp:
07/10/08 11:01:16 (16 years ago)
Author:
ra33
Message:

Added search functionality...
Also fixed repaint issues

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/expeditee/items/Text.java

    r126 r130  
    88import java.awt.Point;
    99import java.awt.Polygon;
     10import java.awt.Rectangle;
    1011import java.awt.Stroke;
    1112import java.awt.event.KeyEvent;
     
    807808         */
    808809        public void setFont(Font font) {
     810                invalidateAll();
    809811                // all decoding occurs in the Utils class
    810                
    811812                _font = font;
    812813                // rejustify();
    813814                rebuild(false);
     815               
     816                invalidateAll();
    814817        }
    815818
     
    907910                } else if (newFace.equals("italic")) {
    908911                        setFont(getPaintFont().deriveFont(Font.ITALIC));
    909                 } else if (newFace.contains("bold") && newFace.contains("italic")) {
     912                } else if (newFace.equals("bolditalic") || newFace.equals("italicbold")) {
    910913                        setFont(getPaintFont().deriveFont(Font.BOLD + Font.ITALIC));
    911914                }
     
    14151418                paintLink(g);
    14161419        }
     1420       
     1421        @Override
     1422        protected Rectangle getLinkDrawArea() { // TODO: Revise
     1423                return getDrawingArea()[0];
     1424        }
    14171425
    14181426        /**
     
    14651473        @Override
    14661474        public void setSize(float size) {
     1475                invalidateAll();
    14671476                // Dont want to have size set when duplicating a point which has size 0
    14681477                if (size < 0)
     
    14721481                        size = MINIMUM_FONT_SIZE;
    14731482                setFont(getPaintFont().deriveFont(size));
     1483                invalidateAll();
    14741484        }
    14751485
     
    17371747        }
    17381748
    1739         @Override
    1740         public void setLink(String frame) {
    1741                 // If a link is being removed or set then need to reset poly so the
    1742                 // highlighting is drawn with the correct width
    1743                 if (frame == null || getLink() == null)
    1744                         _poly = null;
    1745                 super.setLink(frame);
    1746         }
    1747 
    17481749        public static boolean isBulletChar(char c) {
    17491750                for(int i = 0; i < BULLETS.length; i++){
Note: See TracChangeset for help on using the changeset viewer.