Examples of Layout


Examples of org.apache.ws.security.policy.model.Layout

    log.debug("Processing "
        + spc.readCurrentSecurityToken().getTokenName() + ": "
        + SecurityProcessorContext.ACTION_NAMES[spc.getAction()]);
        try {
            if(spc.getAction() == SecurityProcessorContext.START) {
                Layout layout = (Layout) spc.readCurrentPolicyEngineData();
                layout.setValue(spc.getAssertion().getName().getLocalPart());
                ((Binding)spc.readPreviousPolicyEngineData()).setLayout(layout);
            }
        } catch (WSSPolicyException e) {
            log.error(e.getMessage(), e);
            return new Boolean(false);               
View Full Code Here

Examples of org.apache.wss4j.policy.model.Layout

        };
    }

    @Override
    public boolean assertEvent(SecurityEvent securityEvent) throws WSSPolicyException {
        Layout layout = (Layout) getAssertion();
        switch (layout.getLayoutType()) {
            case Strict:
                //todo
                break;
            case Lax:
                //todo?
                break;
            case LaxTsFirst:
                if (occuredEvents.isEmpty() &&
                        !WSSecurityEventConstants.Timestamp.equals(securityEvent.getSecurityEventType())) {
                    setAsserted(false);
                    setErrorMessage("Policy enforces " + layout.getLayoutType() + " but " +
                            securityEvent.getSecurityEventType() + " occured first");
                }
                break;
            case LaxTsLast:
                if (occuredEvents.contains(WSSecurityEventConstants.Timestamp)) {
                    setAsserted(false);
                    setErrorMessage("Policy enforces " + layout.getLayoutType() + " but " +
                            securityEvent.getSecurityEventType() + " occured last");
                }
                break;
        }
        occuredEvents.add(securityEvent.getSecurityEventType());
View Full Code Here

Examples of org.eclipse.swt.widgets.Layout

        nonDisposedImages.toArray(array);
        newShell.setImages(array);
      }
    }

    Layout layout = getLayout();
    if (layout != null) {
      newShell.setLayout(layout);
    }
  }
View Full Code Here

