Package org.geotools.util

Examples of org.geotools.util.SimpleInternationalString


   
    /**
     * Construct <code>Palette</code>.
     */
    public Palette( String name, Scheme list[]) {
        this.name = new SimpleInternationalString( name );
        this.contents = Arrays.asList( list );
        this.type = SchemeType.QUALITATIVE;
    }
View Full Code Here


     * </p>
     * @param properties
     */
    public Palette( Properties properties ) {
        String KEY = properties.getProperty( "palette.key" ); //$NON-NLS-1$
        name = new SimpleInternationalString( properties.getProperty( "palette.display" )); //$NON-NLS-1$
              
        type = Enum.valueOf( SchemeType.class, properties.getProperty( "palette.type" ).trim() ); //$NON-NLS-1$
       
        int min = Integer.parseInt( properties.getProperty("palette.min") ); //$NON-NLS-1$
        int max = Integer.parseInt( properties.getProperty("palette.max") ); //$NON-NLS-1$
View Full Code Here

            int total;
            int amount;
            public void beginTask( String name, int totalWork ) {
                amount = 0;
                total = totalWork;
                monitor.setTask( new SimpleInternationalString(name));
                monitor.progress( work() );
            }
            float work(){
                return (float) amount / (float) total;
            }
            public void done() {
                amount = total;
                monitor.complete();
                monitor.dispose();
            }
            public void internalWorked( double work ) {
            }
            public boolean isCanceled() {
                return monitor.isCanceled();
            }
            public void setCanceled( boolean cancel ) {
                monitor.setCanceled( cancel );
            }
            public void setTaskName( String name ) {
                monitor.setTask( new SimpleInternationalString( name ));
            }
            public void subTask( String name ) {
                monitor.setTask( new SimpleInternationalString( name ));
            }
            public void worked( int work ) {
                amount += total;
            }
        };
View Full Code Here

    public void op( Display display, Object target, IProgressMonitor monitor ) throws Exception {
       
        //System.out.println("create seagulls called"); //$NON-NLS-1$
        // build some flock data to use
        SeagullFlock flock = new SeagullFlock("flock 01"//$NON-NLS-1$
                new SimpleInternationalString("flock 01"), DefaultGeographicCRS.WGS84); //$NON-NLS-1$
       
        flock.addChild(new Seagull(flock, "seagull A"//$NON-NLS-1$
                new SimpleInternationalString("seagull A"), //$NON-NLS-1$
                new Coordinate(-123,48)));
       
        flock.addChild(new Seagull(flock, "seagull B"//$NON-NLS-1$
                new SimpleInternationalString("seagull B"), //$NON-NLS-1$ 
                new Coordinate(-77,-12)));
       
        flock.addChild(new Seagull(flock, "seagull C"//$NON-NLS-1$
                new SimpleInternationalString("seagull C"), //$NON-NLS-1$
                new Coordinate(-80,20)));     
       
        flock.addChild(new Seagull(flock, "seagull D"//$NON-NLS-1$
                new SimpleInternationalString("seagull D"), //$NON-NLS-1$
                new Coordinate(-86,22)));  
       
        flock.addChild(new Seagull(flock, "seagull E"//$NON-NLS-1$
                new SimpleInternationalString("seagull E"), //$NON-NLS-1$
                new Coordinate(-90,0)));  
       
        flock.addChild(new Seagull(flock, "seagull F"//$NON-NLS-1$
                new SimpleInternationalString("seagull F"), //$NON-NLS-1$
                new Coordinate(-60,34)));  
       
        flock.addChild(new Seagull(flock, "seagull G"//$NON-NLS-1$
                new SimpleInternationalString("seagull G"), //$NON-NLS-1$
                new Coordinate(-118,2)));          
       
        // stick our test flock on the blackboard
        IMap map = (IMap) target;  //ApplicationGIS.getActiveMap();
        if (map == null)
View Full Code Here

        }
       
        String title = (String) getOptionalMember(paramObj, "title", String.class);
        InternationalString i18nTitle = null;
        if (title != null) {
            i18nTitle = new SimpleInternationalString(title);
        }

        String desc = (String) getOptionalMember(paramObj, "description", String.class);
        InternationalString i18nDesc = null;
        if (desc != null) {
            i18nDesc = new SimpleInternationalString(desc);
        }
       
        Object minOccursObj = paramObj.get("minOccurs", paramObj);
        int minOccurs = 1;
        if (minOccursObj instanceof Number) {
View Full Code Here

            throw new IllegalStateException("Cannot cancel when completed");
        isCanceled = cancel;
    }

    public void setDescription(String description) {
        task = new SimpleInternationalString(description);
    }
View Full Code Here

                // Creating the Temporal Datum
                if (t_datumName == null) {
                    t_datumName = "Unknown";
                }
                final Map<String, String> datumMap = Collections.singletonMap("name", t_datumName);
                final Position timeOrigin = new DefaultPosition(new SimpleInternationalString(t_originDate));
                final TemporalDatum temporalDatum = NetCDFCRSUtilities.FACTORY_CONTAINER.getDatumFactory().createTemporalDatum(datumMap, timeOrigin.getDate());

                // Finally creating the Temporal CoordinateReferenceSystem
                String crsName = "time_CRS";
                final Map<String, String> crsMap = Collections.singletonMap("name", crsName);
View Full Code Here

        final Set<SampleDimension> sampleDims = new HashSet<SampleDimension>();
        sampleDims.add(new GridSampleDimension(description + ":sd", (Category[]) null, null));

        InternationalString desc = null;
        if (description != null && !description.isEmpty()) {
            desc = new SimpleInternationalString(description);
        }
        final FieldType fieldType = new DefaultFieldType(new NameImpl(getName()), desc, sampleDims);
        sb.append(description != null ? description.toString() + "," : "");
        final RangeType range = new DefaultRangeType(getName(), description, fieldType);
        this.setRangeType(range);
View Full Code Here

     *
     * @generated modifiable
     */
    public Object parse(ElementInstance instance, Node node, Object value)
            throws Exception {
        Position timePosition = new DefaultPosition(new SimpleInternationalString((String) value));
        return timePosition;
    }
View Full Code Here

    }

    @Test
    public void testDriver() throws IOException {

        SimpleInternationalString driverName = new SimpleInternationalString(TestDriver.TEST_DRIVER);

        // Testing main driver capabilities. That's a Dummy Driver, it can only connect
        Map<String, Serializable> connectionParams = new HashMap<String, Serializable>();
        connectionParams.put(DefaultFileDriver.URL.key, new URL(TestDriver.TEST_URL));
View Full Code Here

TOP

Related Classes of org.geotools.util.SimpleInternationalString

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.