Ignore:
Timestamp:
07/02/08 12:38:54 (16 years ago)
Author:
ra33
Message:

added functionality for dockable @v's

File:
1 edited

Legend:

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

    r108 r115  
    3030
    3131        private boolean _filled = true;
    32 
    33         protected boolean _filledHighlight = false;
    34 
     32       
    3533        public Dot(int id) {
    3634                super();
     
    8987        public void paint(Graphics2D g) {
    9088                if (isHighlighted() /* && !Frame.FreeItems.contains(this) */) {
    91                         Color backgroundColor = g.getBackground();
    9289                        Color highlightColor = getHighlightColor();
    93                         if (highlightColor.equals(backgroundColor)){
    94                                 highlightColor = ALTERNATE_HIGHLIGHT;
    95                         }
    9690                        g.setColor(highlightColor);
    9791                        g.setStroke(HIGHLIGHT_STROKE);
     
    10094                        // this is drawn even if its part of a rectangle
    10195                        Rectangle rect = getPolygon().getBounds();
    102                         if (_mode == SelectedMode.Enclosed ||
     96                        if (_mode == HighlightMode.Enclosed ||
    10397                        // Make sure single dots are highlighted filled
    10498                                        this.getConnected().size() <= 1)
    10599                                g.fillRect(rect.x, rect.y, rect.width, rect.height);
    106                         else if (_mode == SelectedMode.Connected)
     100                        else if (_mode == HighlightMode.Connected)
    107101                                g.drawRect(rect.x, rect.y, rect.width, rect.height);
    108                         else if (_mode == SelectedMode.Normal) {
     102                        else if (_mode == HighlightMode.Normal) {
    109103                                g.fillOval(rect.x, rect.y, rect.width, rect.height);
    110104                        }
     
    153147         * Updates the points of the polygon surrounding this Dot
    154148         */
    155         protected void updatePolygon() {
     149        public void updatePolygon() {
    156150                int thick = Math.round(getThickness());
    157151                // Sets a minimum size for the dot
     
    182176
    183177        @Override
    184         public int setSelectionColor() {
    185                 super.setSelectionColor();
     178        public int setHighlightColor() {
     179                super.setHighlightColor();
    186180
    187181                return Item.DEFAULT_CURSOR;
     
    268262                return "P " + getID();
    269263        }
    270 
    271         @Override
    272         public void setFilledHighlight(boolean value) {
    273                 _filledHighlight = value;
    274         }
    275 
     264       
    276265        @Override
    277266        public void delete() {
     
    304293                        if (line.getID() < 0 && !current.getItems().contains(line)) {
    305294                                line.setID(current.getNextItemID());
    306                                 line.setSelectionColor();
     295                                line.setHighlightColor();
    307296                                // Mike: Why was this line here?
    308297                                //anchor(line);
Note: See TracChangeset for help on using the changeset viewer.