Package net.lucidviews.geoalgo.limb.data

Examples of net.lucidviews.geoalgo.limb.data.Options


    Point point = this.geometryFactory.createPoint( new Coordinate( x, y ) );
   
    Limb limb = new Limb();
    limb.setIntersection( point );
   
    Options options = new Options();
    options.setScreenSize( this.trebleScreenSize );
   
    PositionAssignmentLimbRefiner testObj = new PositionAssignmentLimbRefiner();
    testObj.refine( limb, this.defaultView, options );
   
    assertNotNull( limb.getPosition() );
View Full Code Here


    //  but GeometryFactory::createGeometry( outerCollection ) takes a shallow copy.)
   
    Limb limb = new Limb();
    limb.setIntersection( outerCollection );
   
    Options options = new Options();
    options.setScreenSize( this.halfScreenSize );
   
    PositionAssignmentLimbRefiner testObj = new PositionAssignmentLimbRefiner();
    testObj.refine( limb, this.defaultView, options );
   
    assertTrue( limb.getPosition() instanceof GeometryCollection );
View Full Code Here

 
  public void testStringProperty()
  {
    final String textAttribute = "Hallo! World.";
   
    Options options = new Options();
    options.setLabelFormat( TEXT_ATTRIBUTE_ID );
   
    this.feature.getProperty( TEXT_ATTRIBUTE_ID ).setValue( textAttribute );
   
    String label = new SimpleFeatureLabelFormatter().createLabel( this.feature, options );
   
View Full Code Here

 
  public void testBlankStringProperty()
  {
    final String textAttribute = "";
   
    Options options = new Options();
    options.setLabelFormat( TEXT_ATTRIBUTE_ID );
   
    this.feature.getProperty( TEXT_ATTRIBUTE_ID ).setValue( textAttribute );
   
    String label = new SimpleFeatureLabelFormatter().createLabel( this.feature, options );
   
View Full Code Here

 
  public void testNumericProperty()
  {
    final Number numericAttribute = 33.6;
   
    Options options = new Options();
    options.setLabelFormat( NUMERIC_ATTRIBUTE_ID );
   
    this.feature.getProperty( NUMERIC_ATTRIBUTE_ID ).setValue( numericAttribute );
   
    String label = new SimpleFeatureLabelFormatter().createLabel( this.feature, options );
   
View Full Code Here

 
  public void testUndefinedPropertyValue()
  {
    final String undefinedValueLabel = "Cannot find a value for this property!";
   
    Options options = new Options();
    options.setLabelFormat( NUMERIC_ATTRIBUTE_ID );
   
    this.feature.getProperty( NUMERIC_ATTRIBUTE_ID ).setValue( null );
   
    SimpleFeatureLabelFormatter testObj = new SimpleFeatureLabelFormatter();
    testObj.setUndefinedValueLabel( undefinedValueLabel );
View Full Code Here

 
  public void testUndefinedProperty()
  {
    final String undefinedPropertyLabel = "Cannot find this property!";
   
    Options options = new Options();
    options.setLabelFormat( "invalidPropertyName" );
   
    SimpleFeatureLabelFormatter testObj = new SimpleFeatureLabelFormatter();
    testObj.setUndefinedPropertyLabel( undefinedPropertyLabel );
    String label = testObj.createLabel( this.feature, options );
   
View Full Code Here

    assertEquals( undefinedPropertyLabel, label );
  }
 
  public void testNoFormat()
  {
    Options options = new Options();
   
    String label = new SimpleFeatureLabelFormatter().createLabel( this.feature, options );
   
    assertEquals( FEATURE_ID, label );
  }
View Full Code Here

    assertNotNull( this.limb.getPosition() );
  }
 
  public void testDefaultPropertyListIsUsedWhenListInOptionsIsNull() throws Exception
  {
    Options options = new Options();
    options.setLimbPropertiesToKeep( null );
   
    LeanBeanLimbRefiner testObj = new LeanBeanLimbRefiner();
    testObj.setDefaultBeanProperties( "edges,label,position" );
    testObj.refine( this.limb, null, options );
   
View Full Code Here

    assertNotNull( this.limb.getPosition() );
  }
 
  public void testPropertyListInOptionsOverridesDefaultList() throws Exception
  {
    Options options = new Options();
    options.setLimbPropertiesToKeep( "feature,intersection,label" );
   
    LeanBeanLimbRefiner testObj = new LeanBeanLimbRefiner();
    testObj.setDefaultBeanProperties( "edges,label,position" );
    testObj.refine( this.limb, null, options );
   
View Full Code Here

TOP

Related Classes of net.lucidviews.geoalgo.limb.data.Options

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.