use of limelight.ui.Panel in project limelight by slagyr.
the class TextPanelMouseProcessor method processMousePressed.
public void processMousePressed(MousePressedEvent e) {
final Panel panel = e.getRecipient();
inWordSelectionMode = false;
TextLocation location = model.getLocationAt(e.getLocation());
model.startSelection(location);
model.setCaretLocation(location, XOffsetStrategy.FITTING, YOffsetStrategy.FITTING);
model.setCaretOn(true);
handleMultipleClicks(e);
panel.markAsDirty();
panel.getStage().getKeyListener().focusOn(panel);
lastClickTime = System.currentTimeMillis();
}
use of limelight.ui.Panel in project limelight by slagyr.
the class Mouse method drag.
public static void drag(PropProxy prop, int x, int y, int modifiers, int click_count) {
Point location = pointFor(prop, x, y);
Panel owner = ownerOf(location, prop);
new MouseDraggedEvent(modifiers, location, click_count).dispatch(owner);
}
use of limelight.ui.Panel in project limelight by slagyr.
the class PropPanelTest method setUp.
@Before
public void setUp() throws Exception {
root = new ScenePanel(new FakePropProxy(), new FakePlayerRecruiter());
prop = new FakePropProxy();
panel = new PropPanel(prop);
root.add(panel);
root.setProduction(new FakeProduction());
root.setStage(new MockStage());
style = panel.getStyle();
CastingDirector.installed();
FakeFileSystem.installed();
Context.instance().bufferedImageCache = new SimpleCache<Panel, BufferedImage>();
}
use of limelight.ui.Panel in project limelight by slagyr.
the class InputPanelUtil method nextInputPanel.
public static InputPanel nextInputPanel(Panel start) {
InputPanel next = null;
InputPanel first = null;
boolean foundMe = false;
for (Panel panel : start.getRoot()) {
if (panel instanceof InputPanel) {
if (foundMe) {
next = (InputPanel) panel;
break;
} else if (panel == start)
foundMe = true;
if (first == null)
first = (InputPanel) panel;
}
}
if (next != null)
return next;
else
return first;
}
use of limelight.ui.Panel in project limelight by slagyr.
the class PropogateToParentAction method invoke.
public void invoke(Event event) {
PanelEvent panelEvent = (PanelEvent) event;
final Panel parent = panelEvent.getRecipient().getParent();
if (parent != null)
panelEvent.dispatch(parent);
}
Aggregations