//# 0 errors, 106 messages
//#
/*
    //#FramemanagerPosition.java:1:1: class: com.dmdirc.ui.interfaces.FramemanagerPosition
 * Copyright (c) 2006-2009 Chris Smith, Shane Mc Cormack, Gregory Holmes
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 * SOFTWARE.
 */

package com.dmdirc.ui.interfaces;

import java.util.Locale;

/**
 * Frame manager position enum.
 */
public enum FramemanagerPosition {
    //#FramemanagerPosition.java:30: method: FramemanagerPosition[] com.dmdirc.ui.interfaces.FramemanagerPosition.values()
    //#input(FramemanagerPosition[] values()): $VALUES
    //#input(FramemanagerPosition[] values()): $VALUES.length
    //#input(FramemanagerPosition[] values()): $VALUES[0..5]
    //#output(FramemanagerPosition[] values()): new FramemanagerPosition[](values#1) num objects
    //#output(FramemanagerPosition[] values()): return_value.length
    //#output(FramemanagerPosition[] values()): return_value[0..5]
    //#output(FramemanagerPosition[] values()): return_value
    //#new obj(FramemanagerPosition[] values()): new FramemanagerPosition[](values#1)
    //#pre[1] (FramemanagerPosition[] values()): (soft) init'ed($VALUES[0..5])
    //#post(FramemanagerPosition[] values()): return_value == &new FramemanagerPosition[](values#1)
    //#post(FramemanagerPosition[] values()): new FramemanagerPosition[](values#1) num objects == 1
    //#post(FramemanagerPosition[] values()): return_value.length == 5
    //#post(FramemanagerPosition[] values()): return_value[0..5] == One-of{$VALUES[0..5], undefined}
    //#FramemanagerPosition.java:30: end of method: FramemanagerPosition[] com.dmdirc.ui.interfaces.FramemanagerPosition.values()
    //#FramemanagerPosition.java:30: method: FramemanagerPosition com.dmdirc.ui.interfaces.FramemanagerPosition.valueOf(String)
    //#input(FramemanagerPosition valueOf(String)): __Descendant_Table[com/dmdirc/ui/interfaces/FramemanagerPosition]
    //#input(FramemanagerPosition valueOf(String)): __Descendant_Table[others]
    //#input(FramemanagerPosition valueOf(String)): name
    //#output(FramemanagerPosition valueOf(String)): return_value
    //#presumption(FramemanagerPosition valueOf(String)): java.lang.Enum:valueOf(...).__Tag@30 == com/dmdirc/ui/interfaces/FramemanagerPosition
    //#post(FramemanagerPosition valueOf(String)): init'ed(return_value)
    //#FramemanagerPosition.java:30: end of method: FramemanagerPosition com.dmdirc.ui.interfaces.FramemanagerPosition.valueOf(String)
    //#FramemanagerPosition.java:30: method: void com.dmdirc.ui.interfaces.FramemanagerPosition.com.dmdirc.ui.interfaces.FramemanagerPosition(String, int)
    //#input(void com.dmdirc.ui.interfaces.FramemanagerPosition(String, int)): Param_1
    //#input(void com.dmdirc.ui.interfaces.FramemanagerPosition(String, int)): Param_2
    //#input(void com.dmdirc.ui.interfaces.FramemanagerPosition(String, int)): this
    //#FramemanagerPosition.java:30: end of method: void com.dmdirc.ui.interfaces.FramemanagerPosition.com.dmdirc.ui.interfaces.FramemanagerPosition(String, int)
    /** Top of the window. */
    TOP,
    //#FramemanagerPosition.java:32: method: com.dmdirc.ui.interfaces.FramemanagerPosition.com.dmdirc.ui.interfaces.FramemanagerPosition__static_init
    //#output(com.dmdirc.ui.interfaces.FramemanagerPosition__static_init): $VALUES
    //#output(com.dmdirc.ui.interfaces.FramemanagerPosition__static_init): BOTTOM
    //#output(com.dmdirc.ui.interfaces.FramemanagerPosition__static_init): LEFT
    //#output(com.dmdirc.ui.interfaces.FramemanagerPosition__static_init): RIGHT
    //#output(com.dmdirc.ui.interfaces.FramemanagerPosition__static_init): TOP
    //#output(com.dmdirc.ui.interfaces.FramemanagerPosition__static_init): UNKNOWN
    //#output(com.dmdirc.ui.interfaces.FramemanagerPosition__static_init): __Descendant_Table[com/dmdirc/ui/interfaces/FramemanagerPosition]
    //#output(com.dmdirc.ui.interfaces.FramemanagerPosition__static_init): __Dispatch_Table.isHorizontal()Z
    //#output(com.dmdirc.ui.interfaces.FramemanagerPosition__static_init): new FramemanagerPosition(FramemanagerPosition__static_init#1) num objects
    //#output(com.dmdirc.ui.interfaces.FramemanagerPosition__static_init): TOP.__Tag
    //#output(com.dmdirc.ui.interfaces.FramemanagerPosition__static_init): new FramemanagerPosition(FramemanagerPosition__static_init#2) num objects
    //#output(com.dmdirc.ui.interfaces.FramemanagerPosition__static_init): LEFT.__Tag
    //#output(com.dmdirc.ui.interfaces.FramemanagerPosition__static_init): new FramemanagerPosition(FramemanagerPosition__static_init#3) num objects
    //#output(com.dmdirc.ui.interfaces.FramemanagerPosition__static_init): BOTTOM.__Tag
    //#output(com.dmdirc.ui.interfaces.FramemanagerPosition__static_init): new FramemanagerPosition(FramemanagerPosition__static_init#4) num objects
    //#output(com.dmdirc.ui.interfaces.FramemanagerPosition__static_init): RIGHT.__Tag
    //#output(com.dmdirc.ui.interfaces.FramemanagerPosition__static_init): new FramemanagerPosition(FramemanagerPosition__static_init#5) num objects
    //#output(com.dmdirc.ui.interfaces.FramemanagerPosition__static_init): UNKNOWN.__Tag
    //#output(com.dmdirc.ui.interfaces.FramemanagerPosition__static_init): new FramemanagerPosition[](FramemanagerPosition__static_init#6) num objects
    //#output(com.dmdirc.ui.interfaces.FramemanagerPosition__static_init): $VALUES.length
    //#output(com.dmdirc.ui.interfaces.FramemanagerPosition__static_init): $VALUES[0]
    //#output(com.dmdirc.ui.interfaces.FramemanagerPosition__static_init): $VALUES[1]
    //#output(com.dmdirc.ui.interfaces.FramemanagerPosition__static_init): $VALUES[2]
    //#output(com.dmdirc.ui.interfaces.FramemanagerPosition__static_init): $VALUES[3]
    //#output(com.dmdirc.ui.interfaces.FramemanagerPosition__static_init): $VALUES[4]
    //#new obj(com.dmdirc.ui.interfaces.FramemanagerPosition__static_init): new FramemanagerPosition(FramemanagerPosition__static_init#1)
    //#new obj(com.dmdirc.ui.interfaces.FramemanagerPosition__static_init): new FramemanagerPosition(FramemanagerPosition__static_init#2)
    //#new obj(com.dmdirc.ui.interfaces.FramemanagerPosition__static_init): new FramemanagerPosition(FramemanagerPosition__static_init#3)
    //#new obj(com.dmdirc.ui.interfaces.FramemanagerPosition__static_init): new FramemanagerPosition(FramemanagerPosition__static_init#4)
    //#new obj(com.dmdirc.ui.interfaces.FramemanagerPosition__static_init): new FramemanagerPosition(FramemanagerPosition__static_init#5)
    //#new obj(com.dmdirc.ui.interfaces.FramemanagerPosition__static_init): new FramemanagerPosition[](FramemanagerPosition__static_init#6)
    //#post(com.dmdirc.ui.interfaces.FramemanagerPosition__static_init): $VALUES == &new FramemanagerPosition[](FramemanagerPosition__static_init#6)
    //#post(com.dmdirc.ui.interfaces.FramemanagerPosition__static_init): BOTTOM == &new FramemanagerPosition(FramemanagerPosition__static_init#3)
    //#post(com.dmdirc.ui.interfaces.FramemanagerPosition__static_init): $VALUES[2] == &new FramemanagerPosition(FramemanagerPosition__static_init#3)
    //#post(com.dmdirc.ui.interfaces.FramemanagerPosition__static_init): LEFT == &new FramemanagerPosition(FramemanagerPosition__static_init#2)
    //#post(com.dmdirc.ui.interfaces.FramemanagerPosition__static_init): $VALUES[1] == &new FramemanagerPosition(FramemanagerPosition__static_init#2)
    //#post(com.dmdirc.ui.interfaces.FramemanagerPosition__static_init): RIGHT == &new FramemanagerPosition(FramemanagerPosition__static_init#4)
    //#post(com.dmdirc.ui.interfaces.FramemanagerPosition__static_init): $VALUES[3] == &new FramemanagerPosition(FramemanagerPosition__static_init#4)
    //#post(com.dmdirc.ui.interfaces.FramemanagerPosition__static_init): TOP == &new FramemanagerPosition(FramemanagerPosition__static_init#1)
    //#post(com.dmdirc.ui.interfaces.FramemanagerPosition__static_init): $VALUES[0] == &new FramemanagerPosition(FramemanagerPosition__static_init#1)
    //#post(com.dmdirc.ui.interfaces.FramemanagerPosition__static_init): UNKNOWN == &new FramemanagerPosition(FramemanagerPosition__static_init#5)
    //#post(com.dmdirc.ui.interfaces.FramemanagerPosition__static_init): $VALUES[4] == &new FramemanagerPosition(FramemanagerPosition__static_init#5)
    //#post(com.dmdirc.ui.interfaces.FramemanagerPosition__static_init): __Descendant_Table[com/dmdirc/ui/interfaces/FramemanagerPosition] == &__Dispatch_Table
    //#post(com.dmdirc.ui.interfaces.FramemanagerPosition__static_init): __Dispatch_Table.isHorizontal()Z == &isHorizontal
    //#post(com.dmdirc.ui.interfaces.FramemanagerPosition__static_init): new FramemanagerPosition(FramemanagerPosition__static_init#1) num objects == 1
    //#post(com.dmdirc.ui.interfaces.FramemanagerPosition__static_init): new FramemanagerPosition(FramemanagerPosition__static_init#2) num objects == 1
    //#post(com.dmdirc.ui.interfaces.FramemanagerPosition__static_init): new FramemanagerPosition(FramemanagerPosition__static_init#3) num objects == 1
    //#post(com.dmdirc.ui.interfaces.FramemanagerPosition__static_init): new FramemanagerPosition(FramemanagerPosition__static_init#4) num objects == 1
    //#post(com.dmdirc.ui.interfaces.FramemanagerPosition__static_init): new FramemanagerPosition(FramemanagerPosition__static_init#5) num objects == 1
    //#post(com.dmdirc.ui.interfaces.FramemanagerPosition__static_init): new FramemanagerPosition[](FramemanagerPosition__static_init#6) num objects == 1
    //#post(com.dmdirc.ui.interfaces.FramemanagerPosition__static_init): TOP.__Tag == com/dmdirc/ui/interfaces/FramemanagerPosition
    //#post(com.dmdirc.ui.interfaces.FramemanagerPosition__static_init): LEFT.__Tag == com/dmdirc/ui/interfaces/FramemanagerPosition
    //#post(com.dmdirc.ui.interfaces.FramemanagerPosition__static_init): BOTTOM.__Tag == com/dmdirc/ui/interfaces/FramemanagerPosition
    //#post(com.dmdirc.ui.interfaces.FramemanagerPosition__static_init): RIGHT.__Tag == com/dmdirc/ui/interfaces/FramemanagerPosition
    //#post(com.dmdirc.ui.interfaces.FramemanagerPosition__static_init): UNKNOWN.__Tag == com/dmdirc/ui/interfaces/FramemanagerPosition
    //#post(com.dmdirc.ui.interfaces.FramemanagerPosition__static_init): $VALUES.length == 5
    //#unanalyzed(com.dmdirc.ui.interfaces.FramemanagerPosition__static_init): Effects-of-calling:java.lang.Enum
    /** Left side of the window. */
    LEFT,
    /** Bottom of the window. */
    BOTTOM,
    /** Right side of the window. */
    RIGHT,
    /** Unknown position. */
    UNKNOWN;
    //#FramemanagerPosition.java:40: end of method: com.dmdirc.ui.interfaces.FramemanagerPosition.com.dmdirc.ui.interfaces.FramemanagerPosition__static_init
    
