Search in sources :

Example 1 with PanelEvent

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

the class Devtool method refresh.

public void refresh(Event e) {
    PanelEvent event = (PanelEvent) e;
    final Production production = event.getRecipient().getRoot().getProduction();
    final List<Stage> stages = production.getTheater().getStages();
    for (Stage stage : stages) {
        production.openScene(stage.getScene().getResourceLoader().getRoot(), stage, new Opts());
    }
//      (let [scene (.getRoot (.getRecipient e))
//        stage (.getStage scene)
//        production (.getProduction scene)
//        stages (.getStages (.getTheater production))]
//    (println stages)
//    (doall (map
//      (fn [stage]
//        (println "stage: " stage)
//        (.openScene production (.getName (.getScene stage)) stage (limelight.util.Opts. {})))
//      stages))
}
Also used : PanelEvent(limelight.ui.events.panel.PanelEvent) Opts(limelight.util.Opts) Production(limelight.model.Production) Stage(limelight.model.Stage)

Example 2 with PanelEvent

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

the class DropDownPopup method createListItems.

private void createListItems() {
    EventAction itemChosenAction = new EventAction() {

        public void invoke(Event e) {
            PanelEvent event = (PanelEvent) e;
            choose((PropPanel) event.getRecipient());
        }
    };
    EventAction itemSelectedAction = new EventAction() {

        public void invoke(Event e) {
            PanelEvent event = (PanelEvent) e;
            select((PropPanel) event.getRecipient());
        }
    };
    for (Object option : dropDown.getChoices()) {
        PropPanel listItem = new PropPanel(new SimplePropProxy(), Util.toMap("name", "limelight_builtin_drop_down_popup_list_item"));
        listItem.getStyle().addExtension(stylesStore.get("limelight_builtin_drop_down_popup_list_item"));
        listItem.getEventHandler().add(MouseClickedEvent.class, itemChosenAction);
        listItem.getEventHandler().add(MouseEnteredEvent.class, itemSelectedAction);
        listItem.setText(option.toString());
        if (option.equals(dropDown.getSelectedChoice()))
            select(listItem);
        popupList.add(listItem);
    }
}
Also used : PanelEvent(limelight.ui.events.panel.PanelEvent) PropPanel(limelight.ui.model.PropPanel) SimplePropProxy(limelight.ui.SimplePropProxy) EventAction(limelight.events.EventAction) PanelEvent(limelight.ui.events.panel.PanelEvent) Event(limelight.events.Event) MouseEnteredEvent(limelight.ui.events.panel.MouseEnteredEvent) MouseClickedEvent(limelight.ui.events.panel.MouseClickedEvent)

Example 3 with PanelEvent

use of limelight.ui.events.panel.PanelEvent 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);
}
Also used : PanelEvent(limelight.ui.events.panel.PanelEvent) Panel(limelight.ui.Panel)

Aggregations

PanelEvent (limelight.ui.events.panel.PanelEvent)3 Event (limelight.events.Event)1 EventAction (limelight.events.EventAction)1 Production (limelight.model.Production)1 Stage (limelight.model.Stage)1 Panel (limelight.ui.Panel)1 SimplePropProxy (limelight.ui.SimplePropProxy)1 MouseClickedEvent (limelight.ui.events.panel.MouseClickedEvent)1 MouseEnteredEvent (limelight.ui.events.panel.MouseEnteredEvent)1 PropPanel (limelight.ui.model.PropPanel)1 Opts (limelight.util.Opts)1