Examples of ColourScheme


Examples of ket.display.ColourScheme

  }
  */

  public Band boxesByDepth(Argument a, TreeMap<Integer, Vector<Band>> map, Position topLeft, ColourScheme colourScheme) {
    Band band = super.boxesByDepth(a, map, topLeft, colourScheme);
    ColourScheme localCS = getLocalColourScheme(colourScheme);
    Argument local = getArgument();
    if (local==null) {
      local = a;
    }
    Position childTopLeft = getPosition(topLeft);
View Full Code Here

Examples of ket.display.ColourScheme

    text.clear();
    sizes.clear();
    Vector<Equation> equations = getEquations();

    figs.clear();
    ColourScheme colourScheme = getColourScheme();

    n = equations.size();
    Vector<Integer> visible = findVisibleEquationIndices();
    for (int i=0; i<n; i++) {
      Equation e = equations.get(i);
View Full Code Here

Examples of ket.display.ColourScheme

    colourSetup(g2D, colourScheme);
    draw(g2D, topLeft, colourScheme);
  }

  public ColourScheme getLocalColourScheme(ColourScheme colourScheme) {
    ColourScheme localCS = getColourScheme();
    return localCS!=null ? localCS : colourScheme;
  }
View Full Code Here

Examples of ket.display.ColourScheme

    ColourScheme localCS = getColourScheme();
    return localCS!=null ? localCS : colourScheme;
  }

  public void colourSetup(Graphics2D g2D, ColourScheme colourScheme) {
    ColourScheme cs = getLocalColourScheme(colourScheme);
    if (argument!=null) {
      Color boxColour = cs.getBoxColour(argument);
      g2D.setColor(boxColour);
    } else {
      g2D.setColor(new Color(0, 0, 0)) ; // !ERROR
    }
  }
View Full Code Here

Examples of ket.display.ColourScheme

    }
  }

  @Override
  public void drawBand(Graphics2D g2D, Position topLeft, ColourScheme colourScheme) {
    ColourScheme localCS = getLocalColourScheme(colourScheme);
    for (Box child: children) {
      if (isBand(child)) {
        child.paint(g2D, getPosition(topLeft), localCS);
      }
    }
View Full Code Here

Examples of ket.display.ColourScheme

    }
  }

  @Override
  public void draw(Graphics2D g2D, Position topLeft, ColourScheme colourScheme) {
    ColourScheme localCS = getLocalColourScheme(colourScheme);
    //- drawCross(topLeft, g2D);
    for (Box child: children) {
      child.paint(g2D, getPosition(topLeft), localCS);
    }
  }
View Full Code Here

Examples of org.locationtech.udig.ui.palette.ColourScheme

        // This is the "best" match; usually the one the user supplied
        layer.setGeoResource(preferredResource);

        // determine the default colour
        ColourScheme colourScheme = getColorScheme();
        Color colour = colourScheme.addItem(theLayer.getID().toString());
        theLayer.setDefaultColor(colour);

        runLayerCreatedInterceptor(layer);

        return layer;
View Full Code Here

Examples of org.locationtech.udig.ui.palette.ColourScheme

    /**
     * <!-- begin-user-doc --> <!-- end-user-doc -->
     * @generated
     */
    public void setColourScheme(ColourScheme newColourScheme) {
        ColourScheme oldColourScheme = colourScheme;
        colourScheme = newColourScheme;
        if (eNotificationRequired())
            eNotify(new ENotificationImpl(this, Notification.SET,
                    ProjectPackage.LAYER__COLOUR_SCHEME, oldColourScheme, colourScheme));
    }
View Full Code Here

