Search in sources :

Example 1 with MouseEnteredEvent

use of limelight.ui.events.panel.MouseEnteredEvent in project limelight by slagyr.

the class PropPanelTest method shouldHoverOnWithHoverStyle.

@Test
public void shouldHoverOnWithHoverStyle() throws Exception {
    panel.getHoverStyle().setCuror("hand");
    new MouseEnteredEvent(0, null, 0).dispatch(panel);
    assertEquals(Cursor.HAND_CURSOR, root.getCursor().getType());
    assertSame(panel.getHoverStyle(), style.getScreen());
}
Also used : MouseEnteredEvent(limelight.ui.events.panel.MouseEnteredEvent) Test(org.junit.Test)

Example 2 with MouseEnteredEvent

use of limelight.ui.events.panel.MouseEnteredEvent in project limelight by slagyr.

the class PropPanelTest method shouldHoverOffWhenHoverStyledWasRemovedFromProp.

@Test
public void shouldHoverOffWhenHoverStyledWasRemovedFromProp() throws Exception {
    prop.hoverStyle = new FlatStyle();
    new MouseEnteredEvent(0, null, 0).dispatch(panel);
    prop.hoverStyle = null;
    new MouseExitedEvent(0, null, 0).dispatch(panel);
    assertEquals(Cursor.DEFAULT_CURSOR, root.getCursor().getType());
    assertEquals(null, style.getScreen());
}
Also used : MouseExitedEvent(limelight.ui.events.panel.MouseExitedEvent) MouseEnteredEvent(limelight.ui.events.panel.MouseEnteredEvent) Test(org.junit.Test)

Example 3 with MouseEnteredEvent

use of limelight.ui.events.panel.MouseEnteredEvent in project limelight by slagyr.

the class PropPanelTest method shouldHoverOffWithoutHoverStyle.

@Test
public void shouldHoverOffWithoutHoverStyle() throws Exception {
    prop.hoverStyle = null;
    new MouseEnteredEvent(0, null, 0).dispatch(panel);
    new MouseExitedEvent(0, null, 0).dispatch(panel);
    assertEquals(Cursor.DEFAULT_CURSOR, root.getCursor().getType());
    assertEquals(null, style.getScreen());
}
Also used : MouseExitedEvent(limelight.ui.events.panel.MouseExitedEvent) MouseEnteredEvent(limelight.ui.events.panel.MouseEnteredEvent) Test(org.junit.Test)

Example 4 with MouseEnteredEvent

use of limelight.ui.events.panel.MouseEnteredEvent in project limelight by slagyr.

the class PropPanelTest method shouldHoverOffWithHoverStyle.

@Test
public void shouldHoverOffWithHoverStyle() throws Exception {
    prop.hoverStyle = new FlatStyle();
    new MouseEnteredEvent(0, null, 0).dispatch(panel);
    new MouseExitedEvent(0, null, 0).dispatch(panel);
    assertEquals(Cursor.DEFAULT_CURSOR, root.getCursor().getType());
    assertEquals(null, style.getScreen());
}
Also used : MouseExitedEvent(limelight.ui.events.panel.MouseExitedEvent) MouseEnteredEvent(limelight.ui.events.panel.MouseEnteredEvent) Test(org.junit.Test)

Aggregations

MouseEnteredEvent (limelight.ui.events.panel.MouseEnteredEvent)4 Test (org.junit.Test)4 MouseExitedEvent (limelight.ui.events.panel.MouseExitedEvent)3