Examples of JWindow


Examples of javax.swing.JWindow

 
  @Test
  public void testUpdatesIcon() {
    // Note: Font rendering context is needed for character shapes, so show legend entry on screen
   
    JWindow w = new JWindow();
    w.getContentPane().add(legendEntry);
    w.setVisible(true);
    w.pack();
   
    Mockito.when(mockPlotLine.getPointIcon()).thenReturn(mockIcon);
    int i = 0;
    for (boolean b : new boolean[]{false, true}) {
      Mockito.verify(mockPlotLine, Mockito.times(i)).setPointIcon(Mockito.<Icon>any());
      Mockito.when(mockSettings.getUseCharacter()).thenReturn(b);
      Mockito.when(mockSettings.getMarker()).thenReturn(0);
      Mockito.when(mockSettings.getCharacter()).thenReturn("X");
      legendEntry.setLineSettings(mockSettings);
      Mockito.verify(mockPlotLine, Mockito.times(++i)).setPointIcon(Mockito.<Icon>any());     
    }   
   
    w.setVisible(false);
    w.dispose();
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.