    /**
     * Returns the frame position for s specified string.
     *
     * @param name Name of the string
     *
     * @return FramemanagerPosition for the string
     */
    public static FramemanagerPosition getPosition(final String name) {
        if (name == null) {
    //#FramemanagerPosition.java:50: method: FramemanagerPosition com.dmdirc.ui.interfaces.FramemanagerPosition.getPosition(String)
    //#input(FramemanagerPosition getPosition(String)): UNKNOWN
    //#input(FramemanagerPosition getPosition(String)): __Descendant_Table[com/dmdirc/ui/interfaces/FramemanagerPosition]
    //#input(FramemanagerPosition getPosition(String)): __Descendant_Table[others]
    //#input(FramemanagerPosition getPosition(String)): name
    //#output(FramemanagerPosition getPosition(String)): return_value
    //#post(FramemanagerPosition getPosition(String)): init'ed(return_value)
    //#unanalyzed(FramemanagerPosition getPosition(String)): Effects-of-calling:java.lang.Enum:valueOf
    //#test_vector(FramemanagerPosition getPosition(String)): name: Inverse{null}, Addr_Set{null}
            return UNKNOWN;
        }
        try {
            return valueOf(name.toUpperCase(Locale.getDefault()));
        } catch (IllegalArgumentException ex) {
            return valueOf("UNKNOWN");
    //#FramemanagerPosition.java:56: end of method: FramemanagerPosition com.dmdirc.ui.interfaces.FramemanagerPosition.getPosition(String)
        }
    }
    
    /**
     * Determines if this position is one of the two horizontal positions.
     * 
     * @return True if this is a horizontal position, false otherwise
     */
    public boolean isHorizontal() {
        return this == TOP || this == BOTTOM;
    //#FramemanagerPosition.java:66: method: bool com.dmdirc.ui.interfaces.FramemanagerPosition.isHorizontal()
    //#input(bool isHorizontal()): BOTTOM
    //#input(bool isHorizontal()): TOP
    //#input(bool isHorizontal()): this
    //#output(bool isHorizontal()): return_value
    //#post(bool isHorizontal()): init'ed(return_value)
    //#FramemanagerPosition.java:66: end of method: bool com.dmdirc.ui.interfaces.FramemanagerPosition.isHorizontal()
    }
}
    //#FramemanagerPosition.java:: end of class: com.dmdirc.ui.interfaces.FramemanagerPosition
