Package org.openstreetmap.josm.gui.widgets

Examples of org.openstreetmap.josm.gui.widgets.JMultilineLabel


            gc.anchor = GridBagConstraints.NORTHWEST;
            gc.fill = GridBagConstraints.BOTH;
            gc.weightx = 1.0;
            gc.weighty = 1.0;
            gc.insets = new Insets(5,5,5,5);
            add(lblMessage = new JMultilineLabel(""), gc);
            lblMessage.setFont(lblMessage.getFont().deriveFont(Font.PLAIN));

            gc.gridy = 1;
            gc.fill = GridBagConstraints.HORIZONTAL;
            gc.weighty = 0.0;
View Full Code Here


            rbRestrictToMyself.addItemListener(userRestrictionChangeHandler);

            gc.gridx = 1;
            gc.fill =  GridBagConstraints.HORIZONTAL;
            gc.weightx = 1.0;
            add(lblRestrictedToMyself = new JMultilineLabel(tr("Only changesets owned by myself")), gc);

            gc.gridx = 0;
            gc.gridy = 1;
            gc.fill= GridBagConstraints.HORIZONTAL;
            gc.weightx = 0.0;
            add(rbRestrictToUid = new JRadioButton(), gc);
            rbRestrictToUid.addItemListener(userRestrictionChangeHandler);

            gc.gridx = 1;
            gc.fill =  GridBagConstraints.HORIZONTAL;
            gc.weightx = 1.0;
            add(new JMultilineLabel(tr("Only changesets owned by the user with the following user ID")),gc);

            gc.gridx = 1;
            gc.gridy = 2;
            gc.fill =  GridBagConstraints.HORIZONTAL;
            gc.weightx = 1.0;
            add(buildUidInputPanel(),gc);

            gc.gridx = 0;
            gc.gridy = 3;
            gc.fill= GridBagConstraints.HORIZONTAL;
            gc.weightx = 0.0;
            add(rbRestrictToUserName = new JRadioButton(), gc);
            rbRestrictToUserName.addItemListener(userRestrictionChangeHandler);

            gc.gridx = 1;
            gc.fill =  GridBagConstraints.HORIZONTAL;
            gc.weightx = 1.0;
            add(new JMultilineLabel(tr("Only changesets owned by the user with the following user name")),gc);

            gc.gridx = 1;
            gc.gridy = 4;
            gc.fill =  GridBagConstraints.HORIZONTAL;
            gc.weightx = 1.0;
View Full Code Here

            add(rbClosedAfter = new JRadioButton(), gc);

            gc.gridx = 1;
            gc.fill =  GridBagConstraints.HORIZONTAL;
            gc.weightx = 1.0;
            add(new JMultilineLabel(tr("Only changesets closed after the following date/time")), gc);

            gc.gridx = 1;
            gc.gridy = 1;
            gc.fill =  GridBagConstraints.HORIZONTAL;
            gc.weightx = 1.0;
            add(buildClosedAfterInputPanel(),gc);

            // -- changesets closed after a specific date/time and created before a specific date time
            //
            gc = new GridBagConstraints();
            gc.anchor = GridBagConstraints.NORTHWEST;
            gc.gridy = 2;
            gc.gridx = 0;
            gc.fill= GridBagConstraints.HORIZONTAL;
            gc.weightx = 0.0;
            add(rbClosedAfterAndCreatedBefore = new JRadioButton(), gc);

            gc.gridx = 1;
            gc.fill =  GridBagConstraints.HORIZONTAL;
            gc.weightx = 1.0;
            add(new JMultilineLabel(tr("Only changesets closed after and created before a specific date/time")), gc);

            gc.gridx = 1;
            gc.gridy = 3;
            gc.fill =  GridBagConstraints.HORIZONTAL;
            gc.weightx = 1.0;
