Package name.shamansir.mvp4glayout.client.ui.widget

Examples of name.shamansir.mvp4glayout.client.ui.widget.Layout


        unregisterHandlers();
       
        view.beforePortalChange(portal);
       
        currentBuilder = builder;
        final Layout layoutBuilt = builder.build(state);
        if (!portal.layout.equals(layoutBuilt.id())) {
            throw new IllegalArgumentException("Layout of passed portal (" + portal + " - " + portal.layout + ") does not matches " +
                                               "the passed layout built (" +  layoutBuilt.id() + ")");         
        }
        // currentBuilder = builder; // TODO: may be it must be here
       
        view.switchLayout(layoutBuilt);
        subscribePageEvents(layoutBuilt);
View Full Code Here


            if (!currentBuilder.layoutHasStates()) Log.warn("Current layout " + currentBuilder.layoutId() + " do not supports states, please ensure you do what you want");
            if ((currentBuilder.curState() != null) && currentBuilder.curState().equals(state)) return;
            //currentBuilder.reset();
            currentBuilder.build(state); // just changes layout inside it, do not re-renders anything that not required
        } else {
            Layout layout = getActualLayout();
            PlugsContainer container = layout.getPluggable(where).getContainer();
            if (!(container instanceof HasStatesPanels)) throw new IllegalStateException("Container " + container + " at place " + where + " does not implements HasStatesPanels, so it can not change states");
            HasStatesPanels panels = (HasStatesPanels)container;
            // TODO: check if it is already in this state
            Pluggable plug = panels.getViewFor(state);
            plug.changeState(state);
            layout.plug(where, plug);
        }
    }
View Full Code Here

    private Layouts() { }
   
    public static Layout get(LayoutId id) {
      if (layouts.containsKey(id)) return layouts.get(id);
      if (makers.containsKey(id)) {
          final Layout layout = makers.get(id).create();   
          if (layout != null) layouts.put(id, layout);
          else throw new IllegalStateException("Layout with layout id " + id.name() + " was not created by Maker");
          return layout;
      } else throw new IllegalStateException("No Layout Maker registered for layout with id " + id.name());
    }
View Full Code Here

TOP

Related Classes of name.shamansir.mvp4glayout.client.ui.widget.Layout

Copyright © 2018 www.massapicom. 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.