public void setAnchor()

in jelly-tags/swing/src/main/java/org/apache/commons/jelly/tags/swing/impl/GridBagConstraintBean.java [178:217]


    public void setAnchor(String anchorString) {
        String lcAnchorString = anchorString.toLowerCase();
        if (lcAnchorString.equals("center"))
            this.anchor = CENTER;
        else if (lcAnchorString.equals("north"))
            this.anchor = NORTH;
        else if (lcAnchorString.equals("northeast"))
            this.anchor = NORTHEAST;
        else if (lcAnchorString.equals("east"))
            this.anchor = EAST;
        else if (lcAnchorString.equals("southeast"))
            this.anchor = SOUTHEAST;
        else if (lcAnchorString.equals("south"))
            this.anchor = SOUTH;
        else if (lcAnchorString.equals("southwest"))
            this.anchor = SOUTHWEST;
        else if (lcAnchorString.equals("west"))
            this.anchor = WEST;
        else if (lcAnchorString.equals("northwest"))
            this.anchor = NORTHWEST;
        else if (lcAnchorString.equals("page_start"))
            this.anchor = getByReflection("PAGE_START");
        else if (lcAnchorString.equals("page_end"))
            this.anchor = getByReflection("PAGE_END");
        else if (lcAnchorString.equals("line_start"))
            this.anchor = getByReflection("LINE_START");
        else if (lcAnchorString.equals("line_end"))
            this.anchor = getByReflection("LINE_END");
        else if (lcAnchorString.equals("first_line_start"))
            this.anchor = getByReflection("FIRST_LINE_START");
        else if (lcAnchorString.equals("first_line_end"))
            this.anchor = getByReflection("FIRST_LINE_END");
        else if (lcAnchorString.equals("last_line_end"))
            this.anchor = getByReflection("LAST_LINE_END");
        else if (lcAnchorString.equals("last_line_start"))
            this.anchor = getByReflection("LAST_LINE_START");
        else
            throw new IllegalArgumentException("Anchor must be the name of one of  the GridBagLayoutConstants (case doesn't matter): center, north, northeast, east, southeast, south, southwest, west, or northwest.");
        this.anchorSet = true;
    }