View Full Code Here

        pnl.add(cbUserRestriction = new JCheckBox(), gc);
        cbUserRestriction.addItemListener(stateChangeHandler);

        gc.gridx = 1;
        gc.weightx = 1.0;
        pnl.add(new JMultilineLabel(tr("Select changesets owned by specific users")),gc);

        gc.gridy = 1;
        gc.gridx = 1;
        gc.weightx = 1.0;
        pnl.add(pnlUserRestriction = new UserRestrictionPanel(), gc);

        // -- restricting the query to open and closed changesets
        //
        gc.gridy = 2;
        gc.gridx = 0;
        gc.anchor = GridBagConstraints.NORTHWEST;
        gc.weightx = 0.0;
        gc.fill = GridBagConstraints.HORIZONTAL;
        pnl.add(cbOpenAndCloseRestrictions = new JCheckBox(), gc);
        cbOpenAndCloseRestrictions.addItemListener(stateChangeHandler);

        gc.gridx = 1;
        gc.weightx = 1.0;
        pnl.add(new JMultilineLabel(tr("Select changesets depending on whether they are open or closed")),gc);

        gc.gridy = 3;
        gc.gridx = 1;
        gc.weightx = 1.0;
        pnl.add(pnlOpenAndCloseRestriction = new OpenAndCloseStateRestrictionPanel(), gc);

        // -- restricting the query to a specific time
        //
        gc.gridy = 4;
        gc.gridx = 0;
        gc.anchor = GridBagConstraints.NORTHWEST;
        gc.weightx = 0.0;
        gc.fill = GridBagConstraints.HORIZONTAL;
        pnl.add(cbTimeRestrictions = new JCheckBox(), gc);
        cbTimeRestrictions.addItemListener(stateChangeHandler);

        gc.gridx = 1;
        gc.weightx = 1.0;
        pnl.add(new JMultilineLabel(tr("Select changesets based on the date/time they have been created or closed")),gc);

        gc.gridy = 5;
        gc.gridx = 1;
        gc.weightx = 1.0;
        pnl.add(pnlTimeRestriction = new TimeRestrictionPanel(), gc);


        // -- restricting the query to a specific bounding box
        //
        gc.gridy = 6;
        gc.gridx = 0;
        gc.anchor = GridBagConstraints.NORTHWEST;
        gc.weightx = 0.0;
        gc.fill = GridBagConstraints.HORIZONTAL;
        pnl.add(cbBoundingBoxRestriction = new JCheckBox(), gc);
        cbBoundingBoxRestriction.addItemListener(stateChangeHandler);

        gc.gridx = 1;
        gc.weightx = 1.0;
        pnl.add(new JMultilineLabel(tr("Select only changesets related to a specific bounding box")),gc);

        gc.gridy = 7;
        gc.gridx = 1;
        gc.weightx = 1.0;
        pnl.add(pnlBoundingBoxRestriction = new BBoxRestrictionPanel(), gc);
View Full Code Here

            gc.weightx = 0.0;
            add(rbOpenOnly = new JRadioButton(), gc);

            gc.gridx = 1;
            gc.weightx = 1.0;
            add(new JMultilineLabel(tr("Query open changesets only")), gc);

            gc.gridy = 1;
            gc.gridx = 0;
            gc.weightx = 0.0;
            add(rbClosedOnly = new JRadioButton(), gc);

            gc.gridx = 1;
            gc.weightx = 1.0;
            add(new JMultilineLabel(tr("Query closed changesets only")), gc);

            gc.gridy = 2;
            gc.gridx = 0;
            gc.weightx = 0.0;
            add(rbBoth = new JRadioButton(), gc);

            gc.gridx = 1;
            gc.weightx = 1.0;
            add(new JMultilineLabel(tr("Query both open and closed changesets")), gc);

            ButtonGroup bgRestrictions = new ButtonGroup();
            bgRestrictions.add(rbBoth);
            bgRestrictions.add(rbClosedOnly);
            bgRestrictions.add(rbOpenOnly);
View Full Code Here

        for (BasicQuery q: BasicQuery.values()) {
            JRadioButton rb = new JRadioButton();
            rb.addItemListener(selectedQueryHandler);
            rbQueries.put(q, rb);
            bgQueries.add(rb);
            lblQueries.put(q, new JMultilineLabel(""));
        }

        GridBagConstraints gc = new GridBagConstraints();
        // -- most recent changes
        gc.fill = GridBagConstraints.NONE;
View Full Code Here

    public BasicChangesetQueryPanel() {
        build();
    }

    public void init() {
        JMultilineLabel lbl = lblQueries.get(BasicQuery.MOST_RECENT_CHANGESETS);
        lbl.setText(tr("<html>Download the latest changesets</html>"));

        // query for open changesets only possible if we have a current user which is at least
        // partially identified
        lbl = lblQueries.get(BasicQuery.MY_OPEN_CHANGESETS);
        if (JosmUserIdentityManager.getInstance().isAnonymous()) {
            rbQueries.get(BasicQuery.MY_OPEN_CHANGESETS).setEnabled(false);
            lbl.setText(tr("<html>Download my open changesets<br><em>Disabled. Please enter your OSM user name in the preferences first.</em></html>"));
        } else {
            rbQueries.get(BasicQuery.MY_OPEN_CHANGESETS).setEnabled(true);
            lbl.setText(tr("<html>Download my open changesets</html>"));
        }

        // query for changesets in the current map view only if there *is* a current
        // map view
        lbl = lblQueries.get(BasicQuery.CHANGESETS_IN_MAP_VIEW);
        if (!Main.isDisplayingMapView()) {
            rbQueries.get(BasicQuery.CHANGESETS_IN_MAP_VIEW).setEnabled(false);
            lbl.setText(tr("<html>Download changesets in the current map view.<br><em>Disabled. There is currently no map view active.</em></html>"));
        } else {
            rbQueries.get(BasicQuery.CHANGESETS_IN_MAP_VIEW).setEnabled(true);
            lbl.setText(tr("<html>Download changesets in the current map view</html>"));
        }

        restoreFromPreferences();
    }
View Full Code Here

TOP

Related Classes of org.openstreetmap.josm.gui.widgets.JMultilineLabel

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.