Package javax.swing

Examples of javax.swing.JCheckBox$AccessibleJCheckBox


     * maps, or attribute text.
     *
     * @return Component object representing the palette widgets.
     */
    public java.awt.Component getGUI() {
        JCheckBox showCGCheck, showTLMCheck, showJOGCheck, showTPCCheck, showONCCheck, showJNCCheck, showGNCCheck, showCIB10Check, showCIB5Check, showMISCCheck;

        showCGCheck = new JCheckBox("Show City Graphic Coverage", showCG);
        showCGCheck.setActionCommand(showCGCommand);
        showCGCheck.addActionListener(this);
        showCGCheck.setForeground(CGColor);

        showTLMCheck = new JCheckBox("Show TLM (1:50k) Coverage", showTLM);
        showTLMCheck.setActionCommand(showTLMCommand);
        showTLMCheck.addActionListener(this);
        showTLMCheck.setForeground(TLMColor);

        showJOGCheck = new JCheckBox("Show JOG (1:250k) Coverage", showJOG);
        showJOGCheck.setActionCommand(showJOGCommand);
        showJOGCheck.addActionListener(this);
        showJOGCheck.setForeground(JOGColor);

        showTPCCheck = new JCheckBox("Show TPC (1:500k) Coverage", showTPC);
        showTPCCheck.setActionCommand(showTPCCommand);
        showTPCCheck.addActionListener(this);
        showTPCCheck.setForeground(TPCColor);

        showONCCheck = new JCheckBox("Show ONC (1:1M) Coverage", showONC);
        showONCCheck.setActionCommand(showONCCommand);
        showONCCheck.addActionListener(this);
        showONCCheck.setForeground(ONCColor);

        showJNCCheck = new JCheckBox("Show JNC (1:2M) Coverage", showJNC);
        showJNCCheck.setActionCommand(showJNCCommand);
        showJNCCheck.addActionListener(this);
        showJNCCheck.setForeground(JNCColor);

        showGNCCheck = new JCheckBox("Show GNC (1:5M) Coverage", showGNC);
        showGNCCheck.setActionCommand(showGNCCommand);
        showGNCCheck.addActionListener(this);
        showGNCCheck.setForeground(GNCColor);

        showCIB10Check = new JCheckBox("Show CIB 10m Coverage", showCIB10);
        showCIB10Check.setActionCommand(showCIB10Command);
        showCIB10Check.addActionListener(this);
        showCIB10Check.setForeground(CIB10Color);

        showCIB5Check = new JCheckBox("Show CIB 5m Coverage", showCIB5);
        showCIB5Check.setActionCommand(showCIB5Command);
        showCIB5Check.addActionListener(this);
        showCIB5Check.setForeground(CIB5Color);

        showMISCCheck = new JCheckBox("Show Coverage of all Others", showMISC);
        showMISCCheck.setActionCommand(showMISCCommand);
        showMISCCheck.addActionListener(this);
        showMISCCheck.setForeground(MISCColor);

        Box box = Box.createVerticalBox();
View Full Code Here


     * The Action Listener method, that reacts to the palette widgets
     * actions.
     */
    public void actionPerformed(ActionEvent e) {
        String cmd = e.getActionCommand();
        JCheckBox check = (JCheckBox) e.getSource();

        if (cmd == showCGCommand)
            showCG = check.isSelected();
        else if (cmd == showTLMCommand)
            showTLM = check.isSelected();
        else if (cmd == showJOGCommand)
            showJOG = check.isSelected();
        else if (cmd == showTPCCommand)
            showTPC = check.isSelected();
        else if (cmd == showONCCommand)
            showONC = check.isSelected();
        else if (cmd == showJNCCommand)
            showJNC = check.isSelected();
        else if (cmd == showGNCCommand)
            showGNC = check.isSelected();
        else if (cmd == showCIB10Command)
            showCIB10 = check.isSelected();
        else if (cmd == showCIB5Command)
            showCIB5 = check.isSelected();
        else if (cmd == showMISCCommand)
            showMISC = check.isSelected();
        else {
            System.err.println("Unknown action command \"" + cmd
                    + "\" in RpfCoverageLayer.actionPerformed().");
        }
        layer.repaint();
View Full Code Here

        stuff.setBorder(BorderFactory.createRaisedBevelBorder());
        // stuff.add(new JLabel(prettyName));
        stuff.add(drawingAttributes.getGUI());

        JPanel checks = new JPanel(new GridLayout(0, 1));
        JCheckBox enableButton = new JCheckBox(i18n.get(SpatialIndexHandler.class,
                "enableButton",
                "Show"));
        enableButton.setSelected(enabled);
        enableButton.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent ae) {
                JCheckBox jcb = (JCheckBox) ae.getSource();
                enabled = jcb.isSelected();
            }
        });
        checks.add(enableButton);

        JCheckBox bufferButton = new JCheckBox(i18n.get(SpatialIndexHandler.class,
                "bufferButton",
                "Buffer"));
        bufferButton.setSelected(buffered);
        bufferButton.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent ae) {
                JCheckBox jcb = (JCheckBox) ae.getSource();
                buffered = jcb.isSelected();
            }
        });
        checks.add(bufferButton);
        stuff.add(checks);
