Package org.openstreetmap.josm.gui

Examples of org.openstreetmap.josm.gui.OsmPrimitivRenderer


            col = new TableColumn(0);
            col.setHeaderValue(tr("To delete"));
            col.setResizable(true);
            col.setWidth(100);
            col.setPreferredWidth(100);
            col.setCellRenderer(new OsmPrimitivRenderer());
            addColumn(col);

            // column 0 - From Relation
            col = new TableColumn(1);
            col.setHeaderValue(tr("From Relation"));
            col.setResizable(true);
            col.setWidth(100);
            col.setPreferredWidth(100);
            col.setCellRenderer(new OsmPrimitivRenderer());
            addColumn(col);

            // column 1 - Pos.
            col = new TableColumn(2);
            col.setHeaderValue(tr("Pos."));
View Full Code Here


    }

    static class OsmPrimitiveList extends JList<OsmPrimitive> {
        protected void init() {
            setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
            setCellRenderer(new OsmPrimitivRenderer());
        }
View Full Code Here

     * build the GUI
     */
    protected void build() {
        setLayout(new BorderLayout());
        referrers = new JList<>(model);
        referrers.setCellRenderer(new OsmPrimitivRenderer());
        add(new JScrollPane(referrers), BorderLayout.CENTER);
        referrers.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
        referrers.addMouseListener(new DblClickMouseAdapter());

        JPanel pnl = new JPanel();
View Full Code Here

        // column 2 - Name
        col = new TableColumn(2);
        col.setHeaderValue(tr("Name"));
        col.setResizable(true);
        col.setPreferredWidth(200);
        col.setCellRenderer(new OsmPrimitivRenderer());
        addColumn(col);
    }
View Full Code Here

        //
        DefaultListSelectionModel selectionModel = new DefaultListSelectionModel();
        model = new RelationListModel(selectionModel);
        displaylist = new JList<>(model);
        displaylist.setSelectionModel(selectionModel);
        displaylist.setCellRenderer(new OsmPrimitivRenderer() {
            /**
             * Don't show the default tooltip in the relation list.
             */
            @Override
            protected String getComponentToolTipText(OsmPrimitive value) {
View Full Code Here

     */
    protected void buildContentPanel() {
        lstPrimitives = new JList<>(model);
        lstPrimitives.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
        lstPrimitives.setSelectionModel(selectionModel);
        lstPrimitives.setCellRenderer(new OsmPrimitivRenderer());
        lstPrimitives.setTransferHandler(null); // Fix #6290. Drag & Drop is not supported anyway and Copy/Paste is better propagated to main window

        // the select action
        final SideButton selectButton = new SideButton(actSelect);
        lstPrimitives.getSelectionModel().addListSelectionListener(actSelect);
View Full Code Here

     * The column model
     */
    static class HistoryTableColumnModel extends DefaultTableColumnModel {
        protected void createColumns() {
            TableColumn col = null;
            OsmPrimitivRenderer renderer = new OsmPrimitivRenderer();
            // column 0 - History item
            col = new TableColumn(0);
            col.setHeaderValue(tr("Object with history"));
            col.setCellRenderer(renderer);
            addColumn(col);
View Full Code Here

                    return (Long.valueOf(o1.getUniqueId())).compareTo(o2.getUniqueId());
                }
            });
            JList<OsmPrimitive> list = new JList<>(toPurgeAdditionally.toArray(new OsmPrimitive[toPurgeAdditionally.size()]));
            /* force selection to be active for all entries */
            list.setCellRenderer(new OsmPrimitivRenderer() {
                @Override
                public Component getListCellRendererComponent(JList<? extends OsmPrimitive> list,
                        OsmPrimitive value,
                        int index,
                        boolean isSelected,
View Full Code Here

    protected void build() {
        model = new ConflictListModel();

        lstConflicts = new JList<>(model);
        lstConflicts.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
        lstConflicts.setCellRenderer(new OsmPrimitivRenderer());
        lstConflicts.addMouseListener(new MouseEventHandler());
        addListSelectionListener(new ListSelectionListener(){
            @Override
            public void valueChanged(ListSelectionEvent e) {
                Main.map.mapView.repaint();
View Full Code Here

            Relation r1 = dep.get(i);
            Relation r2 = dep.get(i+1);
            model.addRow(new Relation[] {r1,r2});
        }
        JTable tbl = new JTable(model);
        OsmPrimitivRenderer renderer = new OsmPrimitivRenderer();
        tbl.getColumnModel().getColumn(0).setCellRenderer(renderer);
        tbl.getColumnModel().getColumn(1).setCellRenderer(renderer);
        pnl.add(new JScrollPane(tbl), BorderLayout.CENTER);
        return pnl;
    }
View Full Code Here

TOP

Related Classes of org.openstreetmap.josm.gui.OsmPrimitivRenderer

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.