use of org.twak.siteplan.campskeleton.Siteplan in project chordatlas by twak.
the class SkelGen method selected.
private void selected(PlanSkeleton skel, Node house, SuperFace sf, SuperEdge se) {
JPanel ui = new JPanel();
ui.setLayout(new ListDownLayout());
JButton fac = new JButton("edit facade");
fac.addActionListener(e -> editFacade(skel, sf, se, false));
ui.add(fac);
// JButton tex = new JButton( "texture facade" );
// tex.addActionListener( e -> editFacade( skel, sf, se, true ) );
// ui.add( tex );
JButton proc = new JButton("procedural facade");
proc.addActionListener(e -> cgaFacade(skel, sf, se));
ui.add(proc);
JButton camp = new JButton("procedural extrusions");
camp.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
closeSitePlan();
siteplan = new Siteplan(skel.plan, false) {
SuperFace workon = sf;
public void show(Output output, Skeleton threadKey) {
super.show(output, threadKey);
Plot.closeLast();
tweed.enqueue(new Runnable() {
@Override
public void run() {
removeGeometryFor(workon);
// current selection is invalid
tweed.frame.setGenUI(null);
setSkel((PlanSkeleton) threadKey, output, workon);
}
});
}
};
siteplan.setVisible(true);
siteplan.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
}
});
ui.add(camp);
JButton mini = new JButton("street-view");
mini.addActionListener(e -> new MiniViewer(se));
if (sf != null)
ui.add(mini);
JButton prof = new JButton("profiles");
prof.addActionListener(e -> new ProfileAssignmentViewer(sf, skelFootprint == null ? null : skelFootprint.globalProfs));
ui.add(prof);
ui.add(new JLabel("height " + sf.heights.size()));
JButton plan = new JButton("plan");
plan.addActionListener(e -> new Plot(toRender, footprint));
ui.add(plan);
JButton remove = new JButton("remove");
remove.addActionListener(e -> {
visible = false;
calculateOnJmeThread();
tweed.frame.removeGen(SkelGen.this);
});
ui.add(plan);
JButton b = new JButton("view clean profiles");
b.addActionListener(e -> SkelFootprint.debugFindCleanProfiles(footprint, this, new ProgressMonitor(null, "", "", 0, 100), tweed));
ui.add(b);
JButton c = new JButton("compare profiles");
c.addActionListener(e -> skelFootprint.debugCompareProfs(skelFootprint.globalProfs));
ui.add(c);
tweed.frame.setGenUI(ui);
}
Aggregations