Examples of IBlackboard


Examples of org.locationtech.udig.project.IBlackboard

     g.setColor(Color.RED);
     g.setStroke(ViewportGraphics.LINE_SOLID, 2);
    
     //get the map blackboard
     IMap map = context.getLayer().getMap();
     IBlackboard blackboard = context.getLayer().getMap().getBlackboard();
    
     List<Coordinate> coordinates =
         (List<Coordinate>) blackboard.get("locations");
    
     if (coordinates == null) {
         return; //no coordinates to draw
     }
        
View Full Code Here

Examples of org.locationtech.udig.project.IBlackboard

            public void handleEvent( Event event ) {

                final FontDialog dialog = new FontDialog(button.getShell());

                // setup default font
                IBlackboard blackboard = getStyleBlackboard();
                FontStyle fontStyle = (FontStyle) blackboard.get(FontStyleContent.ID);
                if (fontStyle != null) {
                    Font f = fontStyle.getFont();
                    FontData[] fd = AWTSWTImageUtils.awtFontToSwt(f,JFaceResources.getFontRegistry()).getFontData();
                    dialog.setFontList(fd);
                }
View Full Code Here

Examples of org.locationtech.udig.project.IBlackboard

    // do nothing

  }

  public void refresh() {
      IBlackboard blackboard = getStyleBlackboard();
        Rectangle rect = (Rectangle) blackboard.get(LocationStyleContent.ID);

        if (rect == null) {
            rect = LocationStyleContent.createDefaultStyle();
            setLeft(rect);
            setTop(rect);

            blackboard.put(LocationStyleContent.ID, rect);
            ((StyleBlackboard) blackboard).setSelected(new String[]{LocationStyleContent.ID});
        }

        if (isLeft(rect))
            xCombo.select(0);
View Full Code Here

Examples of org.locationtech.udig.project.IBlackboard

    /*
     * @see org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt.events.SelectionEvent)
     */
    public void widgetSelected( SelectionEvent e ) {
        IBlackboard blackboard = getStyleBlackboard();
        Rectangle rect = (Rectangle) blackboard.get(LocationStyleContent.ID);

        if (rect == null) {
            rect = LocationStyleContent.createDefaultStyle();
            setLeft(rect);
            setTop(rect);

            blackboard.put(LocationStyleContent.ID, rect);
            ((StyleBlackboard) getStyleBlackboard()).setSelected(new String[]{LocationStyleContent.ID});
        }
       
        //read object state from ui widgets
        switch (xCombo.getSelectionIndex()) {
View Full Code Here

Examples of org.locationtech.udig.project.IBlackboard

   
    /*
     * @see org.locationtech.udig.style.IStyleConfigurator#refresh()
     */
    public void refresh() {
        IBlackboard blackboard = getStyleBlackboard();
        Rectangle rect = (Rectangle) blackboard.get(LocationStyleContent.ID);

        if (rect == null) {
            rect = LocationStyleContent.createDefaultStyle();
            setLeft(rect);
            setTop(rect);

            blackboard.put(LocationStyleContent.ID, rect);
            ((StyleBlackboard) blackboard).setSelected(new String[]{LocationStyleContent.ID});
        }

        if (isLeft(rect))
            xCombo.select(0);
View Full Code Here

Examples of org.locationtech.udig.project.IBlackboard

    /*
     * @see org.locationtech.udig.style.IStyleConfigurator#apply()
     */
    public void apply() {
        IBlackboard blackboard = getStyleBlackboard();
        Rectangle rect = (Rectangle) blackboard.get(LocationStyleContent.ID);

        if (rect == null) {
            rect = LocationStyleContent.createDefaultStyle();
            blackboard.put(LocationStyleContent.ID, rect);
            ((StyleBlackboard) blackboard).setSelected(new String[]{LocationStyleContent.ID});

        }

    }
View Full Code Here

Examples of org.locationtech.udig.project.IBlackboard

    /*
     * @see org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt.events.SelectionEvent)
     */
    public void widgetSelected( SelectionEvent e ) {
        IBlackboard blackboard = getStyleBlackboard();
        Rectangle rect = (Rectangle) blackboard.get(LocationStyleContent.ID);

        if (rect == null) {
            rect = LocationStyleContent.createDefaultStyle();
            setLeft(rect);
            setTop(rect);

            blackboard.put(LocationStyleContent.ID, rect);
            ((StyleBlackboard) getStyleBlackboard()).setSelected(new String[]{LocationStyleContent.ID});
        }
       
        //read object state from ui widgets
        switch (xCombo.getSelectionIndex()) {
View Full Code Here

Examples of org.locationtech.udig.project.IBlackboard

        IEditorInput input = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage()
        .getActiveEditor().getEditorInput();
        map = (Map) ((MapEditorInput) input).getProjectElement();
       
        //get configuration for this wizard
        IBlackboard mapBlackboard = map.getBlackboard();
        ExportPDFWizardConfigBean config =
            (ExportPDFWizardConfigBean)mapBlackboard.get(ExportPDFWizardConfigBean.BLACKBOARD_KEY);
       
        page1 = new ExportPDFWizardPage1(templateFactories, config);
        addPage(page1);
    }
View Full Code Here

Examples of org.locationtech.udig.project.IBlackboard

        }

        Dimension screen = context.getMapDisplay().getDisplaySize();

        // get the active region
        IBlackboard blackboard = context.getMap().getBlackboard();
        ActiveRegionStyle style = (ActiveRegionStyle) blackboard.get(ActiveregionStyleContent.ID);
        if (style == null) {
            style = ActiveregionStyleContent.createDefault();
            blackboard.put(ActiveregionStyleContent.ID, style);
            // ((IBlackboard) styleBlackboard)
            // .setSelected(new String[]{ActiveregionStyleContent.ID});
        }

        if (style.windPath == null) {
View Full Code Here

Examples of org.locationtech.udig.project.IBlackboard

                Envelope bounds = new Envelope(c1, c2);

                ILayer activeRegionLayer = JGrassPlugin.getDefault().getActiveRegionMapGraphic();
                IMap activeMap = ApplicationGIS.getActiveMap();
                IBlackboard blackboard = activeMap.getBlackboard();
                ActiveRegionStyle style = (ActiveRegionStyle) blackboard.get(ActiveregionStyleContent.ID);
                if (style != null) {
                    try {
                        JGrassRegion activeRegion = new JGrassRegion(style.windPath);
                        JGrassRegion newActiveRegion = JGrassRegion.adaptActiveRegionToEnvelope(bounds, activeRegion);
                        JGrassRegion.writeWINDToMapset(new File(style.windPath).getParent(), newActiveRegion);
                        style.north = (float) newActiveRegion.getNorth();
                        style.south = (float) newActiveRegion.getSouth();
                        style.east = (float) newActiveRegion.getEast();
                        style.west = (float) newActiveRegion.getWest();
                        style.rows = newActiveRegion.getRows();
                        style.cols = newActiveRegion.getCols();

                        blackboard.put(ActiveregionStyleContent.ID, style);

                        activeRegionLayer.refresh(null);
                    } catch (IOException e1) {
                        e1.printStackTrace();
                    }
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.