Klasse TestSwingComponentUtils

java.lang.Object
net.sf.jguiraffe.gui.platform.swing.builder.components.TestSwingComponentUtils

public class TestSwingComponentUtils extends Object
Test class for SwingComponentUtils. This test class only tests a subset of the functionality provided by the utility class; other methods are tested implicitly by other test classes.
Version:
$Id: TestSwingComponentUtils.java 205 2012-01-29 18:29:57Z oheger $
Autor:
Oliver Heger
  • Konstruktordetails

    • TestSwingComponentUtils

      public TestSwingComponentUtils()
  • Methodendetails

    • setUpBeforeClass

      public static void setUpBeforeClass() throws Exception
      Löst aus:
      Exception
    • testSwing2LogicColor

      public void testSwing2LogicColor()
      Tests converting a Swing color into a logic color.
    • testSwing2LogicColorNull

      public void testSwing2LogicColorNull()
      Tests whether null Swing colors are correctly handled.
    • testLogic2SwingColor

      public void testLogic2SwingColor()
      Tests converting a logic color into a Swing color.
    • testLogic2SwingColorNull

      public void testLogic2SwingColorNull()
      Tests whether null logic colors are correctly handled.
    • testSwing2LogicColorNamed

      public void testSwing2LogicColorNamed()
      Tests whether all named colors can be converted to logic colors.
    • testLogic2SwingColorNamed

      public void testLogic2SwingColorNamed()
      Tests whether all named logic colors can be converted to AWT colors.
    • testLogic2SwingColorUnsupported

      public void testLogic2SwingColorUnsupported()
      Tests whether an unsupported color is correctly handled.
    • testSetForegroundColorUnsupported

      public void testSetForegroundColorUnsupported()
      Tries to set an unsupported foreground color. This call should be ignored.
    • testSetBackgroundColorUnsupported

      public void testSetBackgroundColorUnsupported()
      Tries to set an unsupported background color. This call should be ignored.
    • testToMnemonic

      public void testToMnemonic()
      Tests whether a character can be converted to a mnemonic code.
    • testScrollPaneForNoPreferredSize

      public void testScrollPaneForNoPreferredSize()
      Tests whether a scroll pane can be created if no preferred size is specified. As we do not want to duplicate the algorithm in the test we just check whether the calculated size is in the expected direction.
    • testScrollPaneForWithPreferredSize

      public void testScrollPaneForWithPreferredSize()
      Tests whether the preferred size is taken into account when creating the scroll pane.
    • testScrollPaneLazyInit

      public void testScrollPaneLazyInit() throws net.sf.jguiraffe.gui.builder.components.FormBuilderException, org.apache.commons.jelly.JellyTagException
      Tests whether a scroll pane can be initialized lazily.
      Löst aus:
      net.sf.jguiraffe.gui.builder.components.FormBuilderException
      org.apache.commons.jelly.JellyTagException
    • testGetFont

      public void testGetFont()
      Tests whether a font can be queried.
    • testSetFont

      public void testSetFont()
      Tests whether a font can be set.
    • testSetFontNull

      public void testSetFontNull()
      Tests whether the font can be set to null.
    • testSetFontInvalid

      public void testSetFontInvalid()
      Tries to set an invalid font object.
    • testGetToolTipNoHtml

      public void testGetToolTipNoHtml()
      Tests that the text of a tool tip is returned that is not HTML.
    • testGetToolTipWithHtml

      public void testGetToolTipWithHtml()
      Tests that HTML markup is removed when the tool tip is queried.
    • testRemoveHtmlNull

      public void testRemoveHtmlNull()
      Tests removeHtml() for null input.
    • testRemoveHtmlNoValidTags

      public void testRemoveHtmlNoValidTags()
      Tests removeHtml() if the text is not correctly wrapped by HTML tags.