Package systole.view.tabs.controllers

Examples of systole.view.tabs.controllers.SelectionItem


    public void update(Observable o, Object arg) {
        if (arg == null) {
            this.amount = 0;
        } else {
            SelectionItem item = (SelectionItem) arg;
            this.amount += ((item.isSelected()) ? 1 : -1);
        }
        this.jLblSelected.setText(this.amount.toString());
    }
View Full Code Here


                thumb.addSeries("", slicedSegments.elementAt(i).toDoubleArray(), 1);
                flowItem = new ImageFlowItem(thumb.plotThumbnail(225, 225, false), "Segmento " + (i + 1));
                this.items.add(flowItem);
                thumb.setShowTitle(false);
                this.images.add(thumb.plotThumbnail(200, 150, false));
                this.selectionItems.add(new SelectionItem(i));
            }
            this.sliced = true;
        }
    }
View Full Code Here

            Iterator<SelectedSegment> segments = this.currentAnalysis.getSelectedSegments().iterator();
            while (segments.hasNext()) {
                SelectedSegment selectedSegment = segments.next();
                this.allCharts.addSeries("Seg-" + (selectedSegment.getNumber() + 1), selectedSegment.getSegment().toDoubleArray(), 1);
                SelectionItem selectItem = this.selectionItems.get(selectedSegment.getNumber());
                if (selectItem != null) {
                    selectItem.setSelected(true);
                }
            }

            double frequency = this.currentAnalysis.getSignalFrequency().getFrequency().doubleValue();
            this.finalSegment = new XYChart("Curva Final", "Tiempo (ms)", "Amplitud (%)");
View Full Code Here

                    thumb.addSeries("", sliced.elementAt(i).toDoubleArray(), 1);
                    flowItem = new ImageFlowItem(thumb.plotThumbnail(225, 225, false), "Segmento " + (i + 1));
                    this.items.add(flowItem);
                    thumb.setShowTitle(false);
                    this.images.add(thumb.plotThumbnail(200, 150, false));
                    this.selectionItems.add(new SelectionItem(i));
                }
            }
        } catch (Exception e) {
            SystoleLogger.getInstance().logError(e.getMessage());
            e.printStackTrace();
View Full Code Here

            this.removeAllPanels();
            SelectionModel model = (SelectionModel) o;
            if (!model.isSelectionEmpty()) {
                Iterator<SelectionItem> itemsIt = model.getCurrentSegments().iterator();
                while (itemsIt.hasNext()) {
                    SelectionItem selectItem = itemsIt.next();
                    if (selectItem.isSelected()) {
                        this.addSegment(selectItem.getIndexSegement());
                    }
                }
            }
        } else {
            SelectionItem selectItem = (SelectionItem) arg;
            if ((selectItem.isSelected())) {
                if (!this.items.containsKey(selectItem.getIndexSegement())) {
                    this.addSegment(selectItem.getIndexSegement());
                }
            } else {
                if (this.items.containsKey(selectItem.getIndexSegement())) {
                    this.removeSegment(this.items.get(selectItem.getIndexSegement()));
                }
            }
        }
    }
View Full Code Here

            this.clearSelection();
            SelectionModel model = (SelectionModel) o;
            if (!model.isSelectionEmpty()) {
                Iterator<SelectionItem> itemsIt = model.getCurrentSegments().iterator();
                while (itemsIt.hasNext()) {
                    SelectionItem selectItem = itemsIt.next();
                    if (selectItem.isSelected()) {
                        this.components.get(selectItem.getIndexSegement()).selectPlot();
                    }
                }
            }
        } else {
            SelectionItem selectItem = (SelectionItem) arg;
            if (this.components.get(selectItem.getIndexSegement()) != null) {
                if (selectItem.isSelected()) {
                    if (!this.components.get(selectItem.getIndexSegement()).isSelected()) {
                        this.components.get(selectItem.getIndexSegement()).selectPlot();
                    }
                } else {
                    if (this.components.get(selectItem.getIndexSegement()).isSelected()) {
                        this.components.get(selectItem.getIndexSegement()).unselectPlot();
                    }
                }
            }
        }
    }
View Full Code Here

TOP

Related Classes of systole.view.tabs.controllers.SelectionItem

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.