package uk.ac.leeds.ccg.widgets; import java.awt.*; import uk.ac.leeds.ccg.geotools.*; import uk.ac.leeds.ccg.dbffile.*; import uk.ac.leeds.ccg.shapefile.*; public class ConfigureTheme extends java.awt.Dialog { ShapefileReader source; public ConfigureTheme(Frame parent,ShapefileReader reader) { super(parent); source = reader; //{{INIT_CONTROLS setLayout(null); setSize(503,270); setVisible(false); add(choiceShadeBy); choiceShadeBy.setBounds(120,72,156,25); add(choiceToolTip); choiceToolTip.setBounds(120,108,156,25); add(choiceID); choiceID.setBounds(120,36,156,25); label1.setText("ID Column"); add(label1); label1.setBounds(12,36,97,25); label2.setText("Data Column"); add(label2); label2.setBounds(12,72,93,24); label3.setText("Tool Tip"); add(label3); label3.setBounds(12,108,100,27); button1.setLabel("OK"); add(button1); button1.setBackground(java.awt.Color.lightGray); button1.setBounds(312,228,95,34); fill.setState(true); fill.setLabel("Fill Features"); add(fill); fill.setBounds(12,156,108,29); outline.setState(true); outline.setLabel("Outline Features"); add(outline); outline.setBounds(12,192,132,33); lineShade.setLabel("Line Color from Shader"); add(lineShade); lineShade.setBounds(180,192,156,29); choiceLineColor.addItem("Black"); choiceLineColor.addItem("Red"); choiceLineColor.addItem("Green"); choiceLineColor.addItem("Blue"); try { choiceLineColor.select(0); } catch (IllegalArgumentException e) { } add(choiceLineColor); choiceLineColor.setBounds(348,192,121,25); setTitle("ConfigureTheme"); //}} //{{REGISTER_LISTENERS SymWindow aSymWindow = new SymWindow(); this.addWindowListener(aSymWindow); SymAction lSymAction = new SymAction(); button1.addActionListener(lSymAction); SymItem lSymItem = new SymItem(); lineShade.addItemListener(lSymItem); fill.addItemListener(lSymItem); outline.addItemListener(lSymItem); //}} //set up choice boxes Dbf dbf = reader.dbf; Shapefile sf = reader.sf; int fieldCount = dbf.getNumFields(); for(int i=0;i