Examples of org.locationtech.udig.ui.palette.ColourScheme

     * @return
     */
    public Control getPaletteCombo( Layer layer ) {
        layerReference = layer;
        String layerName = layer.getName();
        ColourScheme layerScheme = layer.getColourScheme();
        ColourScheme mapScheme = layer.getMapInternal().getColourScheme();
       
        final ColourScheme currentScheme;
        if (layerScheme != null && !(layerScheme.equals(mapScheme))) { //TODO: check logic
            currentScheme = layerScheme;
        } else {
            currentScheme = mapScheme;
        }
View Full Code Here

Examples of org.locationtech.udig.ui.palette.ColourScheme

         */

        this.map = thisMap;
        numberOfLayers = this.map.getLayersInternal().size();
        mapPalette = map.getColorPalette();
        mapScheme =  new ColourScheme(map.getColourScheme().getColourPalette(), map.getColourScheme().getSizePalette());
        //workaround for non-saving (need to correct number of colours)
        if (mapScheme.getSizePalette() < numberOfLayers) {
            mapScheme.setSizePalette(numberOfLayers);
        }
        scrolledComposite = new ScrolledComposite(parent, SWT.V_SCROLL | SWT.H_SCROLL);
        composite = new Composite(scrolledComposite, SWT.NONE);
       
        scrolledComposite.setContent(composite);

        GridLayout gridLayout = new GridLayout();
        gridLayout.numColumns = 4;
        composite.setLayout(gridLayout);

        // title at top of panel
        Label titleLabel = new Label(composite, SWT.NONE);
        titleLabel.setText(Messages.PaletteDefaultChooserPanel_title);

        GridData data = new GridData();
        data.horizontalSpan = 4;
        titleLabel.setLayoutData(data);

        //map background color label
        Label backgroundColor = new Label(composite, SWT.NONE);
        backgroundColor.setText(Messages.PaletteDefaultChooserPanel_MapBackgroundColor);
        data = new GridData();
        data.horizontalSpan = 1;
        backgroundColor.setLayoutData(data);
       
        colorEditor = new ColorEditor(composite);
        Color bgColor = (Color)thisMap.getBlackboard().get(ProjectBlackboardConstants.MAP__BACKGROUND_COLOR);
        if (backgroundColor != null)
            colorEditor.setColorValue(new RGB(bgColor.getRed(), bgColor.getGreen(), bgColor.getBlue()));
       //spacer
        Composite colorc = new Composite(composite, SWT.NONE);
        data = new GridData();
        data.horizontalSpan = 2;
        colorc.setLayoutData(data);
       
        // palette label
        Label paletteLabel = new Label(composite, SWT.NONE);
        paletteLabel.setText(Messages.PaletteDefaultChooserPanel_palette);

        data = new GridData();
        data.horizontalSpan = 1;
        paletteLabel.setLayoutData(data);

        // palette colourLetterCombo box
        paletteSelectionCombo = new Combo(composite, SWT.DROP_DOWN | SWT.READ_ONLY);

        String[] names = PlatformGIS.getColorBrewer().getPaletteNames();

        paletteSelectionCombo.setItems(names);

        // find out index number for selection
        int index = 0;
        for( int i = 0; i < names.length; i++ ) {
            if ((names[i]).equalsIgnoreCase(mapPalette.getName())) {
                index = i;
                break;
            }
        }

        paletteSelectionCombo.addSelectionListener(new SelectionListener(){
            public void widgetSelected( SelectionEvent e ) {
                /*
                 * When a new palette is selected: get the palette String and then we want to
                 * repaint all paletteCombos to have new colours
                 */
                int index = paletteSelectionCombo.getSelectionIndex();
                String name = paletteSelectionCombo.getItem(index);
                BrewerPalette palette = PlatformGIS.getColorBrewer().getPalette(name);
                //ColourScheme scheme = map.getColourScheme();
                //scheme.setColourPalette(palette);
                //map.setColorPalette(palette);
                //map.setColourScheme(scheme);
                mapScheme = new ColourScheme(palette,  Integer.parseInt(quantityCombo.getItem(quantityCombo.getSelectionIndex())) );
                updateLayerDisplay();
            }

            public void widgetDefaultSelected( SelectionEvent e ) {
            }
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.