Package de.fuhagen.sttp.gui

Examples of de.fuhagen.sttp.gui.FlatToggleButton


        setLayout(new FlowLayout(FlowLayout.LEFT));

        DemoAction onAction = new DemoAction("On");
        DemoAction offAction = new DemoAction("Off");

        FlatToggleButton toggleButton = new FlatToggleButton(onAction,
                offAction, 30, 80);
        add(toggleButton);

        DemoAction middleAction = new DemoAction("Middle");
View Full Code Here


     */
    @Test
    public void testFlatToggleButton() {
        Action on = new DemoAction("on");
        Action off = new DemoAction("off");
        FlatToggleButton button = new FlatToggleButton(on, off, 20, 80);

        assertTrue("width", button.getWidth() == 20);
        assertTrue("width", button.getHeight() == 80);
        assertTrue("action", button.getAction() == on);
    }
View Full Code Here

     */
    @Test
    public void testGetOnAction() {
        Action on = new DemoAction("on");
        Action off = new DemoAction("off");
        FlatToggleButton button = new FlatToggleButton(on, off, 20, 80);

        assertTrue("on action", button.getOnAction() == on);
    }
View Full Code Here

     */
    @Test
    public void testGetOffAction() {
        Action on = new DemoAction("on");
        Action off = new DemoAction("off");
        FlatToggleButton button = new FlatToggleButton(on, off, 20, 80);

        assertTrue("off action", button.getOffAction() == off);
    }
View Full Code Here

     */
    @Test
    public void testIsOn() {
        Action on = new DemoAction("on");
        Action off = new DemoAction("off");
        FlatToggleButton button = new FlatToggleButton(on, off, 20, 80);

        assertTrue("is on", !button.isOn());
    }
View Full Code Here

     */
    @Test
    public void testSetOn() {
        Action on = new DemoAction("on");
        Action off = new DemoAction("off");
        FlatToggleButton button = new FlatToggleButton(on, off, 20, 80);

        button.setState(true);
        assertTrue("is on", button.isOn());

        button.setState(false);
        assertTrue("is off", !button.isOn());
    }
View Full Code Here

TOP

Related Classes of de.fuhagen.sttp.gui.FlatToggleButton

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.