Package de.fuhagen.sttp.demo

Examples of de.fuhagen.sttp.demo.DemoAction


    /**
     * Test method for {@link de.fuhagen.sttp.gui.FlatTrippleButton#FlatTrippleButton(javax.swing.Action, javax.swing.Action, javax.swing.Action, int, int)}.
     */
    @Test
    public void testFlatTrippleButton() {
        Action on = new DemoAction("on");
        Action middle = new DemoAction("middle");
        Action off = new DemoAction("off");
        FlatTrippleButton button = new FlatTrippleButton(on, off, middle, 20,
                80);

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


    /**
     * Test method for {@link de.fuhagen.sttp.gui.FlatTrippleButton#getOnAction()}.
     */
    @Test
    public void testGetOnAction() {
        Action on = new DemoAction("on");
        Action middle = new DemoAction("middle");
        Action off = new DemoAction("off");
        FlatTrippleButton button = new FlatTrippleButton(on, off, middle, 20,
                80);

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

    /**
     * Test method for {@link de.fuhagen.sttp.gui.FlatTrippleButton#getOffAction()}.
     */
    @Test
    public void testGetOffAction() {
        Action on = new DemoAction("on");
        Action middle = new DemoAction("middle");
        Action off = new DemoAction("off");
        FlatTrippleButton button = new FlatTrippleButton(on, off, middle, 20,
                80);

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

    /**
     * Test method for {@link de.fuhagen.sttp.gui.FlatTrippleButton#getMiddleAction()}.
     */
    @Test
    public void testGetMiddleAction() {
        Action on = new DemoAction("on");
        Action middle = new DemoAction("middle");
        Action off = new DemoAction("off");
        FlatTrippleButton button = new FlatTrippleButton(on, off, middle, 20,
                80);

        assertTrue("middle action", button.getMiddleAction() == middle);
    }
View Full Code Here

    /**
     * Test method for {@link de.fuhagen.sttp.gui.FlatTrippleButton#getState()}.
     */
    @Test
    public void testGetState() {
        Action on = new DemoAction("on");
        Action middle = new DemoAction("middle");
        Action off = new DemoAction("off");
        FlatTrippleButton button = new FlatTrippleButton(on, off, middle, 20,
                80);

        assertTrue("state", button.getState() == STATE.OFF);
    }
View Full Code Here

    /**
     * Test method for {@link de.fuhagen.sttp.gui.FlatTrippleButton#setState(de.fuhagen.sttp.gui.FlatTrippleButton.STATE)}.
     */
    @Test
    public void testSetState() {
        Action on = new DemoAction("on");
        Action middle = new DemoAction("middle");
        Action off = new DemoAction("off");
        FlatTrippleButton button = new FlatTrippleButton(on, off, middle, 20,
                80);

        button.setState(STATE.ON);
        assertTrue("on state", button.getState() == STATE.ON);
View Full Code Here

    /**
     * Test method for {@link de.fuhagen.sttp.gui.FlatToggleButton#FlatToggleButton(javax.swing.AbstractAction, javax.swing.AbstractAction, int, int)}.
     */
    @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 method for {@link de.fuhagen.sttp.gui.FlatToggleButton#getOnAction()}.
     */
    @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 method for {@link de.fuhagen.sttp.gui.FlatToggleButton#getOffAction()}.
     */
    @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 method for {@link de.fuhagen.sttp.gui.FlatToggleButton#isOn()}.
     */
    @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

TOP

Related Classes of de.fuhagen.sttp.demo.DemoAction

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.