Examples of org.eurekastreams.server.domain.Layout

    @Test
    public final void testExecuteValid() throws Exception
    {
        final Long tabId = 100L;
        final Long gadgetDefinitionId = 9928L;
        final Layout tabLayout = Layout.THREECOLUMNLEFTWIDEHEADER;
        final Person person = context.mock(Person.class);

        final List<Tab> tabList = Collections.singletonList(tab);

        final List<Gadget> gadgets = new ArrayList<Gadget>();

        // Set up expectations
        context.checking(new Expectations()
        {
            {
                allowing(actionContext).getParams();
                will(returnValue(gadgetRequest));

                allowing(gadgetRequest).getTabId();
                will(returnValue(tabId));

                allowing(gadgetRequest).getGadgetDefinitionUrl();
                will(returnValue(GADGET_DEF_URL));

                allowing(gadgetRequest).getUserPrefs();
                will(returnValue(null));

                // action has to load the tab by ID
                allowing(tabMapper).findById(tabId);
                will(returnValue(tab));

                // then find-or-create the gadget definition
                allowing(gadgetDefinitionMapper).findByUrl(GADGET_DEF_URL);
                will(returnValue(gadgetDefinition));

                // gadget definition ID is 9928
                allowing(gadgetDefinition).getId();
                will(returnValue(gadgetDefinitionId));

                // and check what the last zone number is
                allowing(tab).getTabLayout();
                will(returnValue(tabLayout));

                // setup the list of mocked gadgets

                // ----------------
                // -- Gadget #0 - zone 0, index 0
                Gadget gadget0 = context.mock(Gadget.class, "gadget0");

                exactly(1).of(gadget0).getZoneNumber();
                will(returnValue(0));

                // should never have to ask this gadget for its zone index
                never(gadget0).getZoneIndex();
                // ----------------

                // ----------------
                // -- Gadget #1 - <LAST ZONE>, index 0
                Gadget gadget1 = context.mock(Gadget.class, "gadget1");
                exactly(1).of(gadget1).getZoneNumber();
                will(returnValue(tabLayout.getNumberOfZones() - 1));

                // ----------------
                // -- Gadget #2 - <LAST ZONE>, index 1
                Gadget gadget2 = context.mock(Gadget.class, "gadget2");

                // set the zone number - it MUST be requested once
                exactly(1).of(gadget2).getZoneNumber();
                will(returnValue(tabLayout.getNumberOfZones() - 1));

                // add the gadgets to the collection
                gadgets.add(gadget0);
                gadgets.add(gadget1);
                gadgets.add(gadget2);
View Full Code Here

Examples of org.flexdock.perspective.Layout

    /**
     * @see org.flexdock.perspective.persist.xml.ISerializer#serialize(org.w3c.dom.Document, java.lang.Object)
     */
    public Element serialize(Document document, Object object) {
        Layout layout = (Layout) object;

        Element layoutElement = document.createElement(PersistenceConstants.LAYOUT_ELEMENT_NAME);

        Dockable[] dockables = layout.getDockables();
        ISerializer dockingStateSerializer = SerializerRegistry.getSerializer(DockingState.class);
        for (int i = 0; i < dockables.length; i++) {
            Dockable dockable = dockables[i];
            DockingState dockingState = layout.getDockingState(dockable);
            Element dockingStateElement = dockingStateSerializer.serialize(document, dockingState);
            layoutElement.appendChild(dockingStateElement);
        }

        ISerializer floatingGroupSerializer = SerializerRegistry.getSerializer(FloatingGroup.class);
        String[] floatingGroupIds = layout.getFloatingGroupIds();
        for (int i = 0; i < floatingGroupIds.length; i++) {
            String floatingGroupId = floatingGroupIds[i];
            FloatingGroup floatingGroup = layout.getGroup(floatingGroupId);
            Element floatingGroupElement = floatingGroupSerializer.serialize(document, floatingGroup);
            layoutElement.appendChild(floatingGroupElement);
        }

        LayoutNode layoutNode = layout.getRestorationLayout();
        //TODO should we nest restoration layout in Restoration node?
        if (layoutNode != null) {
            ISerializer layoutNodeSerializer = SerializerRegistry.getSerializer(LayoutNode.class);
            Element layoutNodeElement = layoutNodeSerializer.serialize(document, layoutNode);
            layoutElement.appendChild(layoutNodeElement);
View Full Code Here

Examples of org.gephi.layout.spi.Layout

    public LayoutBuilder getSelectedBuilder() {
        return selectedBuilder;
    }

    public Layout getLayout(LayoutBuilder layoutBuilder) {
        Layout layout = layoutBuilder.buildLayout();
        selectedBuilder = layoutBuilder;
        layout.resetPropertiesValues();
        return layout;
    }
View Full Code Here

Examples of org.gephi.layout.spi.Layout

        layout.resetPropertiesValues();
        return layout;
    }

    protected void setSelectedLayout(Layout selectedLayout) {
        Layout oldValue = this.selectedLayout;
        this.selectedLayout = selectedLayout;
        this.selectedBuilder = selectedLayout != null ? selectedLayout.getBuilder() : null;
        if (oldValue != null) {
            saveProperties(oldValue);
        }
View Full Code Here

Examples of org.gephi.layout.spi.Layout

            if (newGraphSize < getMinSize() || newGraphSize > graphSize * getMinCoarseningRate()) {
                break;
            }
        }

        Layout random = new RandomLayout(null, 1000);
        random.setGraphModel(graphModel);
        random.initAlgo();
        random.goAlgo();

        initYifanHu();
    }
View Full Code Here

Examples of org.graphstream.ui.layout.Layout

    Viewer viewer = new Viewer(this,
        Viewer.ThreadingModel.GRAPH_IN_ANOTHER_THREAD);
    GraphRenderer renderer = Viewer.newGraphRenderer();
    viewer.addView(Viewer.DEFAULT_VIEW_ID, renderer);
    if (autoLayout) {
      Layout layout = Layouts.newLayoutAlgorithm();
      viewer.enableAutoLayout(layout);
    }
    return viewer;
  }
View Full Code Here

Examples of org.jboss.dashboard.ui.resources.Layout

            setAttribute("error", getSectionPropertiesHandler().hasError("layout"));
            renderFragment("layoutsStart");
            GraphicElement[] layouts = UIServices.lookup().getLayoutsManager().getAvailableElements(getSectionPropertiesHandler().getWorkspace().getId(), null, null);
            for (int i = 0; i < layouts.length; i++) {
                Layout layout = (Layout) layouts[i];
                boolean currentLayout = layout.getId().equals(getSectionPropertiesHandler().getLayout());
                setAttribute("layoutDescription", layout.getDescription());
                setAttribute("layoutId", layout.getId());
                renderFragment(currentLayout ? "outputSelectedLayout" : "outputLayout");
            }
            renderFragment("layoutsEnd");

            //layout preview
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.