Search in sources :

Example 1 with FacadeMode

use of org.twak.viewTrace.FacadeFinder.FacadeMode in project chordatlas by twak.

the class FacadeTool method getUI.

@Override
public void getUI(JPanel panel) {
    panel.setLayout(new ListDownLayout());
    JComboBox<GISGen.Mode> allOne = new JComboBox<>();
    allOne.addItem(GISGen.Mode.RENDER_ALL_BLOCKS);
    allOne.addItem(GISGen.Mode.RENDER_SELECTED_BLOCK);
    // allOne.addItem( GISGen.Mode.RENDER_SAT );
    allOne.setSelectedItem(GISGen.mode);
    allOne.addActionListener(new ActionListener() {

        @Override
        public void actionPerformed(ActionEvent e) {
            GISGen.mode = (Mode) allOne.getSelectedItem();
        }
    });
    JComboBox<FacadeFinder.FacadeMode> granularity = new JComboBox<>();
    granularity.addItem(FacadeMode.PER_GIS);
    granularity.addItem(FacadeMode.PER_MEGA);
    granularity.addItem(FacadeMode.PER_CAMERA);
    granularity.addItem(FacadeMode.PER_CAMERA_CROPPED);
    granularity.setSelectedItem(FacadeFinder.facadeMode);
    granularity.addActionListener(new ActionListener() {

        @Override
        public void actionPerformed(ActionEvent e) {
            FacadeFinder.facadeMode = (FacadeMode) granularity.getSelectedItem();
        }
    });
    // JButton render = new JButton( "render" );
    // render.addActionListener( new ActionListener() {
    // @Override
    // public void actionPerformed( ActionEvent e ) {
    // renderFacades(null);
    // }
    // } );
    // panel.add( render );
    panel.add(allOne);
    panel.add(granularity);
    panel.add(new JLabel("click on any block to start"));
}
Also used : ListDownLayout(org.twak.utils.ui.ListDownLayout) FacadeMode(org.twak.viewTrace.FacadeFinder.FacadeMode) JComboBox(javax.swing.JComboBox) ActionListener(java.awt.event.ActionListener) ActionEvent(java.awt.event.ActionEvent) FacadeMode(org.twak.viewTrace.FacadeFinder.FacadeMode) Mode(org.twak.tweed.gen.GISGen.Mode) JLabel(javax.swing.JLabel)

Aggregations

ActionEvent (java.awt.event.ActionEvent)1 ActionListener (java.awt.event.ActionListener)1 JComboBox (javax.swing.JComboBox)1 JLabel (javax.swing.JLabel)1 Mode (org.twak.tweed.gen.GISGen.Mode)1 ListDownLayout (org.twak.utils.ui.ListDownLayout)1 FacadeMode (org.twak.viewTrace.FacadeFinder.FacadeMode)1