View Full Code Here

     *
     * @return Component object representing the palette widgets.
     */
    public Component getGUI() {
        JButton rereadFilesButton;
        JCheckBox showCSVLinkCheck;

        showCSVLinkCheck = new JCheckBox("Show Links", isShowLocations());
        showCSVLinkCheck.setActionCommand(showLocationsCommand);
        showCSVLinkCheck.addActionListener(this);

        rereadFilesButton = new JButton("Re-Read Data File");
        rereadFilesButton.setActionCommand(readDataCommand);
        rereadFilesButton.addActionListener(this);
        Box box = Box.createVerticalBox();
View Full Code Here

     *
     * @return Component object representing the palette widgets.
     */
    public Component getGUI() {
        if (box == null) {
            JCheckBox showCSVLocationCheck, showNameCheck, forceGlobalCheck;
            JButton rereadFilesButton;

            showCSVLocationCheck = new JCheckBox("Show Locations", isShowLocations());
            showCSVLocationCheck.setActionCommand(showLocationsCommand);
            showCSVLocationCheck.addActionListener(this);
            showCSVLocationCheck.setToolTipText("<HTML><BODY>Show location markers on the map.</BODY></HTML>");
            showNameCheck = new JCheckBox("Show Location Names", isShowNames());
            showNameCheck.setActionCommand(showNamesCommand);
            showNameCheck.addActionListener(this);
            showNameCheck.setToolTipText("<HTML><BODY>Show location names on the map.</BODY></HTML>");

            forceGlobalCheck = new JCheckBox("Override Location Settings", isForceGlobal());
            forceGlobalCheck.setActionCommand(forceGlobalCommand);
            forceGlobalCheck.addActionListener(this);
            forceGlobalCheck.setToolTipText("<HTML><BODY>Make these settings override those set<BR>on the individual map objects.</BODY></HTML>");

            rereadFilesButton = new JButton("Reload Data From Source");
View Full Code Here

     * actions.
     */
    public void actionPerformed(ActionEvent e) {
        String cmd = e.getActionCommand();
        if (cmd == showLocationsCommand) {
            JCheckBox locationCheck = (JCheckBox) e.getSource();
            setShowLocations(locationCheck.isSelected());
            if (Debug.debugging("location")) {
                Debug.output("CSVLocationHandler::actionPerformed showLocations is "
                        + isShowLocations());
            }
            getLayer().repaint();
        } else if (cmd == showNamesCommand) {
            JCheckBox namesCheck = (JCheckBox) e.getSource();
            setShowNames(namesCheck.isSelected());
            if (Debug.debugging("location")) {
                Debug.output("CSVLocationHandler::actionPerformed showNames is "
                        + isShowNames());
            }

            LocationLayer ll = getLayer();
            if (namesCheck.isSelected() && ll.getDeclutterMatrix() != null
                    && ll.getUseDeclutterMatrix()) {
                ll.doPrepare();
            } else {
                ll.repaint();
            }
        } else if (cmd == forceGlobalCommand) {
            JCheckBox forceGlobalCheck = (JCheckBox) e.getSource();
            setForceGlobal(forceGlobalCheck.isSelected());
            getLayer().repaint();
        } else if (cmd == readDataCommand) {
            Debug.output("Re-reading Locations file");
            quadtree = null;
            getLayer().doPrepare();
View Full Code Here

     *
     * @return Component object representing the palette widgets.
     */
    public java.awt.Component getGUI() {
        if (box == null) {
            JCheckBox showMapsCheck, showInfoCheck, lockSeriesCheck;

            box = Box.createVerticalBox();
            Box box1 = Box.createVerticalBox();
            JPanel topbox = new JPanel();
            JPanel subbox2 = new JPanel();

            showMapsCheck = new JCheckBox("Show Images", viewAttributes.showMaps);
            showMapsCheck.setActionCommand(showMapsCommand);
            showMapsCheck.addActionListener(this);

            showInfoCheck = new JCheckBox("Show Attributes", viewAttributes.showInfo);
            showInfoCheck.setActionCommand(showInfoCommand);
            showInfoCheck.addActionListener(this);

            String tmpCS = viewAttributes.chartSeries;
            if (tmpCS == null) {
                tmpCS = RpfViewAttributes.ANY;
            }

            boolean locked = !tmpCS.equalsIgnoreCase(RpfViewAttributes.ANY);
            String lockedTitle = locked ? (lockedButtonTitle + " - " + tmpCS)
                    : unlockedButtonTitle;

            lockSeriesCheck = new JCheckBox(lockedTitle, locked);
            lockSeriesCheck.setActionCommand(lockSeriesCommand);
            lockSeriesCheck.addActionListener(this);

            box1.add(showMapsCheck);
            box1.add(showInfoCheck);
            box1.add(lockSeriesCheck);

            if (coverage != null) {
                JCheckBox showCoverageCheck = new JCheckBox("Show Coverage", coverage.isInUse());
                showCoverageCheck.setActionCommand(showCoverageCommand);
                showCoverageCheck.addActionListener(this);
                box1.add(showCoverageCheck);
            }

            JButton setProperties = new JButton(i18n.get(RpfLayer.class,
                    "setProperties",
View Full Code Here

     */
    public void actionPerformed(ActionEvent e) {
        super.actionPerformed(e);
        String cmd = e.getActionCommand();
        if (cmd == showMapsCommand) {
            JCheckBox mapCheck = (JCheckBox) e.getSource();
            viewAttributes.showMaps = mapCheck.isSelected();
            repaint();
        } else if (cmd == showInfoCommand) {
            JCheckBox infoCheck = (JCheckBox) e.getSource();
            viewAttributes.showInfo = infoCheck.isSelected();
            repaint();
        } else if (cmd == lockSeriesCommand) {
            JCheckBox lockCheck = (JCheckBox) e.getSource();
            boolean locked = lockCheck.isSelected();
            if (locked) {
                Vector vector = getCoverageBoxes();
                String seriesName;

                if (vector == null || vector.size() == 0) {
                    seriesName = RpfViewAttributes.ANY;
                } else {
                    seriesName = ((RpfCoverageBox) vector.elementAt(0)).chartCode;
                }

                if (seriesName == null) {
                    seriesName = RpfViewAttributes.ANY;
                    fireRequestMessage("The "
                            + getName()
                            + " Layer is having trouble determining what kind\nof charts are being displayed.  Can't establish lock for charts\ncurrently being viewed.");
                }

                lockCheck.setText(lockedButtonTitle + " - " + seriesName);
                viewAttributes.chartSeries = seriesName;

            } else {
                lockCheck.setText(unlockedButtonTitle);
                viewAttributes.chartSeries = RpfViewAttributes.ANY;
            }

        } else if (cmd == showCoverageCommand) {
            if (coverage != null) {
                JCheckBox coverageCheck = (JCheckBox) e.getSource();
                coverage.setInUse(coverageCheck.isSelected());
                if (coverage.isInUse()) {
                    coverage.prepare(frameProvider,
                            getProjection(),
                            viewAttributes.chartSeries);
                }
View Full Code Here

            box.add(scrollPane);

            if (declutterMatrix != null) {
                JPanel dbp = new JPanel(new GridLayout(0, 1));

                JCheckBox declutterButton = new JCheckBox(i18n.get(LocationLayer.class,
                        "declutterNames",
                        "Declutter Names"), useDeclutterMatrix);
                declutterButton.addActionListener(new ActionListener() {
                    public void actionPerformed(ActionEvent ae) {
                        JCheckBox jcb = (JCheckBox) ae.getSource();
                        useDeclutterMatrix = jcb.isSelected();
                        if (isVisible()) {
                            doPrepare();
                        }
                    }
                });
View Full Code Here

                if (DEBUG)
                    Debug.output("GeoIntersectLayer(" + getName()
                            + "): Adding shapes from " + shpFileName);

                JCheckBox visibilityControl = new JCheckBox("Show", true);
                visibilityControl.addActionListener(new ActionListener() {
                    public void actionPerformed(ActionEvent ae) {
                        setShapeListVisibilityForCheckbox();
                        repaint();
                    }
                });
View Full Code Here

TOP

Related Classes of javax.swing.JCheckBox$AccessibleJCheckBox

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.