Examples of Constraints


Examples of org.dyno.visual.swing.layouts.Constraints

  @Override
  public Alignment createRightAxis(Component me, Rectangle bounds, Alignment lastAxis) {
    Container parent = target.getParent();
    GroupLayout layout = (GroupLayout) parent.getLayout();
    Constraints constraints = layout.getConstraints(target);
    Alignment horizontal = constraints.getHorizontal();
    if (horizontal instanceof Leading) {
      return createHorizontalLeading(me, bounds, parent);
    } else if (horizontal instanceof Trailing) {
      return createHorizontalTrailing(me, bounds, parent);
    } else if (horizontal instanceof Bilateral) {
View Full Code Here

Examples of org.dyno.visual.swing.layouts.Constraints

  @Override
  public Alignment createLeftAxis(Component me, Rectangle bounds, Alignment lastAxis) {
    Container parent = target.getParent();
    GroupLayout layout = (GroupLayout) parent.getLayout();
    Constraints constraints = layout.getConstraints(target);
    Alignment horizontal = constraints.getHorizontal();
    if (horizontal instanceof Leading) {
      if (lastAxis instanceof Leading)
        return createHorizontalLeading(me, bounds, parent);
      else if (lastAxis instanceof Trailing)
        return createHorizontalSpring(me, bounds, parent);
View Full Code Here

Examples of org.dyno.visual.swing.layouts.Constraints

    int count = parent.getComponentCount();
    GroupLayout layout = (GroupLayout) parent.getLayout();
    LayoutStyle layoutStyle = LayoutStyle.getInstance();
    for (int i = 0; i < count; i++) {
      Component target = parent.getComponent(i);
      Constraints constraints = layout.getConstraints(target);
      Rectangle targetBounds = target.getBounds();
      if (constraints != null && isOverlap(bounds.x, bounds.width, targetBounds.x, targetBounds.width)) {
        Alignment vertical = constraints.getVertical();
        Dimension prefs = target.getPreferredSize();
        Dimension mins = target.getMinimumSize();
        if (vertical instanceof Trailing) {
          int gap = layoutStyle.getPreferredGap((JComponent) target, (JComponent) me, ComponentPlacement.UNRELATED, SwingConstants.NORTH, parent);
          Trailing trailing = (Trailing) vertical;
View Full Code Here

Examples of org.jboss.ballroom.client.rbac.Constraints

                            {
                                Property acl = properties.get(0);
                                assert acl.getName().equals("default");   //TODO: overrides ...
                                ModelNode model = acl.getValue();

                                Constraints c = new Constraints();

                                if(model.hasDefined("address")
                                        && model.get("address").asBoolean()==false)
                                {
                                    c.setAddress(false);
                                }
                                else
                                {

                                    c.setReadConfig(model.get("read-config").asBoolean());
                                    c.setWriteConfig(model.get("write-config").asBoolean());
                                    c.setReadRuntime(model.get("read-runtime").asBoolean());
                                    c.setWriteRuntime(model.get("write-runtime").asBoolean());

                                }

                                // TODO: attribute constraints
View Full Code Here

Examples of org.kitesdk.data.spi.Constraints

  @Test
  public void testCreateView() throws Exception {
    DatasetDescriptor descriptor = new DatasetDescriptor.Builder()
        .schemaUri("resource:schema/user.avsc")
        .build();
    Constraints constraints = new Constraints(descriptor.getSchema(), null)
        .with("username", "user1")
        .with("email", "user1@example.com");

    AbstractDataset<Object> ds = mock(AbstractDataset.class);
    when(repo.create("ns", "test", descriptor, Object.class)).thenReturn(ds);
View Full Code Here

Examples of org.opengis.metadata.constraint.Constraints

     * Tests {@link FrenchProfile#toAFNOR(Object)} with {@link Constraints},
     * {@link LegalConstraints} and  {@link SecurityConstraints} objects.
     */
    @Test
    public void testConstraintsToAFNOR() {
        Constraints std, fra;

        std = new DefaultConstraints("Some constraints.");
        fra = (Constraints) FrenchProfile.toAFNOR(std);
        assertNotSame("Expected a copy.", std, fra);
        assertSame   ("Already an AFNOR instance.", fra, FrenchProfile.toAFNOR(fra));
View Full Code Here

Examples of org.qi4j.api.constraint.Constraints

                    continue nextConstraint;
                }
            }

            // Check the annotation itself
            Constraints constraints = annotationType.getAnnotation( Constraints.class );
            if( constraints != null )
            {
                for( Class<? extends Constraint<?, ?>> constraintClass : constraints.value() )
                {
                    if( helper.appliesTo( constraintClass, annotationType, valueType ) )
                    {
                        constraintModels.add( new ConstraintModel( constraintAnnotation, constraintClass ) );
                        continue nextConstraint;
View Full Code Here

Examples of org.qi4j.api.constraint.Constraints

        return Iterables.toList( Iterables.flattenIterables( Iterables.map( new Function<Type, Iterable<Class<? extends Constraint<?, ?>>>>()
        {
            @Override
            public Iterable<Class<? extends Constraint<?, ?>>> map( Type type )
            {
                Constraints constraints = Annotations.getAnnotation( type, Constraints.class );
                if( constraints == null )
                    return Iterables.empty();
                else
                    return iterable( constraints.value() );
            }
        }, types ) ) );
    }
View Full Code Here

Examples of org.springframework.rules.factory.Constraints

    private FileChecks() {

    }

    public static Constraint readableFileCheck() {
        Constraints c = Constraints.instance();
        Constraint checks = c.all(new Constraint[] { exists, file, readable });
        return c.testResultOf(fileConverter, checks);
    }
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.