bugged
stringlengths
6
599k
fixed
stringlengths
6
40.8M
__index_level_0__
int64
0
3.24M
public BrowserInternalFrame(BrowserController theController) { setSize(600,600); setDefaultCloseOperation(JInternalFrame.DISPOSE_ON_CLOSE); if(theController != null) { this.controller = theController; String title = controller.getName(); setTitle("Image Browser: "+title); this.embeddedView = controller.getView(); embeddedView.setZoomToScale(true); this.env = BrowserEnvironment.getInstance(); } JPanel toolbarPanel = new JPanel(); toolbarPanel.setLayout(new FlowLayout(FlowLayout.LEFT)); IconManager manager = env.getIconManager(); JButton zoomButton = new JButton(manager.getSmallIcon(IconManager.ZOOM_BAR)); zoomButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { controller.getOverlayModel().showPalette(UIConstants.ZOOM_PALETTE_NAME); } }); zoomButton.setToolTipText("Show Zoom Menu"); JButton optionsButton = new JButton(manager.getSmallIcon(IconManager.OPTIONS_BAR)); optionsButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { controller.getOverlayModel().showPalette(UIConstants.OPTIONS_PALETTE_NAME); } }); optionsButton.setToolTipText("Show Options Menu"); toolbarPanel.add(zoomButton); toolbarPanel.add(optionsButton); final JSlider slider = new JSlider(new DefaultBoundedRangeModel(100,10,10,200)); slider.setPaintLabels(true); slider.addChangeListener(new ChangeListener() { public void stateChanged(ChangeEvent arg0) { int value = slider.getValue(); if(slider.getValueIsAdjusting()) { embeddedView.setZoomToScale(false); } embeddedView.setZoomLevel(((double)value)/100.0); } }); embeddedView.addZoomParamListener(new ZoomParamListener() { public void minZoomLevelChanged(double level) { System.err.println("minzoom change: "+level); int val = (int)Math.round(level*100); if(slider.getValue() < val) { slider.setValue(val); } slider.setMinimum(val); } public void maxZoomLevelChanged(double level) { int val = (int)Math.round(level*100); if(slider.getValue() > val) { slider.setValue(val); } slider.setMaximum(val); } public void zoomLevelChanged(double level) { System.err.println("zoom changed: "+level); if(!slider.getValueIsAdjusting()) { int val = (int)Math.round(level*100); slider.setValue(val); } } }); toolbarPanel.add(slider); Container container = getContentPane(); container.setLayout(new BorderLayout()); final JScrollBar horizontalBar = new JScrollBar(JScrollBar.HORIZONTAL); final JScrollBar verticalBar = new JScrollBar(JScrollBar.VERTICAL); embeddedView.getViewCamera().addCameraListener(new CameraListener() { /* (non-Javadoc) * @see org.openmicroscopy.shoola.agents.browser.ui.CameraListener#cameraBoundsChanged(double, double, double, double, double, double) */ public void cameraBoundsChanged(double valueX, double valueY, double extentX, double extentY, double width, double height) { int iX = (int)Math.round(valueX); int iY = (int)Math.round(valueY); int iEX = (int)Math.round(extentX); int iEY = (int)Math.round(extentY); int iW = (int)Math.round(width); int iH = (int)Math.round(height); System.err.println("bounds: ["+iX+","+iY+","+iEX+"," +iEY+","+iW+","+iH+"]"); BoundedRangeModel horizModel = horizontalBar.getModel(); BoundedRangeModel vertModel = verticalBar.getModel(); if(iEX+iX > iW) horizontalBar.setEnabled(false); else { horizontalBar.setEnabled(true); if(iW != horizModel.getMaximum() || iEX != horizModel.getExtent()) { BoundedRangeModel hModel = new DefaultBoundedRangeModel(iX,iEX,0,iW); horizontalBar.setModel(hModel); } else { horizModel.setValue(iX); } } if(iEY+iY > iH) verticalBar.setEnabled(false); else { verticalBar.setEnabled(true); if(iH != vertModel.getMaximum() || iEY != vertModel.getExtent()) { BoundedRangeModel vModel = new DefaultBoundedRangeModel(iY,iEY,0,iH); verticalBar.setModel(vModel); } else { horizModel.setValue(iY); } } } }); horizontalBar.setEnabled(false); horizontalBar.setModel(new DefaultBoundedRangeModel(0,0,0,0)); horizontalBar.addAdjustmentListener(new AdjustmentListener() { public void adjustmentValueChanged(AdjustmentEvent e) { int value = e.getValue(); embeddedView.getViewCamera().setX(value); } }); verticalBar.setEnabled(false); verticalBar.setModel(new DefaultBoundedRangeModel(0,0,0,0)); verticalBar.addAdjustmentListener(new AdjustmentListener() { public void adjustmentValueChanged(AdjustmentEvent e) { int value = e.getValue(); embeddedView.getViewCamera().setY(value); } }); JPanel fakeScrollPane = new JPanel(); JPanel verticalPanel = new JPanel(); verticalPanel.setLayout(new BorderLayout()); verticalPanel.add(embeddedView,BorderLayout.CENTER); verticalPanel.add(verticalBar,BorderLayout.EAST); JPanel horizontalPanel = new JPanel(); horizontalPanel.setLayout(new BorderLayout()); horizontalPanel.add(horizontalBar,BorderLayout.CENTER); horizontalPanel.add(Box.createHorizontalStrut(verticalBar.getPreferredSize().width), BorderLayout.EAST); verticalPanel.add(horizontalPanel,BorderLayout.SOUTH); fakeScrollPane.setLayout(new BorderLayout()); fakeScrollPane.add(verticalPanel,BorderLayout.CENTER); container.add(fakeScrollPane,BorderLayout.CENTER); container.add(toolbarPanel,BorderLayout.NORTH); if(controller.getStatusView() != null) { container.add(controller.getStatusView(),BorderLayout.SOUTH); } this.addFocusListener(new CommonFocusAdapter(this)); final UIWrapper refCopy = this; this.addInternalFrameListener(new InternalFrameAdapter() { /* (non-Javadoc) * @see javax.swing.event.InternalFrameAdapter#internalFrameClosing(javax.swing.event.InternalFrameEvent) */ public void internalFrameClosing(InternalFrameEvent arg0) { env.getBrowserManager().removeBrowser(refCopy); } }); }
public BrowserInternalFrame(BrowserController theController) { setSize(600,600); setDefaultCloseOperation(JInternalFrame.DISPOSE_ON_CLOSE); if(theController != null) { this.controller = theController; String title = controller.getName(); setTitle("Image Browser: "+title); this.embeddedView = controller.getView(); embeddedView.setZoomToScale(true); this.env = BrowserEnvironment.getInstance(); } JPanel toolbarPanel = new JPanel(); toolbarPanel.setLayout(new FlowLayout(FlowLayout.LEFT)); IconManager manager = env.getIconManager(); JButton zoomButton = new JButton(manager.getSmallIcon(IconManager.ZOOM_BAR)); zoomButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { controller.getOverlayModel().showPalette(UIConstants.ZOOM_PALETTE_NAME); } }); zoomButton.setToolTipText("Show Zoom Menu"); JButton optionsButton = new JButton(manager.getSmallIcon(IconManager.OPTIONS_BAR)); optionsButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { controller.getOverlayModel().showPalette(UIConstants.OPTIONS_PALETTE_NAME); } }); optionsButton.setToolTipText("Show Options Menu"); toolbarPanel.add(zoomButton); toolbarPanel.add(optionsButton); final JSlider slider = new JSlider(new DefaultBoundedRangeModel(100,10,10,200)); slider.setPaintLabels(true); slider.addChangeListener(new ChangeListener() { public void stateChanged(ChangeEvent arg0) { int value = slider.getValue(); if(slider.getValueIsAdjusting()) { embeddedView.setZoomToScale(false); } embeddedView.setZoomLevel(((double)value)/100.0); } }); embeddedView.addZoomParamListener(new ZoomParamListener() { public void minZoomLevelChanged(double level) { System.err.println("minzoom change: "+level); int val = (int)Math.round(level*100); if(slider.getValue() < val) { slider.setValue(val); } slider.setMinimum(val); } public void maxZoomLevelChanged(double level) { int val = (int)Math.round(level*100); if(slider.getValue() > val) { slider.setValue(val); } slider.setMaximum(val); } public void zoomLevelChanged(double level) { System.err.println("zoom changed: "+level); if(!slider.getValueIsAdjusting()) { int val = (int)Math.round(level*100); slider.setValue(val); } } }); toolbarPanel.add(slider); Container container = getContentPane(); container.setLayout(new BorderLayout()); final JScrollBar horizontalBar = new JScrollBar(JScrollBar.HORIZONTAL); final JScrollBar verticalBar = new JScrollBar(JScrollBar.VERTICAL); embeddedView.getViewCamera().addCameraListener(new CameraListener() { /* (non-Javadoc) * @see org.openmicroscopy.shoola.agents.browser.ui.CameraListener#cameraBoundsChanged(double, double, double, double, double, double) */ public void cameraBoundsChanged(double valueX, double valueY, double extentX, double extentY, double width, double height) { int iX = (int)Math.round(valueX); int iY = (int)Math.round(valueY); int iEX = (int)Math.round(extentX); int iEY = (int)Math.round(extentY); int iW = (int)Math.round(width); int iH = (int)Math.round(height); System.err.println("bounds: ["+iX+","+iY+","+iEX+"," +iEY+","+iW+","+iH+"]"); BoundedRangeModel horizModel = horizontalBar.getModel(); BoundedRangeModel vertModel = verticalBar.getModel(); if(iEX+iX > iW) horizontalBar.setEnabled(false); else { horizontalBar.setEnabled(true); if(iW != horizModel.getMaximum() || iEX != horizModel.getExtent()) { BoundedRangeModel hModel = new DefaultBoundedRangeModel(iX,iEX,0,iW); horizontalBar.setModel(hModel); } else { horizModel.setValue(iX); } } if(iEY+iY > iH) verticalBar.setEnabled(false); else { verticalBar.setEnabled(true); if(iH != vertModel.getMaximum() || iEY != vertModel.getExtent()) { BoundedRangeModel vModel = new DefaultBoundedRangeModel(iY,iEY,0,iH); verticalBar.setModel(vModel); } else { horizModel.setValue(iY); } } } }); horizontalBar.setEnabled(false); horizontalBar.setModel(new DefaultBoundedRangeModel(0,0,0,0)); horizontalBar.addAdjustmentListener(new AdjustmentListener() { public void adjustmentValueChanged(AdjustmentEvent e) { int value = e.getValue(); embeddedView.getViewCamera().setX(value); } }); verticalBar.setEnabled(false); verticalBar.setModel(new DefaultBoundedRangeModel(0,0,0,0)); verticalBar.addAdjustmentListener(new AdjustmentListener() { public void adjustmentValueChanged(AdjustmentEvent e) { int value = e.getValue(); embeddedView.getViewCamera().setY(value); } }); JPanel fakeScrollPane = new JPanel(); JPanel verticalPanel = new JPanel(); verticalPanel.setLayout(new BorderLayout()); verticalPanel.add(embeddedView,BorderLayout.CENTER); verticalPanel.add(verticalBar,BorderLayout.EAST); JPanel horizontalPanel = new JPanel(); horizontalPanel.setLayout(new BorderLayout()); horizontalPanel.add(horizontalBar,BorderLayout.CENTER); horizontalPanel.add(Box.createHorizontalStrut(verticalBar.getPreferredSize().width), BorderLayout.EAST); verticalPanel.add(horizontalPanel,BorderLayout.SOUTH); fakeScrollPane.setLayout(new BorderLayout()); fakeScrollPane.add(verticalPanel,BorderLayout.CENTER); container.add(fakeScrollPane,BorderLayout.CENTER); container.add(toolbarPanel,BorderLayout.NORTH); if(controller.getStatusView() != null) { container.add(controller.getStatusView(),BorderLayout.SOUTH); } this.addFocusListener(new CommonFocusAdapter(this)); final UIWrapper refCopy = this; this.addInternalFrameListener(new InternalFrameAdapter() { /* (non-Javadoc) * @see javax.swing.event.InternalFrameAdapter#internalFrameClosing(javax.swing.event.InternalFrameEvent) */ public void internalFrameClosing(InternalFrameEvent arg0) { env.getBrowserManager().removeBrowser(refCopy); } }); }
3,227,780
public BrowserInternalFrame(BrowserController theController) { setSize(600,600); setDefaultCloseOperation(JInternalFrame.DISPOSE_ON_CLOSE); if(theController != null) { this.controller = theController; String title = controller.getName(); setTitle("Image Browser: "+title); this.embeddedView = controller.getView(); embeddedView.setZoomToScale(true); this.env = BrowserEnvironment.getInstance(); } JPanel toolbarPanel = new JPanel(); toolbarPanel.setLayout(new FlowLayout(FlowLayout.LEFT)); IconManager manager = env.getIconManager(); JButton zoomButton = new JButton(manager.getSmallIcon(IconManager.ZOOM_BAR)); zoomButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { controller.getOverlayModel().showPalette(UIConstants.ZOOM_PALETTE_NAME); } }); zoomButton.setToolTipText("Show Zoom Menu"); JButton optionsButton = new JButton(manager.getSmallIcon(IconManager.OPTIONS_BAR)); optionsButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { controller.getOverlayModel().showPalette(UIConstants.OPTIONS_PALETTE_NAME); } }); optionsButton.setToolTipText("Show Options Menu"); toolbarPanel.add(zoomButton); toolbarPanel.add(optionsButton); final JSlider slider = new JSlider(new DefaultBoundedRangeModel(100,10,10,200)); slider.setPaintLabels(true); slider.addChangeListener(new ChangeListener() { public void stateChanged(ChangeEvent arg0) { int value = slider.getValue(); if(slider.getValueIsAdjusting()) { embeddedView.setZoomToScale(false); } embeddedView.setZoomLevel(((double)value)/100.0); } }); embeddedView.addZoomParamListener(new ZoomParamListener() { public void minZoomLevelChanged(double level) { System.err.println("minzoom change: "+level); int val = (int)Math.round(level*100); if(slider.getValue() < val) { slider.setValue(val); } slider.setMinimum(val); } public void maxZoomLevelChanged(double level) { int val = (int)Math.round(level*100); if(slider.getValue() > val) { slider.setValue(val); } slider.setMaximum(val); } public void zoomLevelChanged(double level) { System.err.println("zoom changed: "+level); if(!slider.getValueIsAdjusting()) { int val = (int)Math.round(level*100); slider.setValue(val); } } }); toolbarPanel.add(slider); Container container = getContentPane(); container.setLayout(new BorderLayout()); final JScrollBar horizontalBar = new JScrollBar(JScrollBar.HORIZONTAL); final JScrollBar verticalBar = new JScrollBar(JScrollBar.VERTICAL); embeddedView.getViewCamera().addCameraListener(new CameraListener() { /* (non-Javadoc) * @see org.openmicroscopy.shoola.agents.browser.ui.CameraListener#cameraBoundsChanged(double, double, double, double, double, double) */ public void cameraBoundsChanged(double valueX, double valueY, double extentX, double extentY, double width, double height) { int iX = (int)Math.round(valueX); int iY = (int)Math.round(valueY); int iEX = (int)Math.round(extentX); int iEY = (int)Math.round(extentY); int iW = (int)Math.round(width); int iH = (int)Math.round(height); System.err.println("bounds: ["+iX+","+iY+","+iEX+"," +iEY+","+iW+","+iH+"]"); BoundedRangeModel horizModel = horizontalBar.getModel(); BoundedRangeModel vertModel = verticalBar.getModel(); if(iEX+iX > iW) horizontalBar.setEnabled(false); else { horizontalBar.setEnabled(true); if(iW != horizModel.getMaximum() || iEX != horizModel.getExtent()) { BoundedRangeModel hModel = new DefaultBoundedRangeModel(iX,iEX,0,iW); horizontalBar.setModel(hModel); } else { horizModel.setValue(iX); } } if(iEY+iY > iH) verticalBar.setEnabled(false); else { verticalBar.setEnabled(true); if(iH != vertModel.getMaximum() || iEY != vertModel.getExtent()) { BoundedRangeModel vModel = new DefaultBoundedRangeModel(iY,iEY,0,iH); verticalBar.setModel(vModel); } else { horizModel.setValue(iY); } } } }); horizontalBar.setEnabled(false); horizontalBar.setModel(new DefaultBoundedRangeModel(0,0,0,0)); horizontalBar.addAdjustmentListener(new AdjustmentListener() { public void adjustmentValueChanged(AdjustmentEvent e) { int value = e.getValue(); embeddedView.getViewCamera().setX(value); } }); verticalBar.setEnabled(false); verticalBar.setModel(new DefaultBoundedRangeModel(0,0,0,0)); verticalBar.addAdjustmentListener(new AdjustmentListener() { public void adjustmentValueChanged(AdjustmentEvent e) { int value = e.getValue(); embeddedView.getViewCamera().setY(value); } }); JPanel fakeScrollPane = new JPanel(); JPanel verticalPanel = new JPanel(); verticalPanel.setLayout(new BorderLayout()); verticalPanel.add(embeddedView,BorderLayout.CENTER); verticalPanel.add(verticalBar,BorderLayout.EAST); JPanel horizontalPanel = new JPanel(); horizontalPanel.setLayout(new BorderLayout()); horizontalPanel.add(horizontalBar,BorderLayout.CENTER); horizontalPanel.add(Box.createHorizontalStrut(verticalBar.getPreferredSize().width), BorderLayout.EAST); verticalPanel.add(horizontalPanel,BorderLayout.SOUTH); fakeScrollPane.setLayout(new BorderLayout()); fakeScrollPane.add(verticalPanel,BorderLayout.CENTER); container.add(fakeScrollPane,BorderLayout.CENTER); container.add(toolbarPanel,BorderLayout.NORTH); if(controller.getStatusView() != null) { container.add(controller.getStatusView(),BorderLayout.SOUTH); } this.addFocusListener(new CommonFocusAdapter(this)); final UIWrapper refCopy = this; this.addInternalFrameListener(new InternalFrameAdapter() { /* (non-Javadoc) * @see javax.swing.event.InternalFrameAdapter#internalFrameClosing(javax.swing.event.InternalFrameEvent) */ public void internalFrameClosing(InternalFrameEvent arg0) { env.getBrowserManager().removeBrowser(refCopy); } }); }
public BrowserInternalFrame(BrowserController theController) { setSize(600,600); setDefaultCloseOperation(JInternalFrame.DISPOSE_ON_CLOSE); if(theController != null) { this.controller = theController; String title = controller.getName(); setTitle("Image Browser: "+title); this.embeddedView = controller.getView(); embeddedView.setZoomToScale(true); this.env = BrowserEnvironment.getInstance(); } JPanel toolbarPanel = new JPanel(); toolbarPanel.setLayout(new FlowLayout(FlowLayout.LEFT)); IconManager manager = env.getIconManager(); JButton zoomButton = new JButton(manager.getSmallIcon(IconManager.ZOOM_BAR)); zoomButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { controller.getOverlayModel().showPalette(UIConstants.ZOOM_PALETTE_NAME); } }); zoomButton.setToolTipText("Show Zoom Menu"); JButton optionsButton = new JButton(manager.getSmallIcon(IconManager.OPTIONS_BAR)); optionsButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { controller.getOverlayModel().showPalette(UIConstants.OPTIONS_PALETTE_NAME); } }); optionsButton.setToolTipText("Show Options Menu"); toolbarPanel.add(zoomButton); toolbarPanel.add(optionsButton); final JSlider slider = new JSlider(new DefaultBoundedRangeModel(100,10,10,200)); slider.setPaintLabels(true); slider.addChangeListener(new ChangeListener() { public void stateChanged(ChangeEvent arg0) { int value = slider.getValue(); if(slider.getValueIsAdjusting()) { embeddedView.setZoomToScale(false); } embeddedView.setZoomLevel(((double)value)/100.0); } }); embeddedView.addZoomParamListener(new ZoomParamListener() { public void minZoomLevelChanged(double level) { System.err.println("minzoom change: "+level); int val = (int)Math.round(level*100); if(slider.getValue() < val) { slider.setValue(val); } slider.setMinimum(val); } public void maxZoomLevelChanged(double level) { int val = (int)Math.round(level*100); if(slider.getValue() > val) { slider.setValue(val); } slider.setMaximum(val); } public void zoomLevelChanged(double level) { System.err.println("zoom changed: "+level); if(!slider.getValueIsAdjusting()) { int val = (int)Math.round(level*100); slider.setValue(val); } } }); toolbarPanel.add(slider); Container container = getContentPane(); container.setLayout(new BorderLayout()); final JScrollBar horizontalBar = new JScrollBar(JScrollBar.HORIZONTAL); final JScrollBar verticalBar = new JScrollBar(JScrollBar.VERTICAL); embeddedView.getViewCamera().addCameraListener(new CameraListener() { /* (non-Javadoc) * @see org.openmicroscopy.shoola.agents.browser.ui.CameraListener#cameraBoundsChanged(double, double, double, double, double, double) */ public void cameraBoundsChanged(double valueX, double valueY, double extentX, double extentY, double width, double height) { int iX = (int)Math.round(valueX); int iY = (int)Math.round(valueY); int iEX = (int)Math.round(extentX); int iEY = (int)Math.round(extentY); int iW = (int)Math.round(width); int iH = (int)Math.round(height); System.err.println("bounds: ["+iX+","+iY+","+iEX+"," +iEY+","+iW+","+iH+"]"); BoundedRangeModel horizModel = horizontalBar.getModel(); BoundedRangeModel vertModel = verticalBar.getModel(); if(iEX+iX > iW) horizontalBar.setEnabled(false); else { horizontalBar.setEnabled(true); if(iW != horizModel.getMaximum() || iEX != horizModel.getExtent()) { BoundedRangeModel hModel = new DefaultBoundedRangeModel(iX,iEX,0,iW); horizontalBar.setModel(hModel); } else { horizModel.setValue(iX); } } if(iEY+iY > iH) verticalBar.setEnabled(false); else { verticalBar.setEnabled(true); if(iH != vertModel.getMaximum() || iEY != vertModel.getExtent()) { BoundedRangeModel vModel = new DefaultBoundedRangeModel(iY,iEY,0,iH); verticalBar.setModel(vModel); } else { vertModel.setValue(iY); } } } }); horizontalBar.setEnabled(false); horizontalBar.setModel(new DefaultBoundedRangeModel(0,0,0,0)); horizontalBar.addAdjustmentListener(new AdjustmentListener() { public void adjustmentValueChanged(AdjustmentEvent e) { int value = e.getValue(); embeddedView.getViewCamera().setX(value); } }); verticalBar.setEnabled(false); verticalBar.setModel(new DefaultBoundedRangeModel(0,0,0,0)); verticalBar.addAdjustmentListener(new AdjustmentListener() { public void adjustmentValueChanged(AdjustmentEvent e) { int value = e.getValue(); embeddedView.getViewCamera().setY(value); } }); JPanel fakeScrollPane = new JPanel(); JPanel verticalPanel = new JPanel(); verticalPanel.setLayout(new BorderLayout()); verticalPanel.add(embeddedView,BorderLayout.CENTER); verticalPanel.add(verticalBar,BorderLayout.EAST); JPanel horizontalPanel = new JPanel(); horizontalPanel.setLayout(new BorderLayout()); horizontalPanel.add(horizontalBar,BorderLayout.CENTER); horizontalPanel.add(Box.createHorizontalStrut(verticalBar.getPreferredSize().width), BorderLayout.EAST); verticalPanel.add(horizontalPanel,BorderLayout.SOUTH); fakeScrollPane.setLayout(new BorderLayout()); fakeScrollPane.add(verticalPanel,BorderLayout.CENTER); container.add(fakeScrollPane,BorderLayout.CENTER); container.add(toolbarPanel,BorderLayout.NORTH); if(controller.getStatusView() != null) { container.add(controller.getStatusView(),BorderLayout.SOUTH); } this.addFocusListener(new CommonFocusAdapter(this)); final UIWrapper refCopy = this; this.addInternalFrameListener(new InternalFrameAdapter() { /* (non-Javadoc) * @see javax.swing.event.InternalFrameAdapter#internalFrameClosing(javax.swing.event.InternalFrameEvent) */ public void internalFrameClosing(InternalFrameEvent arg0) { env.getBrowserManager().removeBrowser(refCopy); } }); }
3,227,781
public void clear() { Iterator i = _tools.entrySet().iterator(); while (i.hasNext()) { Map.Entry m = (Map.Entry) i.next(); ContextTool tool = (ContextTool) _toolbox.get(m.getKey()); tool.destroy(m.getValue()); } _tools.clear(); _globals.clear(); _bean = null; if (_prof != null) _prof.destroy(); }
public void clear() { Iterator i = _tools.entrySet().iterator(); while (i.hasNext()) { Map.Entry m = (Map.Entry) i.next(); ContextTool tool = (ContextTool) _toolbox.get(m.getKey()); tool.destroy(m.getValue()); } _tools.clear(); _globals.clear(); _bean = null; if (_prof != null) { stopTiming(); _prof.destroy(); } }
3,227,782
protected void onDisplayChange(TreeImageDisplay selectedDisplay) { if (selectedDisplay == null) { name = NAME; putValue(Action.SHORT_DESCRIPTION, UIUtilities.formatToolTipText(DESCRIPTION)); setEnabled(false); return; } Browser browser = model.getSelectedBrowser(); if (browser == null) { name = NAME; putValue(Action.SHORT_DESCRIPTION, UIUtilities.formatToolTipText(DESCRIPTION)); setEnabled(false); return; } if (browser.getBrowserType() == Browser.IMAGES_EXPLORER) { name = NAME; putValue(Action.SHORT_DESCRIPTION, UIUtilities.formatToolTipText(DESCRIPTION)); setEnabled(false); return; } Object ho = selectedDisplay.getUserObject(); if (ho instanceof ProjectData) { name = NAME_ROOT_P; putValue(Action.SHORT_DESCRIPTION, UIUtilities.formatToolTipText(DESCRIPTION_ROOT_P)); setEnabled(model.isObjectWritable((DataObject) ho)); } else if (ho instanceof CategoryGroupData) { name = NAME_ROOT_CG; putValue(Action.SHORT_DESCRIPTION, UIUtilities.formatToolTipText(DESCRIPTION_ROOT_CG)); setEnabled(model.isObjectWritable((DataObject) ho)); } else if (ho instanceof DatasetData) { name = NAME_PROJECT; putValue(Action.SHORT_DESCRIPTION, UIUtilities.formatToolTipText(DESCRIPTION_PROJECT)); setEnabled(model.isObjectWritable((DataObject) ho)); } else if (ho instanceof CategoryData) { name = NAME_CATEGORYGROUP; putValue(Action.SHORT_DESCRIPTION, UIUtilities.formatToolTipText(DESCRIPTION_CATEGORYGROUP)); setEnabled(model.isObjectWritable((DataObject) ho)); } else if (ho instanceof ImageData) { Object p = selectedDisplay.getParentDisplay().getUserObject(); if (p instanceof DatasetData) { name = NAME_DATASET; putValue(Action.SHORT_DESCRIPTION, UIUtilities.formatToolTipText(DESCRIPTION_DATASET)); } else { name = NAME_CATEGORY; putValue(Action.SHORT_DESCRIPTION, UIUtilities.formatToolTipText(DESCRIPTION_CATEGORY)); } setEnabled(model.isObjectWritable((DataObject) ho)); } else setEnabled(false); }
protected void onDisplayChange(TreeImageDisplay selectedDisplay) { if (selectedDisplay == null) { name = NAME; putValue(Action.SHORT_DESCRIPTION, UIUtilities.formatToolTipText(DESCRIPTION)); setEnabled(false); return; } Browser browser = model.getSelectedBrowser(); if (browser == null) { name = NAME; putValue(Action.SHORT_DESCRIPTION, UIUtilities.formatToolTipText(DESCRIPTION)); setEnabled(false); return; } if (browser.getBrowserType() == Browser.IMAGES_EXPLORER) { name = NAME; putValue(Action.SHORT_DESCRIPTION, UIUtilities.formatToolTipText(DESCRIPTION)); setEnabled(false); return; } Object ho = selectedDisplay.getUserObject(); if (ho instanceof ProjectData) { name = NAME_ROOT_P; putValue(Action.SHORT_DESCRIPTION, UIUtilities.formatToolTipText(DESCRIPTION_ROOT_P)); setEnabled(model.isObjectWritable((DataObject) ho)); } else if (ho instanceof CategoryGroupData) { name = NAME_ROOT_CG; putValue(Action.SHORT_DESCRIPTION, UIUtilities.formatToolTipText(DESCRIPTION_ROOT_CG)); setEnabled(model.isObjectWritable((DataObject) ho)); } else if (ho instanceof DatasetData) { name = NAME_PROJECT; putValue(Action.SHORT_DESCRIPTION, UIUtilities.formatToolTipText(DESCRIPTION_PROJECT)); setEnabled(model.isObjectWritable((DataObject) ho)); } else if (ho instanceof CategoryData) { name = NAME_CATEGORYGROUP; putValue(Action.SHORT_DESCRIPTION, UIUtilities.formatToolTipText(DESCRIPTION_CATEGORYGROUP)); setEnabled(model.isObjectWritable((DataObject) ho)); } else if (ho instanceof ImageData) { Object p = selectedDisplay.getParentDisplay().getUserObject(); if (p instanceof DatasetData) { name = NAME_DATASET; putValue(Action.SHORT_DESCRIPTION, UIUtilities.formatToolTipText(DESCRIPTION_DATASET)); } else { name = NAME_CATEGORY; putValue(Action.SHORT_DESCRIPTION, UIUtilities.formatToolTipText(DESCRIPTION_CATEGORY)); } setEnabled(model.isObjectWritable((DataObject) ho)); } else { setEnabled(false); putValue(Action.SHORT_DESCRIPTION, UIUtilities.formatToolTipText(DESCRIPTION)); } description = (String) getValue(Action.SHORT_DESCRIPTION); }
3,227,783
execute() throws BuildException { if(_fileSets.isEmpty()) { throw new BuildException("No fileset specified"); } Set types = new HashSet(); java.util.Iterator p = _fileSets.iterator(); while(p.hasNext()) { FileSet fileset = (FileSet)p.next(); DirectoryScanner scanner = fileset.getDirectoryScanner(getProject()); scanner.scan(); String[] files = scanner.getIncludedFiles(); for(int i = 0; i < files.length; i++) { String filename = fileset.getDir(getProject())+File.separator+files[i]; File file = new File(filename); if (!file.exists()){ log("File "+file+" not found."); } else { SaxReader sr = new SaxReader(file); types.addAll(sr.parse()); } } } for (Iterator it = types.iterator(); it.hasNext();) { SemanticType st = (SemanticType) it.next(); VelocityHelper vh = new VelocityHelper(); vh.put("type",st); try { String file = _outputDir+File.separator+st.getId().replaceAll("[.]",File.separator)+".hbm.xml"; writeToFile(vh,file,"ome/dsl/mapping.vm"); } catch (Exception e){ throw new BuildException("Error while writing type:"+st,e); } } VelocityHelper vh = new VelocityHelper(); vh.put("types",types); try { String file = _outputDir+File.separator+File.separator+"data.sql"; writeToFile(vh, file, "ome/dsl/data.vm"); } catch (Exception e){ throw new BuildException("Error while writing data:",e); } }
execute() throws BuildException { if(_fileSets.isEmpty()) { throw new BuildException("No fileset specified"); } Set types = new HashSet(); java.util.Iterator p = _fileSets.iterator(); while(p.hasNext()) { FileSet fileset = (FileSet)p.next(); DirectoryScanner scanner = fileset.getDirectoryScanner(getProject()); scanner.scan(); String[] files = scanner.getIncludedFiles(); for(int i = 0; i < files.length; i++) { String filename = fileset.getDir(getProject())+File.separator+files[i]; File file = new File(filename); if (!file.exists()){ log("File "+file+" not found."); } else { SaxReader sr = new SaxReader(file); types.addAll(sr.parse()); } } } for (Iterator it = types.iterator(); it.hasNext();) { SemanticType st = (SemanticType) it.next(); VelocityHelper vh = new VelocityHelper(); vh.put("type",st); try { String file = _outputDir+File.separator+st.getId().replaceAll("[.]","\\"+File.separator)+".hbm.xml"; writeToFile(vh,file,"ome/dsl/mapping.vm"); } catch (Exception e){ throw new BuildException("Error while writing type:"+st,e); } } VelocityHelper vh = new VelocityHelper(); vh.put("types",types); try { String file = _outputDir+File.separator+File.separator+"data.sql"; writeToFile(vh, file, "ome/dsl/data.vm"); } catch (Exception e){ throw new BuildException("Error while writing data:",e); } }
3,227,784
public void invoke(String template, Writer w){ try { InputStream in = VelocityHelper.class.getClassLoader().getResourceAsStream(template); if (null==in){ throw new FileNotFoundException(template); } InputStreamReader r = new InputStreamReader(in); log.debug(Arrays.asList(vc.getKeys())); ve.evaluate(vc,w,"Running template: "+template,r); } catch (Exception e){ throw new RuntimeException("Error invoking Velocity template:"+template,e); } }
public void invoke(String template, Writer w){ try { InputStream in = VelocityHelper.class.getClassLoader().getResourceAsStream(template); if (null==in){ throw new FileNotFoundException(template); } InputStreamReader r = new InputStreamReader(in); log.debug(Arrays.asList(vc.getKeys())); ve.evaluate(vc,w,"Running template: "+template,r); } catch (Exception e){ throw new RuntimeException("Error invoking Velocity template:"+template,e); } }
3,227,785
ExplorerPaneManager(ExplorerPane view, DataManagerCtrl agentCtrl) { this.view = view; this.agentCtrl = agentCtrl; pNodes = new TreeMap(); initListeners(); treeLoaded = false; }
ExplorerPaneManager(ExplorerPane view, DataManagerCtrl agentCtrl) { this.view = view; this.agentCtrl = agentCtrl; pNodes = new TreeMap(); initListeners(); treeLoaded = false; }
3,227,786
private void addDatasets(List datasets, DefaultMutableTreeNode pNode, boolean isVisible) { Iterator i = datasets.iterator(); DatasetSummary ds; DefaultMutableTreeNode dNode; DefaultTreeModel treeModel = (DefaultTreeModel) view.tree.getModel(); while (i.hasNext()) { ds = (DatasetSummary) i.next(); dNode = new DefaultMutableTreeNode(ds); treeModel.insertNodeInto(dNode, pNode, pNode.getChildCount()); treeModel.insertNodeInto(new DefaultMutableTreeNode(LOADING), dNode, dNode.getChildCount()); if (isVisible) setNodeVisible(dNode, pNode); } }
private void addDatasets(List datasets, DefaultMutableTreeNode pNode, boolean isVisible) { Iterator i = datasets.iterator(); DatasetSummary ds; DefaultMutableTreeNode dNode; DefaultTreeModel treeModel = (DefaultTreeModel) view.tree.getModel(); while (i.hasNext()) { ds = (DatasetSummary) i.next(); dNode = new DefaultMutableTreeNode(ds); treeModel.insertNodeInto(dNode, pNode, pNode.getChildCount()); treeModel.insertNodeInto(new DefaultMutableTreeNode(LOADING), dNode, dNode.getChildCount()); if (isVisible) setNodeVisible(dNode, pNode); } }
3,227,787
private void addDatasetsToProject(ProjectSummary p, DefaultMutableTreeNode pNode, DefaultTreeModel treeModel) { List datasets = p.getDatasets(); Iterator dIter = datasets.iterator(); DatasetSummary ds; DefaultMutableTreeNode dNode; while (dIter.hasNext()) { ds = (DatasetSummary) dIter.next(); dNode = new DefaultMutableTreeNode(ds); treeModel.insertNodeInto(dNode, pNode, pNode.getChildCount()); treeModel.insertNodeInto(new DefaultMutableTreeNode(LOADING), dNode, dNode.getChildCount()); } }
private void addDatasetsToProject(ProjectSummary p, DefaultMutableTreeNode pNode, DefaultTreeModel treeModel) { List datasets = p.getDatasets(); Iterator dIter = datasets.iterator(); DatasetSummary ds; DefaultMutableTreeNode dNode; while (dIter.hasNext()) { ds = (DatasetSummary) dIter.next(); dNode = new DefaultMutableTreeNode(ds); treeModel.insertNodeInto(dNode, pNode, pNode.getChildCount()); treeModel.insertNodeInto(new DefaultMutableTreeNode(LOADING), dNode, dNode.getChildCount()); } }
3,227,788
private void addImagesToDataset(List images, DefaultMutableTreeNode dNode) { Iterator i = images.iterator(); ImageSummary is; DefaultMutableTreeNode iNode; DefaultTreeModel treeModel = (DefaultTreeModel) view.tree.getModel(); while (i.hasNext()) { is = (ImageSummary) i.next(); iNode = new DefaultMutableTreeNode(is); treeModel.insertNodeInto(iNode, dNode, dNode.getChildCount()); } }
private void addImagesToDataset(List images, DefaultMutableTreeNode dNode) { Iterator i = images.iterator(); ImageSummary is; DefaultMutableTreeNode iNode; DefaultTreeModel treeModel = (DefaultTreeModel) view.tree.getModel(); while (i.hasNext()) { is = (ImageSummary) i.next(); iNode = new DefaultMutableTreeNode(is); treeModel.insertNodeInto(iNode, dNode, dNode.getChildCount()); } }
3,227,789
void addNewDatasetToTree(List projects) { DefaultTreeModel treeModel = (DefaultTreeModel) view.tree.getModel(); DefaultMutableTreeNode pNode; List pSummaries = agentCtrl.getUserProjects(); if (pSummaries != null) { Iterator j = pSummaries.iterator(); ProjectSummary ps; Integer projectID; while (j.hasNext()) { ps = (ProjectSummary) j.next(); projectID = new Integer(ps.getID()); pNode = (DefaultMutableTreeNode) pNodes.get(projectID); pNode.removeAllChildren(); if (projects.indexOf(ps) != -1) addDatasets(ps.getDatasets(), pNode, true); else addDatasets(ps.getDatasets(), pNode, false); treeModel.reload(pNode); } } }
void addNewDatasetToTree(List projects) { DefaultTreeModel treeModel = (DefaultTreeModel) view.tree.getModel(); DefaultMutableTreeNode pNode; List pSummaries = agentCtrl.getUserProjects(); if (pSummaries != null) { Iterator j = pSummaries.iterator(); ProjectSummary ps; Integer projectID; while (j.hasNext()) { ps = (ProjectSummary) j.next(); projectID = new Integer(ps.getID()); pNode = (DefaultMutableTreeNode) pNodes.get(projectID); pNode.removeAllChildren(); if (projects.indexOf(ps) != -1) addDatasets(ps.getDatasets(), pNode, true); else addDatasets(ps.getDatasets(), pNode, false); treeModel.reload(pNode); } } }
3,227,790
void addNewProjectToTree(ProjectSummary ps) { DefaultTreeModel treeModel = (DefaultTreeModel) view.tree.getModel(); DefaultMutableTreeNode pNode = new DefaultMutableTreeNode(ps); treeModel.insertNodeInto(pNode, root, root.getChildCount()); pNodes.put(new Integer(ps.getID()), pNode); List datasets = ps.getDatasets(); if (datasets != null) { Iterator i = datasets.iterator(); DefaultMutableTreeNode dNode; DatasetSummary ds; while (i.hasNext()) { ds = (DatasetSummary) i.next(); dNode = new DefaultMutableTreeNode(ds); dNode.add(new DefaultMutableTreeNode(LOADING)); pNode.add(dNode); } } setNodeVisible(pNode, root); }
void addNewProjectToTree(ProjectSummary ps) { DefaultTreeModel treeModel = (DefaultTreeModel) view.tree.getModel(); DefaultMutableTreeNode pNode = new DefaultMutableTreeNode(ps); treeModel.insertNodeInto(pNode, root, root.getChildCount()); pNodes.put(new Integer(ps.getID()), pNode); List datasets = ps.getDatasets(); if (datasets != null) { Iterator i = datasets.iterator(); DefaultMutableTreeNode dNode; DatasetSummary ds; while (i.hasNext()) { ds = (DatasetSummary) i.next(); dNode = new DefaultMutableTreeNode(ds); dNode.add(new DefaultMutableTreeNode(LOADING)); pNode.add(dNode); } } setNodeVisible(pNode, root); }
3,227,791
private void addNodesToDatasetMaps(Integer datasetID, DefaultMutableTreeNode node, List images) { if (cDNodes == null) cDNodes = new TreeMap(); if (imagesInDataset == null) imagesInDataset = new TreeMap(); List lNodes = (List) cDNodes.get(datasetID); if (lNodes == null) lNodes = new ArrayList(); lNodes.add(node); cDNodes.put(datasetID, lNodes); imagesInDataset.put(datasetID, images); }
private void addNodesToDatasetMaps(Integer datasetID, DefaultMutableTreeNode node, List images) { if (cDNodes == null) cDNodes = new TreeMap(); if (imagesInDataset == null) imagesInDataset = new TreeMap(); List lNodes = (List) cDNodes.get(datasetID); if (lNodes == null) lNodes = new ArrayList(); lNodes.add(node); cDNodes.put(datasetID, lNodes); imagesInDataset.put(datasetID, images); }
3,227,792
private void datasetNodeNavigation(DatasetSummary ds, DefaultMutableTreeNode node, boolean isExpanding) { DefaultTreeModel treeModel = (DefaultTreeModel) view.tree.getModel(); Integer datasetID = new Integer(ds.getID()); node.removeAllChildren(); if (isExpanding) { List list = agentCtrl.getImages(ds.getID()); //TODO: loading will never be displayed b/c we are in the // same thread. if (list.size() != 0) { addNodesToDatasetMaps(datasetID, node, list); addImagesToDataset(list, node); } else { DefaultMutableTreeNode childNode = new DefaultMutableTreeNode(EMPTY); treeModel.insertNodeInto(childNode, node, node.getChildCount()); } } else { //removeNodesFromDatasetMaps(datasetID, node); DefaultMutableTreeNode childNode = new DefaultMutableTreeNode(LOADING); treeModel.insertNodeInto(childNode, node, node.getChildCount()); } treeModel.reload(node); }
private void datasetNodeNavigation(DatasetSummary ds, DefaultMutableTreeNode node, boolean isExpanding) { DefaultTreeModel treeModel = (DefaultTreeModel) view.tree.getModel(); Integer datasetID = new Integer(ds.getID()); node.removeAllChildren(); if (isExpanding) { List list = agentCtrl.getImages(ds.getID()); //TODO: loading will never be displayed b/c we are in the // same thread. if (list.size() != 0) { addNodesToDatasetMaps(datasetID, node, list); addImagesToDataset(list, node); } else { DefaultMutableTreeNode childNode = new DefaultMutableTreeNode(EMPTY); treeModel.insertNodeInto(childNode, node, node.getChildCount()); } } else { //removeNodesFromDatasetMaps(datasetID, node); DefaultMutableTreeNode childNode = new DefaultMutableTreeNode(LOADING); treeModel.insertNodeInto(childNode, node, node.getChildCount()); } treeModel.reload(node); }
3,227,793
DefaultMutableTreeNode getUserTreeModel(String name) { root = new DefaultMutableTreeNode(name+"'s OME"); DefaultMutableTreeNode childNode = new DefaultMutableTreeNode(""); DefaultTreeModel treeModel = (DefaultTreeModel) view.tree.getModel(); treeModel.insertNodeInto(childNode, root, root.getChildCount()); return root; }
DefaultMutableTreeNode getUserTreeModel(String name) { root = new DefaultMutableTreeNode(name+"'s OME"); DefaultMutableTreeNode childNode = new DefaultMutableTreeNode(""); DefaultTreeModel treeModel = (DefaultTreeModel) view.tree.getModel(); treeModel.insertNodeInto(childNode, root, root.getChildCount()); return root; }
3,227,794
private void initListeners() { view.tree.addMouseListener(new MouseAdapter() { public void mousePressed(MouseEvent e) { onClick(e); } public void mouseReleased(MouseEvent e) { onClick(e); } }); view.tree.addTreeExpansionListener(new TreeExpansionListener() { public void treeCollapsed(TreeExpansionEvent e) { onNodeNavigation(e, false); } public void treeExpanded(TreeExpansionEvent e) { onNodeNavigation(e, true); } }); }
private void initListeners() { view.tree.addMouseListener(new MouseAdapter() { public void mousePressed(MouseEvent e) { onClick(e); } public void mouseReleased(MouseEvent e) { onClick(e); } }); view.tree.addTreeExpansionListener(new TreeExpansionListener() { public void treeCollapsed(TreeExpansionEvent e) { onNodeNavigation(e, false); } public void treeExpanded(TreeExpansionEvent e) { onNodeNavigation(e, true); } }); }
3,227,795
public void treeCollapsed(TreeExpansionEvent e) { onNodeNavigation(e, false); }
public void treeCollapsed(TreeExpansionEvent e) { onNodeNavigation(e, false); }
3,227,796
public void treeExpanded(TreeExpansionEvent e) { onNodeNavigation(e, true); }
public void treeExpanded(TreeExpansionEvent e) { onNodeNavigation(e, true); }
3,227,797
private void onClick(MouseEvent e) { int selRow = view.tree.getRowForLocation(e.getX(), e.getY()); if (selRow != -1) { view.tree.setSelectionRow(selRow); DataObject target = view.getCurrentOMEObject(); if (target != null) { if (e.isPopupTrigger()) { DataManagerUIF presentation = agentCtrl.getAbstraction().getPresentation(); TreePopupMenu popup = presentation.getPopupMenu(); popup.setTarget(target); popup.show(view.tree, e.getX(), e.getY()); } else { if (e.getClickCount() == 2) agentCtrl.showProperties(target); } } else { //click on the root node. if (e.getClickCount() == 2 && !treeLoaded) rebuildTree(); else if (treeLoaded && e.isPopupTrigger()) { DataManagerUIF presentation = agentCtrl.getAbstraction().getPresentation(); TreePopupMenu popup = presentation.getPopupMenu(); popup.setTarget(null); popup.show(view.tree, e.getX(), e.getY()); } } } }
private void onClick(MouseEvent e) { int selRow = view.tree.getRowForLocation(e.getX(), e.getY()); if (selRow != -1) { view.tree.setSelectionRow(selRow); DataObject target = view.getCurrentOMEObject(); if (target != null) { if (e.isPopupTrigger()) { DataManagerUIF presentation = agentCtrl.getAbstraction().getPresentation(); TreePopupMenu popup = presentation.getPopupMenu(); popup.setTarget(target); popup.show(view.tree, e.getX(), e.getY()); } else { if (e.getClickCount() == 2) agentCtrl.showProperties(target); } } else { //click on the root node. if (e.getClickCount() == 2 && !treeLoaded) rebuildTree(); else if (treeLoaded && e.isPopupTrigger()) { DataManagerUIF presentation = agentCtrl.getAbstraction().getPresentation(); TreePopupMenu popup = presentation.getPopupMenu(); popup.setTarget(null); popup.show(view.tree, e.getX(), e.getY()); } } } }
3,227,798
private void onNodeNavigation(TreeExpansionEvent e, boolean isExpanding) { TreePath path = e.getPath(); DefaultMutableTreeNode node = (DefaultMutableTreeNode) path.getLastPathComponent(); Object usrObject = node.getUserObject(); //dataset summary node if (usrObject instanceof DatasetSummary) { DatasetSummary ds = (DatasetSummary) usrObject; datasetNodeNavigation(ds, node, isExpanding); } else { if (node.equals(root) && !treeLoaded && isExpanding) rebuildTree(); } }
private void onNodeNavigation(TreeExpansionEvent e, boolean isExpanding) { TreePath path = e.getPath(); DefaultMutableTreeNode node = (DefaultMutableTreeNode) path.getLastPathComponent(); Object usrObject = node.getUserObject(); //dataset summary node if (usrObject instanceof DatasetSummary) { DatasetSummary ds = (DatasetSummary) usrObject; datasetNodeNavigation(ds, node, isExpanding); } else { if (node.equals(root) && !treeLoaded && isExpanding) rebuildTree(); } }
3,227,799
void rebuildTree() { List pSummaries = agentCtrl.getUserProjects(); DefaultTreeModel treeModel = (DefaultTreeModel) view.tree.getModel(); root.removeAllChildren(); if (pSummaries != null) { Iterator i = pSummaries.iterator(); ProjectSummary ps; DefaultMutableTreeNode pNode; while (i.hasNext()) { ps = (ProjectSummary) i.next(); pNode = new DefaultMutableTreeNode(ps); treeModel.insertNodeInto(pNode, root, root.getChildCount()); pNodes.put(new Integer(ps.getID()), pNode); addDatasetsToProject(ps, pNode, treeModel); } treeModel.reload(root); treeLoaded = true; } else { DefaultMutableTreeNode childNode = new DefaultMutableTreeNode(""); treeModel.insertNodeInto(childNode, root, root.getChildCount()); treeModel.reload(root); view.tree.collapsePath(new TreePath(root.getPath())); } }
void rebuildTree() { List pSummaries = agentCtrl.getUserProjects(); DefaultTreeModel treeModel = (DefaultTreeModel) view.tree.getModel(); root.removeAllChildren(); if (pSummaries != null) { Iterator i = pSummaries.iterator(); ProjectSummary ps; DefaultMutableTreeNode pNode; while (i.hasNext()) { ps = (ProjectSummary) i.next(); pNode = new DefaultMutableTreeNode(ps); treeModel.insertNodeInto(pNode, root, root.getChildCount()); pNodes.put(new Integer(ps.getID()), pNode); addDatasetsToProject(ps, pNode, treeModel); } treeModel.reload(root); treeLoaded = true; } else { DefaultMutableTreeNode childNode = new DefaultMutableTreeNode(""); treeModel.insertNodeInto(childNode, root, root.getChildCount()); treeModel.reload(root); view.tree.collapsePath(new TreePath(root.getPath())); } }
3,227,800
void refreshDatasetInTree(DatasetSummary ds) { if (cDNodes == null) return; List nodes = (List) cDNodes.get(new Integer(ds.getID())); if (nodes == null) return; Iterator i = nodes.iterator(); DefaultTreeModel treeModel = (DefaultTreeModel) view.tree.getModel(); DefaultMutableTreeNode node, childNode; List images = agentCtrl.getImages(ds.getID()); while (i.hasNext()) { node = (DefaultMutableTreeNode) i.next(); node.removeAllChildren(); if (images.size() != 0) addImagesToDataset(images, node); else { childNode = new DefaultMutableTreeNode(EMPTY); treeModel.insertNodeInto(childNode, node, node.getChildCount()); } treeModel.reload(node); } }
void refreshDatasetInTree(DatasetSummary ds) { if (cDNodes.size() == 0) return; List nodes = (List) cDNodes.get(new Integer(ds.getID())); if (nodes == null) return; Iterator i = nodes.iterator(); DefaultTreeModel treeModel = (DefaultTreeModel) view.tree.getModel(); DefaultMutableTreeNode node, childNode; List images = agentCtrl.getImages(ds.getID()); while (i.hasNext()) { node = (DefaultMutableTreeNode) i.next(); node.removeAllChildren(); if (images.size() != 0) addImagesToDataset(images, node); else { childNode = new DefaultMutableTreeNode(EMPTY); treeModel.insertNodeInto(childNode, node, node.getChildCount()); } treeModel.reload(node); } }
3,227,801
private void setNodeVisible(DefaultMutableTreeNode child, DefaultMutableTreeNode parent) { view.tree.expandPath(new TreePath(parent.getPath())); view.tree.scrollPathToVisible(new TreePath(child.getPath())); }
private void setNodeVisible(DefaultMutableTreeNode child, DefaultMutableTreeNode parent) { view.tree.expandPath(new TreePath(parent.getPath())); view.tree.scrollPathToVisible(new TreePath(child.getPath())); }
3,227,803
void updateDatasetInTree() { DefaultTreeModel treeModel = (DefaultTreeModel) view.tree.getModel(); DefaultMutableTreeNode pNode; List pSummaries = agentCtrl.getUserProjects(); if (pSummaries != null) { Iterator j = pSummaries.iterator(); ProjectSummary ps; while (j.hasNext()) { ps = (ProjectSummary) j.next(); pNode = (DefaultMutableTreeNode) pNodes.get(new Integer(ps.getID())); pNode.removeAllChildren(); addDatasets(ps.getDatasets(), pNode, false); treeModel.reload(pNode); } } }
void updateDatasetInTree() { DefaultTreeModel treeModel = (DefaultTreeModel) view.tree.getModel(); DefaultMutableTreeNode pNode; List pSummaries = agentCtrl.getUserProjects(); if (pSummaries != null) { Iterator j = pSummaries.iterator(); ProjectSummary ps; while (j.hasNext()) { ps = (ProjectSummary) j.next(); pNode = (DefaultMutableTreeNode) pNodes.get(new Integer(ps.getID())); pNode.removeAllChildren(); addDatasets(ps.getDatasets(), pNode, false); treeModel.reload(pNode); } } }
3,227,804
void updateDatasetInTree() { DefaultTreeModel treeModel = (DefaultTreeModel) view.tree.getModel(); DefaultMutableTreeNode pNode; List pSummaries = agentCtrl.getUserProjects(); if (pSummaries != null) { Iterator j = pSummaries.iterator(); ProjectSummary ps; while (j.hasNext()) { ps = (ProjectSummary) j.next(); pNode = (DefaultMutableTreeNode) pNodes.get(new Integer(ps.getID())); pNode.removeAllChildren(); addDatasets(ps.getDatasets(), pNode, false); treeModel.reload(pNode); } } }
void updateDatasetInTree() { DefaultTreeModel treeModel = (DefaultTreeModel) view.tree.getModel(); DefaultMutableTreeNode pNode; List pSummaries = agentCtrl.getUserProjects(); if (pSummaries != null) { Iterator j = pSummaries.iterator(); ProjectSummary ps; while (j.hasNext()) { ps = (ProjectSummary) j.next(); pNode = (DefaultMutableTreeNode) pNodes.get(new Integer(ps.getID())); pNode.removeAllChildren(); addDatasets(ps.getDatasets(), pNode, false); treeModel.reload(pNode); } } }
3,227,805
void updateImageInTree(ImageSummary is) { DefaultTreeModel treeModel = (DefaultTreeModel) view.tree.getModel(); if (cDNodes != null) { Iterator i = cDNodes.keySet().iterator(); Iterator j; DefaultMutableTreeNode dNode; List dNodes, images; Integer datasetID; //First update the images in list of expanded datasets. updateImagesInDataset(is); //Then update the tree. while (i.hasNext()) { datasetID = (Integer) i.next(); images = (List) imagesInDataset.get(datasetID); dNodes = (List) cDNodes.get(datasetID); j = dNodes.iterator(); while (j.hasNext()) { dNode = (DefaultMutableTreeNode) j.next(); dNode.removeAllChildren(); addImagesToDataset(images, dNode); treeModel.reload(dNode); } } } }
void updateImageInTree(ImageSummary is) { DefaultTreeModel treeModel = (DefaultTreeModel) view.tree.getModel(); if (cDNodes != null) { Iterator i = cDNodes.keySet().iterator(); Iterator j; DefaultMutableTreeNode dNode; List dNodes, images; Integer datasetID; //First update the images in list of expanded datasets. updateImagesInDataset(is); //Then update the tree. while (i.hasNext()) { datasetID = (Integer) i.next(); images = (List) imagesInDataset.get(datasetID); dNodes = (List) cDNodes.get(datasetID); j = dNodes.iterator(); while (j.hasNext()) { dNode = (DefaultMutableTreeNode) j.next(); dNode.removeAllChildren(); addImagesToDataset(images, dNode); treeModel.reload(dNode); } } } }
3,227,806
private void updateImagesInDataset(ImageSummary retVal) { Iterator i = imagesInDataset.keySet().iterator(); Iterator j; List images; ImageSummary is; while (i.hasNext()) { images = (List) imagesInDataset.get(i.next()); j = images.iterator(); while (j.hasNext()) { is = (ImageSummary) j.next(); if (is.getID() == retVal.getID()) { is.setName(retVal.getName()); break; } } } }
private void updateImagesInDataset(ImageSummary retVal) { Iterator i = imagesInDataset.keySet().iterator(); Iterator j; List images; ImageSummary is; while (i.hasNext()) { images = (List) imagesInDataset.get(i.next()); j = images.iterator(); while (j.hasNext()) { is = (ImageSummary) j.next(); if (is.getID() == retVal.getID()) { is.setName(retVal.getName()); break; } } } }
3,227,807
void updateProjectInTree() { DefaultTreeModel treeModel = (DefaultTreeModel) view.tree.getModel(); DefaultMutableTreeNode pNode; List pSummaries = agentCtrl.getUserProjects(); if (pSummaries != null) { Iterator j = pSummaries.iterator(); ProjectSummary ps; Integer projectID; while (j.hasNext()) { ps = (ProjectSummary) j.next(); projectID = new Integer(ps.getID()); pNode = (DefaultMutableTreeNode) pNodes.get(projectID); pNode.removeAllChildren(); addDatasets(ps.getDatasets(), pNode, false); treeModel.reload(pNode); } } }
void updateProjectInTree() { DefaultTreeModel treeModel = (DefaultTreeModel) view.tree.getModel(); DefaultMutableTreeNode pNode; List pSummaries = agentCtrl.getUserProjects(); if (pSummaries != null) { Iterator j = pSummaries.iterator(); ProjectSummary ps; Integer projectID; while (j.hasNext()) { ps = (ProjectSummary) j.next(); projectID = new Integer(ps.getID()); pNode = (DefaultMutableTreeNode) pNodes.get(projectID); pNode.removeAllChildren(); addDatasets(ps.getDatasets(), pNode, false); treeModel.reload(pNode); } } }
3,227,808
DataObject getCurrentOMEObject() { DataObject target = null; DefaultMutableTreeNode node = (DefaultMutableTreeNode) tree.getLastSelectedPathComponent(); if (node != null) { Object usrObj = node.getUserObject(); if( usrObj instanceof ProjectSummary || usrObj instanceof DatasetSummary || usrObj instanceof ImageSummary ) target = (DataObject) usrObj; } return target; }
DataObject getCurrentOMEObject() { DataObject target = null; DefaultMutableTreeNode node = (DefaultMutableTreeNode) tree.getLastSelectedPathComponent(); if (node != null) { Object usrObj = node.getUserObject(); if( usrObj instanceof ProjectSummary || usrObj instanceof DatasetSummary || usrObj instanceof ImageSummary ) target = (DataObject) usrObj; } return target; }
3,227,809
TinyWindowUI(TinyWindow window, BufferedImage image) { if (window == null) throw new NullPointerException("No window."); this.window = window; titleBar = new TitleBar(window.getTitle()); canvas = new ThumbnailCanvas(image); makeBorders(); makeComponentsSize(image); buildUI(); }
public TinyWindowUI(TinyWindow window, BufferedImage image) { if (window == null) throw new NullPointerException("No window."); this.window = window; titleBar = new TitleBar(window.getTitle()); canvas = new ThumbnailCanvas(image); makeBorders(); makeComponentsSize(image); buildUI(); }
3,227,810
void attachMouseListener(MouseListener controller) { titleBar.addMouseListener(controller); }
public void attachMouseListener(MouseListener controller) { titleBar.addMouseListener(controller); }
3,227,811
public Experimenter(Integer attributeId, String omeName, String email, String firstname, String password, String dataDir, String lastname, String institution, org.openmicroscopy.omero.model.Group group, org.openmicroscopy.omero.model.ModuleExecution moduleExecution, Set datasets, Set groupsByLeader, Set groupsByContact, Set images, Set projects, Set moduleExecutions, Set groups) { this.attributeId = attributeId; this.omeName = omeName; this.email = email; this.firstname = firstname; this.password = password; this.dataDir = dataDir; this.lastname = lastname; this.institution = institution; this.group = group; this.moduleExecution = moduleExecution; this.datasets = datasets; this.groupsByLeader = groupsByLeader; this.groupsByContact = groupsByContact; this.images = images; this.projects = projects; this.moduleExecutions = moduleExecutions; this.groups = groups; }
public Experimenter(Integer attributeId, String omeName, String email, String firstname, String password, String dataDir, String lastname, String institution, org.openmicroscopy.omero.model.Group group, org.openmicroscopy.omero.model.ModuleExecution moduleExecution, Set datasets, Set groupsByLeader, Set groupsByContact, Set images, Set projects, Set moduleExecutions, Set groups) { this.attributeId = attributeId; this.omeName = omeName; this.email = email; this.firstname = firstname; this.password = password; this.dataDir = dataDir; this.lastname = lastname; this.institution = institution; this.group = group; this.moduleExecution = moduleExecution; this.datasets = datasets; this.groupsByLeader = groupsByLeader; this.groupsByContact = groupsByContact; this.images = images; this.projects = projects; this.moduleExecutions = moduleExecutions; this.groups = groups; }
3,227,812
public org.openmicroscopy.omero.model.Group getGroup() { return this.group; }
public Group getGroup() { return this.group; }
3,227,813
public org.openmicroscopy.omero.model.ModuleExecution getModuleExecution() { return this.moduleExecution; }
public ModuleExecution getModuleExecution() { return this.moduleExecution; }
3,227,814
public void setGroup(org.openmicroscopy.omero.model.Group group) { this.group = group; }
public void setGroup(Group group) { this.group = group; }
3,227,815
public void setModuleExecution(org.openmicroscopy.omero.model.ModuleExecution moduleExecution) { this.moduleExecution = moduleExecution; }
public void setModuleExecution(ModuleExecution moduleExecution) { this.moduleExecution = moduleExecution; }
3,227,816
private IRubyObject[] getBlockArgs(IRubyObject value, IRubyObject self, boolean yieldProc, boolean aValue, Block currentBlock) { Node blockVar = currentBlock.getVar(); if (blockVar != null) { if (blockVar instanceof ZeroArgNode) { // Better not have arguments for a no-arg block. if (yieldProc && arrayLength(value) != 0) { throw runtime.newArgumentError("wrong # of arguments(" + ((RubyArray)value).getLength() + "for 0)"); } } else if (blockVar instanceof MultipleAsgnNode) { if (!aValue) { value = sValueToMRHS(value, ((MultipleAsgnNode)blockVar).getHeadNode()); } value = mAssign(self, (MultipleAsgnNode)blockVar, (RubyArray)value, yieldProc); } else { if (aValue) { int length = arrayLength(value); if (length == 0) { value = runtime.getNil(); } else if (length == 1) { value = ((RubyArray)value).first(IRubyObject.NULL_ARRAY); } else { // XXXEnebo - Should be warning not error. //throw runtime.newArgumentError("wrong # of arguments(" + // length + "for 1)"); } } else if (value == null) { // XXXEnebo - Should be warning not error. //throw runtime.newArgumentError("wrong # of arguments(0 for 1)"); } AssignmentVisitor.assign(this, getFrameSelf(), blockVar, value, yieldProc); } } IRubyObject[] args = ArgsUtil.arrayify(value); return args; }
private IRubyObject[] getBlockArgs(IRubyObject value, IRubyObject self, boolean yieldProc, boolean aValue, Block currentBlock) { Node blockVar = currentBlock.getVar(); if (blockVar != null) { if (blockVar instanceof ZeroArgNode) { // Better not have arguments for a no-arg block. if (yieldProc && arrayLength(value) != 0) { throw runtime.newArgumentError("wrong # of arguments(" + ((RubyArray)value).getLength() + "for 0)"); } } else if (blockVar instanceof MultipleAsgnNode) { if (!aValue) { value = sValueToMRHS(value, ((MultipleAsgnNode)blockVar).getHeadNode()); } value = mAssign(self, (MultipleAsgnNode)blockVar, (RubyArray)value, yieldProc); } else { if (aValue) { int length = arrayLength(value); if (length == 0) { value = runtime.getNil(); } else if (length == 1) { value = ((RubyArray)value).first(IRubyObject.NULL_ARRAY); } else { // XXXEnebo - Should be warning not error. //throw runtime.newArgumentError("wrong # of arguments(" + // length + "for 1)"); } } else if (value == null) { // XXXEnebo - Should be warning not error. //throw runtime.newArgumentError("wrong # of arguments(0 for 1)"); } AssignmentVisitor.assign(this, getFrameSelf(), blockVar, value, yieldProc); } } IRubyObject[] args = ArgsUtil.arrayify(value); return args; }
3,227,817
private IRubyObject[] getBlockArgs(IRubyObject value, IRubyObject self, boolean yieldProc, boolean aValue, Block currentBlock) { Node blockVar = currentBlock.getVar(); if (blockVar != null) { if (blockVar instanceof ZeroArgNode) { // Better not have arguments for a no-arg block. if (yieldProc && arrayLength(value) != 0) { throw runtime.newArgumentError("wrong # of arguments(" + ((RubyArray)value).getLength() + "for 0)"); } } else if (blockVar instanceof MultipleAsgnNode) { if (!aValue) { value = sValueToMRHS(value, ((MultipleAsgnNode)blockVar).getHeadNode()); } value = mAssign(self, (MultipleAsgnNode)blockVar, (RubyArray)value, yieldProc); } else { if (aValue) { int length = arrayLength(value); if (length == 0) { value = runtime.getNil(); } else if (length == 1) { value = ((RubyArray)value).first(IRubyObject.NULL_ARRAY); } else { // XXXEnebo - Should be warning not error. //throw runtime.newArgumentError("wrong # of arguments(" + // length + "for 1)"); } } else if (value == null) { // XXXEnebo - Should be warning not error. //throw runtime.newArgumentError("wrong # of arguments(0 for 1)"); } AssignmentVisitor.assign(this, getFrameSelf(), blockVar, value, yieldProc); } } IRubyObject[] args = ArgsUtil.arrayify(value); return args; }
private IRubyObject[] getBlockArgs(IRubyObject value, IRubyObject self, boolean yieldProc, boolean aValue, Block currentBlock) { Node blockVar = currentBlock.getVar(); if (blockVar != null) { if (blockVar instanceof ZeroArgNode) { // Better not have arguments for a no-arg block. if (yieldProc && arrayLength(value) != 0) { throw runtime.newArgumentError("wrong # of arguments(" + ((RubyArray)value).getLength() + "for 0)"); } } else if (blockVar instanceof MultipleAsgnNode) { if (!aValue) { value = sValueToMRHS(value, ((MultipleAsgnNode)blockVar).getHeadNode()); } value = mAssign(self, (MultipleAsgnNode)blockVar, (RubyArray)value, yieldProc); } else { if (aValue) { int length = arrayLength(value); if (length == 0) { value = runtime.getNil(); } else if (length == 1) { value = ((RubyArray)value).first(IRubyObject.NULL_ARRAY); } else { // XXXEnebo - Should be warning not error. //throw runtime.newArgumentError("wrong # of arguments(" + // length + "for 1)"); } } else if (value == null) { // XXXEnebo - Should be warning not error. //throw runtime.newArgumentError("wrong # of arguments(0 for 1)"); } AssignmentVisitor.assign(this, getFrameSelf(), blockVar, value, yieldProc); } } IRubyObject[] args = ArgsUtil.arrayify(value); return args; }
3,227,818
private IRubyObject[] getBlockArgs(IRubyObject value, IRubyObject self, boolean yieldProc, boolean aValue, Block currentBlock) { Node blockVar = currentBlock.getVar(); if (blockVar != null) { if (blockVar instanceof ZeroArgNode) { // Better not have arguments for a no-arg block. if (yieldProc && arrayLength(value) != 0) { throw runtime.newArgumentError("wrong # of arguments(" + ((RubyArray)value).getLength() + "for 0)"); } } else if (blockVar instanceof MultipleAsgnNode) { if (!aValue) { value = sValueToMRHS(value, ((MultipleAsgnNode)blockVar).getHeadNode()); } value = mAssign(self, (MultipleAsgnNode)blockVar, (RubyArray)value, yieldProc); } else { if (aValue) { int length = arrayLength(value); if (length == 0) { value = runtime.getNil(); } else if (length == 1) { value = ((RubyArray)value).first(IRubyObject.NULL_ARRAY); } else { // XXXEnebo - Should be warning not error. //throw runtime.newArgumentError("wrong # of arguments(" + // length + "for 1)"); } } else if (value == null) { // XXXEnebo - Should be warning not error. //throw runtime.newArgumentError("wrong # of arguments(0 for 1)"); } AssignmentVisitor.assign(this, getFrameSelf(), blockVar, value, yieldProc); } } IRubyObject[] args = ArgsUtil.arrayify(value); return args; }
private IRubyObject[] getBlockArgs(IRubyObject value, IRubyObject self, boolean yieldProc, boolean aValue, Block currentBlock) { Node blockVar = currentBlock.getVar(); if (blockVar != null) { if (blockVar instanceof ZeroArgNode) { // Better not have arguments for a no-arg block. if (yieldProc && arrayLength(value) != 0) { throw runtime.newArgumentError("wrong # of arguments(" + ((RubyArray)value).getLength() + "for 0)"); } } else if (blockVar instanceof MultipleAsgnNode) { if (!aValue) { value = sValueToMRHS(value, ((MultipleAsgnNode)blockVar).getHeadNode()); } value = mAssign(self, (MultipleAsgnNode)blockVar, (RubyArray)value, yieldProc); } else { if (aValue) { int length = arrayLength(value); if (length == 0) { value = runtime.getNil(); } else if (length == 1) { value = ((RubyArray)value).first(IRubyObject.NULL_ARRAY); } else { // XXXEnebo - Should be warning not error. //throw runtime.newArgumentError("wrong # of arguments(" + // length + "for 1)"); } } else if (value == null) { // XXXEnebo - Should be warning not error. //throw runtime.newArgumentError("wrong # of arguments(0 for 1)"); } AssignmentVisitor.assign(this, getFrameSelf(), blockVar, value, yieldProc); } } IRubyObject[] args = ArgsUtil.arrayify(value); return args; }
3,227,819
private IRubyObject[] getBlockArgs(IRubyObject value, IRubyObject self, boolean yieldProc, boolean aValue, Block currentBlock) { Node blockVar = currentBlock.getVar(); if (blockVar != null) { if (blockVar instanceof ZeroArgNode) { // Better not have arguments for a no-arg block. if (yieldProc && arrayLength(value) != 0) { throw runtime.newArgumentError("wrong # of arguments(" + ((RubyArray)value).getLength() + "for 0)"); } } else if (blockVar instanceof MultipleAsgnNode) { if (!aValue) { value = sValueToMRHS(value, ((MultipleAsgnNode)blockVar).getHeadNode()); } value = mAssign(self, (MultipleAsgnNode)blockVar, (RubyArray)value, yieldProc); } else { if (aValue) { int length = arrayLength(value); if (length == 0) { value = runtime.getNil(); } else if (length == 1) { value = ((RubyArray)value).first(IRubyObject.NULL_ARRAY); } else { // XXXEnebo - Should be warning not error. //throw runtime.newArgumentError("wrong # of arguments(" + // length + "for 1)"); } } else if (value == null) { // XXXEnebo - Should be warning not error. //throw runtime.newArgumentError("wrong # of arguments(0 for 1)"); } AssignmentVisitor.assign(this, getFrameSelf(), blockVar, value, yieldProc); } } IRubyObject[] args = ArgsUtil.arrayify(value); return args; }
private IRubyObject[] getBlockArgs(IRubyObject value, IRubyObject self, boolean yieldProc, boolean aValue, Block currentBlock) { Node blockVar = currentBlock.getVar(); if (blockVar != null) { if (blockVar instanceof ZeroArgNode) { // Better not have arguments for a no-arg block. if (yieldProc && arrayLength(value) != 0) { throw runtime.newArgumentError("wrong # of arguments(" + ((RubyArray)value).getLength() + "for 0)"); } } else if (blockVar instanceof MultipleAsgnNode) { if (!aValue) { value = sValueToMRHS(value, ((MultipleAsgnNode)blockVar).getHeadNode()); } value = mAssign(self, (MultipleAsgnNode)blockVar, (RubyArray)value, yieldProc); } else { if (aValue) { int length = arrayLength(value); if (length == 0) { value = runtime.getNil(); } else if (length == 1) { value = ((RubyArray)value).first(IRubyObject.NULL_ARRAY); } else { // XXXEnebo - Should be warning not error. //throw runtime.newArgumentError("wrong # of arguments(" + // length + "for 1)"); } } else if (value == null) { // XXXEnebo - Should be warning not error. //throw runtime.newArgumentError("wrong # of arguments(0 for 1)"); } AssignmentVisitor.assign(this, getFrameSelf(), blockVar, value, yieldProc); } } IRubyObject[] args = ArgsUtil.arrayify(value); return args; }
3,227,820
public SourcePositionFactory() { }
public SourcePositionFactory() { }
3,227,821
public ISourcePosition getDummyPosition() { return new SourcePosition("", -1, -1, 0, 0); }
public ISourcePosition getDummyPosition() { return new SourcePosition("", -1, -1, 0, 0); }
3,227,822
public RaiseException newNameError(String message);
public RaiseException newNameError(String message);
3,227,823
public CreateDatasetEditorManager(CreateDatasetEditor view, DataManagerCtrl control, DatasetData model, List projects) { this.control = control; this.view = view; this.model = model; selectionIndex = -1; this.projects = projects; imagesToAdd = new ArrayList(); projectsToAdd = new ArrayList(); isName = false; }
public CreateDatasetEditorManager(CreateDatasetEditor view, DataManagerCtrl control, DatasetData model, List projects) { this.control = control; this.view = view; this.model = model; selectionIndex = -1; this.projects = projects; imagesToAdd = new ArrayList(); projectsToAdd = new ArrayList(); isName = false; }
3,227,824
public CreateDatasetEditorManager(CreateDatasetEditor view, DataManagerCtrl control, DatasetData model, List projects) { this.control = control; this.view = view; this.model = model; selectionIndex = -1; this.projects = projects; imagesToAdd = new ArrayList(); projectsToAdd = new ArrayList(); isName = false; }
public CreateDatasetEditorManager(CreateDatasetEditor view, DataManagerCtrl control, DatasetData model, List projects) { this.control = control; this.view = view; this.model = model; selectionIndex = -1; this.projects = projects; imagesToAdd = new ArrayList(); projectsToAdd = new ArrayList(); isName = false; }
3,227,825
public void actionPerformed(ActionEvent e) { int index = -1; try { index = Integer.parseInt(e.getActionCommand()); switch (index) { case SAVE: save(); break; case CANCEL: cancel(); break; case SELECT_PROJECT: selectProject(); break; case RESET_SELECTION_PROJECT: resetSelectionProject(); break; case SELECT_IMAGE: selectImage(); break; case RESET_SELECTION_IMAGE: resetSelectionImage(); break; case SHOW_IMAGES: showImages(); } } catch(NumberFormatException nfe) { throw new Error("Invalid Action ID "+index, nfe); } }
public void actionPerformed(ActionEvent e) { int index = -1; try { index = Integer.parseInt(e.getActionCommand()); switch (index) { case SAVE: save(); break; case CANCEL: cancel(); break; case SELECT_PROJECT: selectProject(); break; case RESET_SELECTION_PROJECT: resetSelectionProject(); break; case SELECT_IMAGE: selectImage(); break; case RESET_SELECTION_IMAGE: resetSelectionImage(); break; case SHOW_IMAGES: showImages(); } } catch(NumberFormatException nfe) { throw new Error("Invalid Action ID "+index, nfe); } }
3,227,826
private void save() { if (projectsToAdd.size() == 0) { UserNotifier un = control.getRegistry().getUserNotifier(); un.notifyInfo("Create dataset", "The dataset you wish to create must " + "be added to an existing project."); return; } model.setDescription(view.getDescriptionArea().getText()); model.setName(view.getNameArea().getText()); //update tree and forward event to DB. //forward event to DataManager. control.addDataset(projectsToAdd, imagesToAdd, model); //close widget. view.dispose(); }
private void save() { if (projectsToAdd.size() == 0) { UserNotifier un = agentCtrl.getRegistry().getUserNotifier(); un.notifyInfo("Create dataset", "The dataset you wish to create must " + "be added to an existing project."); return; } model.setDescription(view.getDescriptionArea().getText()); model.setName(view.getNameArea().getText()); //update tree and forward event to DB. //forward event to DataManager. control.addDataset(projectsToAdd, imagesToAdd, model); //close widget. view.dispose(); }
3,227,828
private void save() { if (projectsToAdd.size() == 0) { UserNotifier un = control.getRegistry().getUserNotifier(); un.notifyInfo("Create dataset", "The dataset you wish to create must " + "be added to an existing project."); return; } model.setDescription(view.getDescriptionArea().getText()); model.setName(view.getNameArea().getText()); //update tree and forward event to DB. //forward event to DataManager. control.addDataset(projectsToAdd, imagesToAdd, model); //close widget. view.dispose(); }
private void save() { if (projectsToAdd.size() == 0) { UserNotifier un = control.getRegistry().getUserNotifier(); un.notifyInfo("Create dataset", "The dataset you want to create must " + "be added to an existing project."); return; } model.setDescription(view.getDescriptionArea().getText()); model.setName(view.getNameArea().getText()); //update tree and forward event to DB. //forward event to DataManager. control.addDataset(projectsToAdd, imagesToAdd, model); //close widget. view.dispose(); }
3,227,829
private void save() { if (projectsToAdd.size() == 0) { UserNotifier un = control.getRegistry().getUserNotifier(); un.notifyInfo("Create dataset", "The dataset you wish to create must " + "be added to an existing project."); return; } model.setDescription(view.getDescriptionArea().getText()); model.setName(view.getNameArea().getText()); //update tree and forward event to DB. //forward event to DataManager. control.addDataset(projectsToAdd, imagesToAdd, model); //close widget. view.dispose(); }
private void save() { if (projectsToAdd.size() == 0) { UserNotifier un = control.getRegistry().getUserNotifier(); un.notifyInfo("Create dataset", "The dataset you wish to create must " + "be added to an existing project."); return; } model.setDescription(view.getDescriptionArea().getText()); model.setName(view.getNameArea().getText()); //update tree and forward event to DB. //forward event to DataManager. control.addDataset(projectsToAdd, imagesToAdd, model); //close widget. view.dispose(); }
3,227,830
private void showImages() { int selectedIndex = view.getImagesSelections().getSelectedIndex(); if (selectedIndex != selectionIndex) { selectionIndex = selectedIndex; List images = null; switch (selectedIndex) { case CreateDatasetImagesPane.IMAGES_IMPORTED: images = control.getImportedImages(); break; case CreateDatasetImagesPane.IMAGES_USED: images = control.getUsedImages(); break; case CreateDatasetImagesPane.IMAGES_GROUP: images = control.getGroupImages(); break; case CreateDatasetImagesPane.IMAGES_SYSTEM: images = control.getSystemImages(); break; } if (images == null || images.size() == 0) return; view.showImages(images); } }
private void showImages() { int selectedIndex = view.getImagesSelections().getSelectedIndex(); if (selectedIndex != selectionIndex) { selectionIndex = selectedIndex; List images = null; switch (selectedIndex) { case CreateDatasetImagesPane.IMAGES_IMPORTED: images = control.getImportedImages(); break; case CreateDatasetImagesPane.IMAGES_USED: images = control.getUsedImages(); break; case CreateDatasetImagesPane.IMAGES_GROUP: images = control.getGroupImages(); break; case CreateDatasetImagesPane.IMAGES_SYSTEM: images = control.getSystemImages(); break; } if (images == null || images.size() == 0) return; view.showImages(images); } }
3,227,831
private void showImages() { int selectedIndex = view.getImagesSelections().getSelectedIndex(); if (selectedIndex != selectionIndex) { selectionIndex = selectedIndex; List images = null; switch (selectedIndex) { case CreateDatasetImagesPane.IMAGES_IMPORTED: images = control.getImportedImages(); break; case CreateDatasetImagesPane.IMAGES_USED: images = control.getUsedImages(); break; case CreateDatasetImagesPane.IMAGES_GROUP: images = control.getGroupImages(); break; case CreateDatasetImagesPane.IMAGES_SYSTEM: images = control.getSystemImages(); break; } if (images == null || images.size() == 0) return; view.showImages(images); } }
private void showImages() { int selectedIndex = view.getImagesSelections().getSelectedIndex(); if (selectedIndex != selectionIndex) { selectionIndex = selectedIndex; List images = null; switch (selectedIndex) { case CreateDatasetImagesPane.IMAGES_IMPORTED: images = control.getImportedImages(); break; case CreateDatasetImagesPane.IMAGES_USED: images = control.getUsedImages(); break; case CreateDatasetImagesPane.IMAGES_GROUP: images = agentCtrl.getGroupImages(); break; case CreateDatasetImagesPane.IMAGES_SYSTEM: images = control.getSystemImages(); break; } if (images == null || images.size() == 0) return; view.showImages(images); } }
3,227,832
private void showImages() { int selectedIndex = view.getImagesSelections().getSelectedIndex(); if (selectedIndex != selectionIndex) { selectionIndex = selectedIndex; List images = null; switch (selectedIndex) { case CreateDatasetImagesPane.IMAGES_IMPORTED: images = control.getImportedImages(); break; case CreateDatasetImagesPane.IMAGES_USED: images = control.getUsedImages(); break; case CreateDatasetImagesPane.IMAGES_GROUP: images = control.getGroupImages(); break; case CreateDatasetImagesPane.IMAGES_SYSTEM: images = control.getSystemImages(); break; } if (images == null || images.size() == 0) return; view.showImages(images); } }
private void showImages() { int selectedIndex = view.getImagesSelections().getSelectedIndex(); if (selectedIndex != selectionIndex) { selectionIndex = selectedIndex; List images = null; switch (selectedIndex) { case CreateDatasetImagesPane.IMAGES_IMPORTED: images = control.getImportedImages(); break; case CreateDatasetImagesPane.IMAGES_USED: images = control.getUsedImages(); break; case CreateDatasetImagesPane.IMAGES_GROUP: images = control.getGroupImages(); break; case CreateDatasetImagesPane.IMAGES_SYSTEM: images = agentCtrl.getSystemImages(); break; } if (images == null || images.size() == 0) return; view.showImages(images); } }
3,227,833
private void showImages() { int selectedIndex = view.getImagesSelections().getSelectedIndex(); if (selectedIndex != selectionIndex) { selectionIndex = selectedIndex; List images = null; switch (selectedIndex) { case CreateDatasetImagesPane.IMAGES_IMPORTED: images = control.getImportedImages(); break; case CreateDatasetImagesPane.IMAGES_USED: images = control.getUsedImages(); break; case CreateDatasetImagesPane.IMAGES_GROUP: images = control.getGroupImages(); break; case CreateDatasetImagesPane.IMAGES_SYSTEM: images = control.getSystemImages(); break; } if (images == null || images.size() == 0) return; view.showImages(images); } }
private void showImages() { int selectedIndex = view.getImagesSelections().getSelectedIndex(); if (selectedIndex != selectionIndex) { selectionIndex = selectedIndex; List images = null; switch (selectedIndex) { case CreateDatasetImagesPane.IMAGES_IMPORTED: images = control.getImportedImages(); break; case CreateDatasetImagesPane.IMAGES_USED: images = control.getUsedImages(); break; case CreateDatasetImagesPane.IMAGES_GROUP: images = control.getGroupImages(); break; case CreateDatasetImagesPane.IMAGES_SYSTEM: images = control.getSystemImages(); break; } if (images == null || images.size() == 0) return; view.showImages(images); } }
3,227,834
public void testAllMethods(){ log.info( ob.allCounts() .countsFor(new Integer(1)) .noCounts() .exp(new Integer(3)) .allExps() .noLeaves() .map() ); }
public void testAllMethods(){ log.info( ob.allCounts() .countsFor(new Integer(1)) .noCounts() .exp(new Integer(3)) .allExps() .noLeaves() .map() ); }
3,227,835
public PojoOptions exp(Integer i){ options.put(EXPERIMENTER,i); return this; }
public PojoOptions exp(Long i){ options.put(EXPERIMENTER,i); return this; }
3,227,836
public RubyObject call(Ruby ruby, RubyObject recv, RubyId id, RubyObject[] args, boolean noSuper) { CRefNode savedCref = null; // VALUE[] localVars = null; RubyPointer argsList = new RubyPointer(args); RubyPointer localVarsList = null; ruby.getRubyScope().push(); if (getRefValue() != null) { savedCref = ruby.getCRef(); ruby.setCRef(getRefValue()); ruby.getRubyFrame().setCbase(getRefValue()); } if (getTable() != null) { // ? +++ // List tmpList = Collections.nCopies(body.nd_tbl()[0].intValue() + 1, getRuby().getNil()); // ? --- // localVarsList = new ShiftableList(new ArrayList(tmpList)); // localVarsList.set(0, body); // localVarsList.shift(1); localVarsList = new RubyPointer(ruby.getNil(), getTable().getId(0).intValue() + 1); localVarsList.set(0, this); localVarsList.inc(); ruby.getRubyScope().setLocalVars(localVarsList); ruby.getRubyScope().setLocalTbl(getTable()); } else { localVarsList = ruby.getRubyScope().getLocalVars(); ruby.getRubyScope().setLocalVars(null); ruby.getRubyScope().setLocalTbl(null); } Node body = getNextNode(); RubyVarmap.push(ruby); // PUSH_TAG(PROT_FUNC); RubyObject result = ruby.getNil(); try { Node node = null; int i; if (body.getType() == Constants.NODE_ARGS) { node = body; body = null; } else if (body.getType() == Constants.NODE_BLOCK) { node = body.getHeadNode(); body = body.getNextNode(); } if (node != null) { if (node.getType() != Constants.NODE_ARGS) { // rb_bug("no argument-node"); } i = node.getCount(); if (i > (args != null ? args.length : 0)) { throw new RubyArgumentException("wrong # of arguments(" + args.length + " for " + i + ")"); } if (node.getRest() == -1) { int opt = i; Node optNode = node.getOptNode(); while (optNode != null) { opt++; optNode = optNode.getNextNode(); } if (opt < (args != null ? args.length : 0)) { throw new RubyArgumentException("wrong # of arguments(" + args.length + " for " + opt + ")"); } ruby.getRubyFrame().setArgs(localVarsList != null ? localVarsList.getPointer(2) : null); } if (localVarsList != null) { if (i > 0) { localVarsList.inc(2); for (int j = 0; j < i; j++ ) { localVarsList.set(j, argsList.get(j)); } localVarsList.dec(2); } argsList.inc(i); if (node.getOptNode() != null) { Node optNode = node.getOptNode(); while (optNode != null && argsList.size() != 0) { ((AssignableNode)optNode.getHeadNode()).assign(ruby, recv, argsList.getRuby(0), true); argsList.inc(1); optNode = optNode.getNextNode(); } recv.eval(optNode); } if (node.getRest() >= 0) { RubyArray array = null; if (argsList.size() > 0) { array = RubyArray.m_newArray(ruby, argsList); } else { array = RubyArray.m_newArray(ruby, 0); } localVarsList.set(node.getRest(), array); } } } result = recv.eval(body); } catch (ReturnException rExcptn) { } RubyVarmap.pop(ruby); ruby.getRubyScope().pop(); ruby.setCRef(savedCref); return result; }
public RubyObject call(Ruby ruby, RubyObject recv, RubyId id, RubyObject[] args, boolean noSuper) { CRefNode savedCref = ruby.getCRef(); // VALUE[] localVars = null; RubyPointer argsList = new RubyPointer(args); RubyPointer localVarsList = null; ruby.getRubyScope().push(); if (getRefValue() != null) { savedCref = ruby.getCRef(); ruby.setCRef(getRefValue()); ruby.getRubyFrame().setCbase(getRefValue()); } if (getTable() != null) { // ? +++ // List tmpList = Collections.nCopies(body.nd_tbl()[0].intValue() + 1, getRuby().getNil()); // ? --- // localVarsList = new ShiftableList(new ArrayList(tmpList)); // localVarsList.set(0, body); // localVarsList.shift(1); localVarsList = new RubyPointer(ruby.getNil(), getTable().getId(0).intValue() + 1); localVarsList.set(0, this); localVarsList.inc(); ruby.getRubyScope().setLocalVars(localVarsList); ruby.getRubyScope().setLocalTbl(getTable()); } else { localVarsList = ruby.getRubyScope().getLocalVars(); ruby.getRubyScope().setLocalVars(null); ruby.getRubyScope().setLocalTbl(null); } Node body = getNextNode(); RubyVarmap.push(ruby); // PUSH_TAG(PROT_FUNC); RubyObject result = ruby.getNil(); try { Node node = null; int i; if (body.getType() == Constants.NODE_ARGS) { node = body; body = null; } else if (body.getType() == Constants.NODE_BLOCK) { node = body.getHeadNode(); body = body.getNextNode(); } if (node != null) { if (node.getType() != Constants.NODE_ARGS) { // rb_bug("no argument-node"); } i = node.getCount(); if (i > (args != null ? args.length : 0)) { throw new RubyArgumentException("wrong # of arguments(" + args.length + " for " + i + ")"); } if (node.getRest() == -1) { int opt = i; Node optNode = node.getOptNode(); while (optNode != null) { opt++; optNode = optNode.getNextNode(); } if (opt < (args != null ? args.length : 0)) { throw new RubyArgumentException("wrong # of arguments(" + args.length + " for " + opt + ")"); } ruby.getRubyFrame().setArgs(localVarsList != null ? localVarsList.getPointer(2) : null); } if (localVarsList != null) { if (i > 0) { localVarsList.inc(2); for (int j = 0; j < i; j++ ) { localVarsList.set(j, argsList.get(j)); } localVarsList.dec(2); } argsList.inc(i); if (node.getOptNode() != null) { Node optNode = node.getOptNode(); while (optNode != null && argsList.size() != 0) { ((AssignableNode)optNode.getHeadNode()).assign(ruby, recv, argsList.getRuby(0), true); argsList.inc(1); optNode = optNode.getNextNode(); } recv.eval(optNode); } if (node.getRest() >= 0) { RubyArray array = null; if (argsList.size() > 0) { array = RubyArray.m_newArray(ruby, argsList); } else { array = RubyArray.m_newArray(ruby, 0); } localVarsList.set(node.getRest(), array); } } } result = recv.eval(body); } catch (ReturnException rExcptn) { } RubyVarmap.pop(ruby); ruby.getRubyScope().pop(); ruby.setCRef(savedCref); return result; }
3,227,837
public RubyObject call(Ruby ruby, RubyObject recv, RubyId id, RubyObject[] args, boolean noSuper) { CRefNode savedCref = null; // VALUE[] localVars = null; RubyPointer argsList = new RubyPointer(args); RubyPointer localVarsList = null; ruby.getRubyScope().push(); if (getRefValue() != null) { savedCref = ruby.getCRef(); ruby.setCRef(getRefValue()); ruby.getRubyFrame().setCbase(getRefValue()); } if (getTable() != null) { // ? +++ // List tmpList = Collections.nCopies(body.nd_tbl()[0].intValue() + 1, getRuby().getNil()); // ? --- // localVarsList = new ShiftableList(new ArrayList(tmpList)); // localVarsList.set(0, body); // localVarsList.shift(1); localVarsList = new RubyPointer(ruby.getNil(), getTable().getId(0).intValue() + 1); localVarsList.set(0, this); localVarsList.inc(); ruby.getRubyScope().setLocalVars(localVarsList); ruby.getRubyScope().setLocalTbl(getTable()); } else { localVarsList = ruby.getRubyScope().getLocalVars(); ruby.getRubyScope().setLocalVars(null); ruby.getRubyScope().setLocalTbl(null); } Node body = getNextNode(); RubyVarmap.push(ruby); // PUSH_TAG(PROT_FUNC); RubyObject result = ruby.getNil(); try { Node node = null; int i; if (body.getType() == Constants.NODE_ARGS) { node = body; body = null; } else if (body.getType() == Constants.NODE_BLOCK) { node = body.getHeadNode(); body = body.getNextNode(); } if (node != null) { if (node.getType() != Constants.NODE_ARGS) { // rb_bug("no argument-node"); } i = node.getCount(); if (i > (args != null ? args.length : 0)) { throw new RubyArgumentException("wrong # of arguments(" + args.length + " for " + i + ")"); } if (node.getRest() == -1) { int opt = i; Node optNode = node.getOptNode(); while (optNode != null) { opt++; optNode = optNode.getNextNode(); } if (opt < (args != null ? args.length : 0)) { throw new RubyArgumentException("wrong # of arguments(" + args.length + " for " + opt + ")"); } ruby.getRubyFrame().setArgs(localVarsList != null ? localVarsList.getPointer(2) : null); } if (localVarsList != null) { if (i > 0) { localVarsList.inc(2); for (int j = 0; j < i; j++ ) { localVarsList.set(j, argsList.get(j)); } localVarsList.dec(2); } argsList.inc(i); if (node.getOptNode() != null) { Node optNode = node.getOptNode(); while (optNode != null && argsList.size() != 0) { ((AssignableNode)optNode.getHeadNode()).assign(ruby, recv, argsList.getRuby(0), true); argsList.inc(1); optNode = optNode.getNextNode(); } recv.eval(optNode); } if (node.getRest() >= 0) { RubyArray array = null; if (argsList.size() > 0) { array = RubyArray.m_newArray(ruby, argsList); } else { array = RubyArray.m_newArray(ruby, 0); } localVarsList.set(node.getRest(), array); } } } result = recv.eval(body); } catch (ReturnException rExcptn) { } RubyVarmap.pop(ruby); ruby.getRubyScope().pop(); ruby.setCRef(savedCref); return result; }
public RubyObject call(Ruby ruby, RubyObject recv, RubyId id, RubyObject[] args, boolean noSuper) { CRefNode savedCref = null; // VALUE[] localVars = null; RubyPointer argsList = new RubyPointer(args); RubyPointer localVarsList = null; ruby.getRubyScope().push(); if (getRefValue() != null) { ruby.setCRef(getRefValue()); ruby.getRubyFrame().setCbase(getRefValue()); } if (getTable() != null) { // ? +++ // List tmpList = Collections.nCopies(body.nd_tbl()[0].intValue() + 1, getRuby().getNil()); // ? --- // localVarsList = new ShiftableList(new ArrayList(tmpList)); // localVarsList.set(0, body); // localVarsList.shift(1); localVarsList = new RubyPointer(ruby.getNil(), getTable().getId(0).intValue() + 1); localVarsList.set(0, this); localVarsList.inc(); ruby.getRubyScope().setLocalVars(localVarsList); ruby.getRubyScope().setLocalTbl(getTable()); } else { localVarsList = ruby.getRubyScope().getLocalVars(); ruby.getRubyScope().setLocalVars(null); ruby.getRubyScope().setLocalTbl(null); } Node body = getNextNode(); RubyVarmap.push(ruby); // PUSH_TAG(PROT_FUNC); RubyObject result = ruby.getNil(); try { Node node = null; int i; if (body.getType() == Constants.NODE_ARGS) { node = body; body = null; } else if (body.getType() == Constants.NODE_BLOCK) { node = body.getHeadNode(); body = body.getNextNode(); } if (node != null) { if (node.getType() != Constants.NODE_ARGS) { // rb_bug("no argument-node"); } i = node.getCount(); if (i > (args != null ? args.length : 0)) { throw new RubyArgumentException("wrong # of arguments(" + args.length + " for " + i + ")"); } if (node.getRest() == -1) { int opt = i; Node optNode = node.getOptNode(); while (optNode != null) { opt++; optNode = optNode.getNextNode(); } if (opt < (args != null ? args.length : 0)) { throw new RubyArgumentException("wrong # of arguments(" + args.length + " for " + opt + ")"); } ruby.getRubyFrame().setArgs(localVarsList != null ? localVarsList.getPointer(2) : null); } if (localVarsList != null) { if (i > 0) { localVarsList.inc(2); for (int j = 0; j < i; j++ ) { localVarsList.set(j, argsList.get(j)); } localVarsList.dec(2); } argsList.inc(i); if (node.getOptNode() != null) { Node optNode = node.getOptNode(); while (optNode != null && argsList.size() != 0) { ((AssignableNode)optNode.getHeadNode()).assign(ruby, recv, argsList.getRuby(0), true); argsList.inc(1); optNode = optNode.getNextNode(); } recv.eval(optNode); } if (node.getRest() >= 0) { RubyArray array = null; if (argsList.size() > 0) { array = RubyArray.m_newArray(ruby, argsList); } else { array = RubyArray.m_newArray(ruby, 0); } localVarsList.set(node.getRest(), array); } } } result = recv.eval(body); } catch (ReturnException rExcptn) { } RubyVarmap.pop(ruby); ruby.getRubyScope().pop(); ruby.setCRef(savedCref); return result; }
3,227,838
public RubyObject setupModule(Ruby ruby, RubyModule module) { // Node node = n; String file = ruby.getSourceFile(); int line = ruby.getSourceLine(); // TMP_PROTECT; RubyFrame frame = ruby.getRubyFrame(); frame.setTmp(ruby.getRubyFrame()); ruby.setRubyFrame(frame); ruby.pushClass(); ruby.setRubyClass(module); ruby.getRubyScope().push(); RubyVarmap.push(ruby); if (getTable() != null) { /*List tmp = Collections.nCopies(idTable[0].intValue() + 1, ruby.getNil()); ShiftableList vars = new ShiftableList(new ArrayList(tmp)); vars.set(0, this); vars.shift(1);*/ RubyPointer vars = new RubyPointer(ruby.getNil(), getTable().getId(0).intValue() + 1); vars.set(0, this); vars.inc(); ruby.getRubyScope().setLocalVars(vars); ruby.getRubyScope().setLocalTbl(getTable()); } else { ruby.getRubyScope().setLocalVars(null); ruby.getRubyScope().setLocalTbl(null); } ruby.getCRef().push(module); ruby.getRubyFrame().setCbase(ruby.getCRef()); // PUSH_TAG(PROT_NONE); RubyObject result = null; // if (( state = EXEC_TAG()) == 0 ) { // if (trace_func) { // call_trace_func("class", file, line, ruby_class, // ruby_frame->last_func, ruby_frame->last_class ); // } result = getNextNode() != null ? getNextNode().eval(ruby, ruby.getRubyClass()) : ruby.getNil(); // } // POP_TAG(); ruby.getCRef().pop(); RubyVarmap.pop(ruby); ruby.getRubyScope().pop(); ruby.popClass(); ruby.setRubyFrame(frame.getTmp()); // if (trace_func) { // call_trace_func("end", file, line, 0, ruby_frame->last_func, ruby_frame->last_class ); // } // if (state != 0) { // JUMP_TAG(state); // } return result; }
public RubyObject setupModule(Ruby ruby, RubyModule module) { // Node node = n; String file = ruby.getSourceFile(); int line = ruby.getSourceLine(); // TMP_PROTECT; RubyFrame frame = ruby.getRubyFrame(); frame.setTmp(ruby.getRubyFrame()); ruby.setRubyFrame(frame); ruby.pushClass(); ruby.setRubyClass(module); ruby.getRubyScope().push(); RubyVarmap.push(ruby); if (getTable() != null) { /*List tmp = Collections.nCopies(idTable[0].intValue() + 1, ruby.getNil()); ShiftableList vars = new ShiftableList(new ArrayList(tmp)); vars.set(0, this); vars.shift(1);*/ RubyPointer vars = new RubyPointer(ruby.getNil(), getTable().getId(0).intValue() + 1); vars.set(0, this); vars.inc(); ruby.getRubyScope().setLocalVars(vars); ruby.getRubyScope().setLocalTbl(getTable()); } else { ruby.getRubyScope().setLocalVars(null); ruby.getRubyScope().setLocalTbl(null); } ruby.getCRef().push(module); ruby.getRubyFrame().setCbase(ruby.getCRef()); // PUSH_TAG(PROT_NONE); RubyObject result = null; // if (( state = EXEC_TAG()) == 0 ) { // if (trace_func) { // call_trace_func("class", file, line, ruby_class, // ruby_frame->last_func, ruby_frame->last_class ); // } result = getNextNode() != null ? getNextNode().eval(ruby, ruby.getRubyClass()) : ruby.getNil(); // } // POP_TAG(); ruby.getCRef().pop(); RubyVarmap.pop(ruby); ruby.getRubyScope().pop(); ruby.popClass(); ruby.setRubyFrame(frame.getTmp()); // if (trace_func) { // call_trace_func("end", file, line, 0, ruby_frame->last_func, ruby_frame->last_class ); // } // if (state != 0) { // JUMP_TAG(state); // } return result; }
3,227,839
public FindRegExCmd(HiViewer model, String regEx, int index) { if (model == null) throw new IllegalArgumentException("No model."); if (regEx == null) throw new IllegalArgumentException("No regular expression."); if (!checkIndex(index)) throw new IllegalArgumentException("Search index not valid."); this.model = model; this.regEx = regEx; this.index = index; }
public FindRegExCmd(HiViewer model, Pattern pattern, int index) { if (model == null) throw new IllegalArgumentException("No model."); if (regEx == null) throw new IllegalArgumentException("No regular expression."); if (!checkIndex(index)) throw new IllegalArgumentException("Search index not valid."); this.model = model; this.regEx = regEx; this.index = index; }
3,227,841
public FindRegExCmd(HiViewer model, String regEx, int index) { if (model == null) throw new IllegalArgumentException("No model."); if (regEx == null) throw new IllegalArgumentException("No regular expression."); if (!checkIndex(index)) throw new IllegalArgumentException("Search index not valid."); this.model = model; this.regEx = regEx; this.index = index; }
public FindRegExCmd(HiViewer model, String regEx, int index) { if (model == null) throw new IllegalArgumentException("No model."); if (regEx == null) throw new IllegalArgumentException("No regular expression."); if (!checkIndex(index)) throw new IllegalArgumentException("Search index not valid."); this.model = model; this.regEx = regEx; this.index = index; }
3,227,842
public FindRegExCmd(HiViewer model, String regEx, int index) { if (model == null) throw new IllegalArgumentException("No model."); if (regEx == null) throw new IllegalArgumentException("No regular expression."); if (!checkIndex(index)) throw new IllegalArgumentException("Search index not valid."); this.model = model; this.regEx = regEx; this.index = index; }
public FindRegExCmd(HiViewer model, String regEx, int index) { if (model == null) throw new IllegalArgumentException("No model."); if (regEx == null) throw new IllegalArgumentException("No regular expression."); if (!checkIndex(index)) throw new IllegalArgumentException("Search index not valid."); this.model = model; this.pattern = pattern; this.index = index; }
3,227,843
public void execute() { FindRegExVisitor visitor = null; switch (index) { case IN_TITLE: visitor = new FindRegExTitleVisitor(model, regEx); break; case IN_ANNOTATION: visitor = new FindRegExAnnotationVisitor(model, regEx); break; case IN_T_AND_A: visitor = new FindRegExTitleAndAnnotationVisitor(model, regEx); } if (visitor == null) return; Browser browser = model.getBrowser(); ImageDisplay selectedDisplay = browser.getSelectedDisplay(); if (selectedDisplay.getParentDisplay() == null) //root browser.accept(visitor); else { if (!(selectedDisplay instanceof ImageNode)) selectedDisplay.accept(visitor); } model.getClipBoard().setSearchResults(visitor.getFoundNodes()); }
public void execute() { FindRegExVisitor visitor = null; switch (index) { case IN_TITLE: visitor = new FindRegExTitleVisitor(model, pattern); break; case IN_ANNOTATION: visitor = new FindRegExAnnotationVisitor(model, regEx); break; case IN_T_AND_A: visitor = new FindRegExTitleAndAnnotationVisitor(model, regEx); } if (visitor == null) return; Browser browser = model.getBrowser(); ImageDisplay selectedDisplay = browser.getSelectedDisplay(); if (selectedDisplay.getParentDisplay() == null) //root browser.accept(visitor); else { if (!(selectedDisplay instanceof ImageNode)) selectedDisplay.accept(visitor); } model.getClipBoard().setSearchResults(visitor.getFoundNodes()); }
3,227,844
public void execute() { FindRegExVisitor visitor = null; switch (index) { case IN_TITLE: visitor = new FindRegExTitleVisitor(model, regEx); break; case IN_ANNOTATION: visitor = new FindRegExAnnotationVisitor(model, regEx); break; case IN_T_AND_A: visitor = new FindRegExTitleAndAnnotationVisitor(model, regEx); } if (visitor == null) return; Browser browser = model.getBrowser(); ImageDisplay selectedDisplay = browser.getSelectedDisplay(); if (selectedDisplay.getParentDisplay() == null) //root browser.accept(visitor); else { if (!(selectedDisplay instanceof ImageNode)) selectedDisplay.accept(visitor); } model.getClipBoard().setSearchResults(visitor.getFoundNodes()); }
public void execute() { FindRegExVisitor visitor = null; switch (index) { case IN_TITLE: visitor = new FindRegExTitleVisitor(model, regEx); break; case IN_ANNOTATION: visitor = new FindRegExAnnotationVisitor(model, pattern); break; case IN_T_AND_A: visitor = new FindRegExTitleAndAnnotationVisitor(model, regEx); } if (visitor == null) return; Browser browser = model.getBrowser(); ImageDisplay selectedDisplay = browser.getSelectedDisplay(); if (selectedDisplay.getParentDisplay() == null) //root browser.accept(visitor); else { if (!(selectedDisplay instanceof ImageNode)) selectedDisplay.accept(visitor); } model.getClipBoard().setSearchResults(visitor.getFoundNodes()); }
3,227,845
public void execute() { FindRegExVisitor visitor = null; switch (index) { case IN_TITLE: visitor = new FindRegExTitleVisitor(model, regEx); break; case IN_ANNOTATION: visitor = new FindRegExAnnotationVisitor(model, regEx); break; case IN_T_AND_A: visitor = new FindRegExTitleAndAnnotationVisitor(model, regEx); } if (visitor == null) return; Browser browser = model.getBrowser(); ImageDisplay selectedDisplay = browser.getSelectedDisplay(); if (selectedDisplay.getParentDisplay() == null) //root browser.accept(visitor); else { if (!(selectedDisplay instanceof ImageNode)) selectedDisplay.accept(visitor); } model.getClipBoard().setSearchResults(visitor.getFoundNodes()); }
public void execute() { FindRegExVisitor visitor = null; switch (index) { case IN_TITLE: visitor = new FindRegExTitleVisitor(model, regEx); break; case IN_ANNOTATION: visitor = new FindRegExAnnotationVisitor(model, regEx); break; case IN_T_AND_A: visitor = new FindRegExTitleAndAnnotationVisitor(model, pattern); } if (visitor == null) return; Browser browser = model.getBrowser(); ImageDisplay selectedDisplay = browser.getSelectedDisplay(); if (selectedDisplay.getParentDisplay() == null) //root browser.accept(visitor); else { if (!(selectedDisplay instanceof ImageNode)) selectedDisplay.accept(visitor); } model.getClipBoard().setSearchResults(visitor.getFoundNodes()); }
3,227,846
public void printError(RubyException excp) { if (excp == null || excp.isNil()) { return; } RubyArray backtrace = (RubyArray) excp.funcall("backtrace"); if (backtrace.isNil()) { if (ruby.getSourceFile() != null) { getErrorStream().print(ruby.getSourceFile() + ':' + ruby.getSourceLine()); } else { getErrorStream().print(ruby.getSourceLine()); } } else if (backtrace.getLength() == 0) { printErrorPos(); } else { RubyObject mesg = backtrace.entry(0); if (mesg.isNil()) { printErrorPos(); } else { getErrorStream().print(mesg); } } RubyClass type = excp.getRubyClass(); String info = excp.toString(); if (type == ruby.getExceptions().getRuntimeError() && info.length() == 0) { getErrorStream().print(": unhandled exception\n"); } else { String path = type.getClassPath().toString(); if (info.length() == 0) { getErrorStream().print(": " + path + '\n'); } else { if (path.startsWith("#")) { path = null; } String tail = null; if (info.indexOf("\n") != -1) { tail = info.substring(info.indexOf("\n") + 1); info = info.substring(0, info.indexOf("\n")); } getErrorStream().print(": " + info); if (path != null) { getErrorStream().print(" (" + path + ")\n"); } if (tail != null) { getErrorStream().print(tail + '\n'); } } } if (!backtrace.isNil()) { RubyObject[] elements = backtrace.toJavaArray(); for (int i = 0; i < elements.length; i++) { if (elements[i] instanceof RubyString) { getErrorStream().print("\tfrom " + elements[i] + '\n'); } if (i == TRACE_HEAD && elements.length > TRACE_MAX) { getErrorStream().print("\t ... " + (elements.length - TRACE_HEAD - TRACE_TAIL) + "levels...\n"); i = elements.length - TRACE_TAIL; } } } }
public void printError(RubyException excp) { if (excp == null || excp.isNil()) { return; } RubyArray backtrace = (RubyArray) excp.funcall("backtrace"); if (backtrace.isNil()) { if (ruby.getSourceFile() != null) { getErrorStream().print(ruby.getSourceFile() + ':' + ruby.getSourceLine()); } else { getErrorStream().print(ruby.getSourceLine()); } } else if (backtrace.getLength() == 0) { printErrorPos(); } else { RubyObject mesg = backtrace.entry(0); if (mesg.isNil()) { printErrorPos(); } else { getErrorStream().print(mesg); } } RubyClass type = excp.getRubyClass(); String info = excp.toString(); if (type == ruby.getExceptions().getRuntimeError() && info.length() == 0) { getErrorStream().print(": unhandled exception\n"); } else { String path = type.getClassPath().toString(); if (info.length() == 0) { getErrorStream().print(": " + path + '\n'); } else { if (path.startsWith("#")) { path = null; } String tail = null; if (info.indexOf("\n") != -1) { tail = info.substring(info.indexOf("\n") + 1); info = info.substring(0, info.indexOf("\n")); } getErrorStream().print(": " + info); if (path != null) { getErrorStream().print(" (" + path + ")\n"); } if (tail != null) { getErrorStream().print(tail + '\n'); } } } if (!backtrace.isNil()) { RubyObject[] elements = backtrace.toJavaArray(); for (int i = 0; i < elements.length; i++) { if (elements[i] instanceof RubyString) { getErrorStream().print("\tfrom " + elements[i] + '\n'); } if (i == TRACE_HEAD && elements.length > TRACE_MAX) { getErrorStream().print("\t ... " + (elements.length - TRACE_HEAD - TRACE_TAIL) + "levels...\n"); i = elements.length - TRACE_TAIL; } } } }
3,227,847
public Namespace(RubyModule namespaceModule, Namespace parent) { this.namespaceModule = namespaceModule; this.parent = parent; }
public Namespace(RubyModule namespaceModule, Namespace parent) { this.namespaceModule = namespaceModule; this.parent = parent; }
3,227,848
public void setModel(ThumbnailDataModel model) { if (model == null) { this.model = model; } }
public void setModel(ThumbnailDataModel model) { if(model != null) { this.model = model; } }
3,227,849
public Object invoke(MethodInvocation arg0) throws Throwable { return new ProxyCleanupFilter().filter(null, arg0.proceed()); }
public Object invoke(MethodInvocation arg0) throws Throwable { Object result = arg0.proceed(); if (!StatefulServiceInterface.class .isAssignableFrom( arg0.getThis().getClass())) { result = new ProxyCleanupFilter().filter(null, result); } return result; }
3,227,850
protected EditorModel(TreeViewer parentModel, int editorType, DataObject hierarchyObject) { if (parentModel == null) throw new NullPointerException("No parent model."); if (editorType != Editor.CREATE_EDITOR && editorType != Editor.PROPERTIES_EDITOR) throw new IllegalArgumentException("editor not supported."); if (hierarchyObject == null) throw new IllegalArgumentException("No Data object."); state = Editor.NEW; this.editorType = editorType; this.parentModel = parentModel; this.hierarchyObject = hierarchyObject; annotated = false; }
protected EditorModel(TreeViewer parentModel, int editorType, DataObject hierarchyObject) { if (parentModel == null) throw new NullPointerException("No parent model."); if (editorType != Editor.CREATE_EDITOR && editorType != Editor.PROPERTIES_EDITOR) throw new IllegalArgumentException("editor not supported."); if (hierarchyObject == null) throw new IllegalArgumentException("No Data object."); state = Editor.NEW; this.editorType = editorType; this.parentModel = parentModel; this.hierarchyObject = hierarchyObject; annotated = false; }
3,227,851
public ViewCmd(TreeViewer model, DataObject hierarchyObject) { if (model == null) throw new IllegalArgumentException("No model."); this.model = model; if (hierarchyObject == null) throw new IllegalArgumentException("No hierarchyObject."); this.hierarchyObject = hierarchyObject; }
public ViewCmd(TreeViewer model) { if (model == null) throw new IllegalArgumentException("No model."); this.model = model; if (hierarchyObject == null) throw new IllegalArgumentException("No hierarchyObject."); this.hierarchyObject = hierarchyObject; }
3,227,852
public ViewCmd(TreeViewer model, DataObject hierarchyObject) { if (model == null) throw new IllegalArgumentException("No model."); this.model = model; if (hierarchyObject == null) throw new IllegalArgumentException("No hierarchyObject."); this.hierarchyObject = hierarchyObject; }
public ViewCmd(TreeViewer model, DataObject hierarchyObject) { if (model == null) throw new IllegalArgumentException("No model."); this.model = model; if (hierarchyObject == null) throw new IllegalArgumentException("No hierarchyObject."); this.hierarchyObject = hierarchyObject; }
3,227,853
public void execute() { Browser browser = model.getSelectedBrowser(); if (browser == null) return; Object ho; if (hierarchyObject != null) ho = hierarchyObject; else { TreeImageDisplay display = browser.getSelectedDisplay(); if (display == null) return; ho = display.getUserObject(); } EventBus bus = TreeViewerAgent.getRegistry().getEventBus(); Class root = convertRootLevel(browser.getRootLevel()); if (ho instanceof ImageData) { ImageData data = (ImageData) ho; bus.post(new LoadImage(data.getId(), data.getDefaultPixels().getId(), data.getName())); } else if (ho instanceof DatasetData) bus.post(new Browse(((DatasetData) ho).getId(), Browse.DATASET, root, browser.getRootID())); else if (ho instanceof ProjectData) bus.post(new Browse(((ProjectData) ho).getId(), Browse.PROJECT, root, browser.getRootID())); else if (ho instanceof CategoryData) bus.post(new Browse(((CategoryData) ho).getId(), Browse.CATEGORY, root, browser.getRootID())); else if (ho instanceof CategoryGroupData) bus.post(new Browse(((CategoryGroupData) ho).getId(), Browse.CATEGORY_GROUP, root, browser.getRootID())); }
public void execute() { Browser browser = model.getSelectedBrowser(); if (browser == null) return; Object ho; if (hierarchyObject != null) ho = hierarchyObject; else { TreeImageDisplay display = browser.getSelectedDisplay(); if (display == null) return; ho = display.getUserObject(); } EventBus bus = TreeViewerAgent.getRegistry().getEventBus(); Class root = convertRootLevel(browser.getRootLevel()); if (ho instanceof ImageData) { ImageData data = (ImageData) ho; bus.post(new LoadImage(data.getId(), data.getDefaultPixels().getId(), data.getName())); } else if (ho instanceof DatasetData) bus.post(new Browse(((DatasetData) ho).getId(), Browse.DATASET, root, browser.getRootID())); else if (ho instanceof ProjectData) bus.post(new Browse(((ProjectData) ho).getId(), Browse.PROJECT, root, browser.getRootID())); else if (ho instanceof CategoryData) bus.post(new Browse(((CategoryData) ho).getId(), Browse.CATEGORY, root, browser.getRootID())); else if (ho instanceof CategoryGroupData) bus.post(new Browse(((CategoryGroupData) ho).getId(), Browse.CATEGORY_GROUP, root, browser.getRootID())); }
3,227,854
public void execute() { Browser browser = model.getSelectedBrowser(); if (browser == null) return; Object ho; if (hierarchyObject != null) ho = hierarchyObject; else { TreeImageDisplay display = browser.getSelectedDisplay(); if (display == null) return; ho = display.getUserObject(); } EventBus bus = TreeViewerAgent.getRegistry().getEventBus(); Class root = convertRootLevel(browser.getRootLevel()); if (ho instanceof ImageData) { ImageData data = (ImageData) ho; bus.post(new LoadImage(data.getId(), data.getDefaultPixels().getId(), data.getName())); } else if (ho instanceof DatasetData) bus.post(new Browse(((DatasetData) ho).getId(), Browse.DATASET, root, browser.getRootID())); else if (ho instanceof ProjectData) bus.post(new Browse(((ProjectData) ho).getId(), Browse.PROJECT, root, browser.getRootID())); else if (ho instanceof CategoryData) bus.post(new Browse(((CategoryData) ho).getId(), Browse.CATEGORY, root, browser.getRootID())); else if (ho instanceof CategoryGroupData) bus.post(new Browse(((CategoryGroupData) ho).getId(), Browse.CATEGORY_GROUP, root, browser.getRootID())); }
public void execute() { Browser browser = model.getSelectedBrowser(); if (browser == null) return; Object ho; if (hierarchyObject != null) ho = hierarchyObject; else { TreeImageDisplay display = browser.getSelectedDisplay(); if (display == null) return; ho = display.getUserObject(); } EventBus bus = TreeViewerAgent.getRegistry().getEventBus(); Class root = convertRootLevel(browser.getRootLevel()); if (ho instanceof ImageData) { ImageData data = (ImageData) ho; bus.post(new LoadImage(data.getId(), data.getDefaultPixels().getId(), data.getName())); } else if (ho instanceof DatasetData) bus.post(new Browse(((DatasetData) ho).getId(), Browse.DATASET, root, browser.getRootID())); else if (ho instanceof ProjectData) bus.post(new Browse(((ProjectData) ho).getId(), Browse.PROJECT, root, browser.getRootID())); else if (ho instanceof CategoryData) bus.post(new Browse(((CategoryData) ho).getId(), Browse.CATEGORY, root, browser.getRootID())); else if (ho instanceof CategoryGroupData) bus.post(new Browse(((CategoryGroupData) ho).getId(), Browse.CATEGORY_GROUP, root, browser.getRootID())); }
3,227,855
public DataObjectCreator(Editor viewer, DataObject userObject, Object parent) { super(viewer); if (userObject == null) throw new IllegalArgumentException("No object to create."); if (parent == null) throw new IllegalArgumentException("No parent."); this.parent = parent; this.userObject = userObject; }
public DataObjectCreator(Editor viewer, DataObject userObject, Object parent) { super(viewer); if (userObject == null) throw new IllegalArgumentException("No object to create."); if (parent == null) throw new IllegalArgumentException("No parent."); this.parent = parent; this.userObject = userObject; }
3,227,856
public List childNodes() { return Collections.EMPTY_LIST; }
public List childNodes() { return EMPTY_LIST; }
3,227,857
protected QuantumStrategy(QuantumDef qd, PixelsType pt) { windowStart = globalMin = 0.0; windowEnd = globalMax = 1.0; family = QuantumFactory.LINEAR; curveCoefficient = 1.0; if (qd == null) throw new NullPointerException("No quantum definition"); this.qDef = qd; if (pt == null) throw new NullPointerException("No pixel type"); this.type = pt; }
protected QuantumStrategy(QuantumDef qd, PixelsType pt) { windowStart = globalMin = 0.0; windowEnd = globalMax = 1.0; family = QuantumFactory.getFamily(QuantumFactory.LINEAR); curveCoefficient = 1.0; if (qd == null) throw new NullPointerException("No quantum definition"); this.qDef = qd; if (pt == null) throw new NullPointerException("No pixel type"); this.type = pt; }
3,227,858
private void defineMapper(int family) { verifyFamily(family); switch (family) { case QuantumFactory.LINEAR: case QuantumFactory.POLYNOMIAL: valueMapper = new PolynomialMap(); break; case QuantumFactory.LOGARITHMIC: valueMapper = new LogarithmicMap(); break; case QuantumFactory.EXPONENTIAL: valueMapper = new ExponentialMap(); break; default: // never reached: verify throws exception. } }
private void defineMapper(Family family) { verifyFamily(family); switch (family) { case QuantumFactory.LINEAR: case QuantumFactory.POLYNOMIAL: valueMapper = new PolynomialMap(); break; case QuantumFactory.LOGARITHMIC: valueMapper = new LogarithmicMap(); break; case QuantumFactory.EXPONENTIAL: valueMapper = new ExponentialMap(); break; default: // never reached: verify throws exception. } }
3,227,859
private void defineMapper(int family) { verifyFamily(family); switch (family) { case QuantumFactory.LINEAR: case QuantumFactory.POLYNOMIAL: valueMapper = new PolynomialMap(); break; case QuantumFactory.LOGARITHMIC: valueMapper = new LogarithmicMap(); break; case QuantumFactory.EXPONENTIAL: valueMapper = new ExponentialMap(); break; default: // never reached: verify throws exception. } }
private void defineMapper(int family) { verifyFamily(family); switch (family) { case QuantumFactory.LINEAR: case QuantumFactory.POLYNOMIAL: valueMapper = new PolynomialMap(); break; case QuantumFactory.LOGARITHMIC: valueMapper = new LogarithmicMap(); break; case QuantumFactory.EXPONENTIAL: valueMapper = new ExponentialMap(); break; default: // never reached: verify throws exception. } }
3,227,860
private void defineMapper(int family) { verifyFamily(family); switch (family) { case QuantumFactory.LINEAR: case QuantumFactory.POLYNOMIAL: valueMapper = new PolynomialMap(); break; case QuantumFactory.LOGARITHMIC: valueMapper = new LogarithmicMap(); break; case QuantumFactory.EXPONENTIAL: valueMapper = new ExponentialMap(); break; default: // never reached: verify throws exception. } }
private void defineMapper(int family) { verifyFamily(family); switch (family) { case QuantumFactory.LINEAR: case QuantumFactory.POLYNOMIAL: valueMapper = new PolynomialMap(); break; case QuantumFactory.LOGARITHMIC: valueMapper = new LogarithmicMap(); break; case QuantumFactory.EXPONENTIAL: valueMapper = new ExponentialMap(); break; default: // never reached: verify throws exception. } }
3,227,861
int getFamily() { return family; }
int getFamily() { return family; }
3,227,862
public void setMapping(int family, double k, boolean noiseReduction) { defineMapper(family); this.family = family; curveCoefficient = k; this.noiseReduction = noiseReduction; }
public void setMapping(Family family, double k, boolean noiseReduction) { defineMapper(family); this.family = family; curveCoefficient = k; this.noiseReduction = noiseReduction; }
3,227,863
public void setQuantizationMap(int family, double k, boolean noiseReduction) { setMapping(family, k, noiseReduction); onWindowChange(); }
public void setQuantizationMap(Family family, double k, boolean noiseReduction) { setMapping(family, k, noiseReduction); onWindowChange(); }
3,227,864
private static void verifyFamily(int family) { switch (family) { case QuantumFactory.LINEAR: case QuantumFactory.LOGARITHMIC: case QuantumFactory.EXPONENTIAL: case QuantumFactory.POLYNOMIAL: return; default: throw new IllegalArgumentException("Unsupported family type"); } }
private static void verifyFamily(String value) { switch (family) { case QuantumFactory.LINEAR: case QuantumFactory.LOGARITHMIC: case QuantumFactory.EXPONENTIAL: case QuantumFactory.POLYNOMIAL: return; default: throw new IllegalArgumentException("Unsupported family type"); } }
3,227,865
private static void verifyFamily(int family) { switch (family) { case QuantumFactory.LINEAR: case QuantumFactory.LOGARITHMIC: case QuantumFactory.EXPONENTIAL: case QuantumFactory.POLYNOMIAL: return; default: throw new IllegalArgumentException("Unsupported family type"); } }
private static void verifyFamily(int family) { switch (family) { case QuantumFactory.LINEAR: case QuantumFactory.LOGARITHMIC: case QuantumFactory.EXPONENTIAL: case QuantumFactory.POLYNOMIAL: return; default: throw new IllegalArgumentException("Unsupported family type"); } }
3,227,866
private void verifyInterval(double min, double max) { boolean b = false; if (min <= max) { double range = max-min; if (PixelTypeHelper.in(type, new String[] { "int8", "uint8" })) { if (range < 0x100) b = true; } else if (PixelTypeHelper.in(type, new String[] { "int16", "uint16" })) { if (range < 0x10000) b = true; } else if (PixelTypeHelper.in(type, new String[] { "int32", "uint32" })) { if (range < 0x100000000L) b = true; } else if (PixelTypeHelper.in(type, new String[] { "float", "double" })) b = true; } if (!b) throw new IllegalArgumentException("Pixel interval not supported"); }
private void verifyInterval(double min, double max) { boolean b = false; if (min <= max) { double range = max-min; if (PlaneFactory.in(type, new String[] { "int8", "uint8" })) { if (range < 0x100) b = true; } else if (PixelTypeHelper.in(type, new String[] { "int16", "uint16" })) { if (range < 0x10000) b = true; } else if (PixelTypeHelper.in(type, new String[] { "int32", "uint32" })) { if (range < 0x100000000L) b = true; } else if (PixelTypeHelper.in(type, new String[] { "float", "double" })) b = true; } if (!b) throw new IllegalArgumentException("Pixel interval not supported"); }
3,227,867
private void verifyInterval(double min, double max) { boolean b = false; if (min <= max) { double range = max-min; if (PixelTypeHelper.in(type, new String[] { "int8", "uint8" })) { if (range < 0x100) b = true; } else if (PixelTypeHelper.in(type, new String[] { "int16", "uint16" })) { if (range < 0x10000) b = true; } else if (PixelTypeHelper.in(type, new String[] { "int32", "uint32" })) { if (range < 0x100000000L) b = true; } else if (PixelTypeHelper.in(type, new String[] { "float", "double" })) b = true; } if (!b) throw new IllegalArgumentException("Pixel interval not supported"); }
private void verifyInterval(double min, double max) { boolean b = false; if (min <= max) { double range = max-min; if (PixelTypeHelper.in(type, new String[] { "int8", "uint8" })) { if (range < 0x100) b = true; } else if (PlaneFactory.in(type, new String[] { "int16", "uint16" })) { if (range < 0x10000) b = true; } else if (PlaneFactory.in(type, new String[] { "int32", "uint32" })) { if (range < 0x100000000L) b = true; } else if (PlaneFactory.in(type, new String[] { "float", "double" })) b = true; } if (!b) throw new IllegalArgumentException("Pixel interval not supported"); }
3,227,868
private void verifyInterval(double min, double max) { boolean b = false; if (min <= max) { double range = max-min; if (PixelTypeHelper.in(type, new String[] { "int8", "uint8" })) { if (range < 0x100) b = true; } else if (PixelTypeHelper.in(type, new String[] { "int16", "uint16" })) { if (range < 0x10000) b = true; } else if (PixelTypeHelper.in(type, new String[] { "int32", "uint32" })) { if (range < 0x100000000L) b = true; } else if (PixelTypeHelper.in(type, new String[] { "float", "double" })) b = true; } if (!b) throw new IllegalArgumentException("Pixel interval not supported"); }
private void verifyInterval(double min, double max) { boolean b = false; if (min <= max) { double range = max-min; if (PixelTypeHelper.in(type, new String[] { "int8", "uint8" })) { if (range < 0x100) b = true; } else if (PlaneFactory.in(type, new String[] { "int16", "uint16" })) { if (range < 0x10000) b = true; } else if (PlaneFactory.in(type, new String[] { "int32", "uint32" })) { if (range < 0x100000000L) b = true; } else if (PlaneFactory.in(type, new String[] { "float", "double" })) b = true; } if (!b) throw new IllegalArgumentException("Pixel interval not supported"); }
3,227,869
private void verifyInterval(double min, double max) { boolean b = false; if (min <= max) { double range = max-min; if (PixelTypeHelper.in(type, new String[] { "int8", "uint8" })) { if (range < 0x100) b = true; } else if (PixelTypeHelper.in(type, new String[] { "int16", "uint16" })) { if (range < 0x10000) b = true; } else if (PixelTypeHelper.in(type, new String[] { "int32", "uint32" })) { if (range < 0x100000000L) b = true; } else if (PixelTypeHelper.in(type, new String[] { "float", "double" })) b = true; } if (!b) throw new IllegalArgumentException("Pixel interval not supported"); }
private void verifyInterval(double min, double max) { boolean b = false; if (min <= max) { double range = max-min; if (PixelTypeHelper.in(type, new String[] { "int8", "uint8" })) { if (range < 0x100) b = true; } else if (PlaneFactory.in(type, new String[] { "int16", "uint16" })) { if (range < 0x10000) b = true; } else if (PlaneFactory.in(type, new String[] { "int32", "uint32" })) { if (range < 0x100000000L) b = true; } else if (PlaneFactory.in(type, new String[] { "float", "double" })) b = true; } if (!b) throw new IllegalArgumentException("Pixel interval not supported"); }
3,227,870
public Object saveState(FacesContext ctx) { Object values[] = new Object[2]; values[0] = super.saveState(ctx); values[1] = Boolean.valueOf(headlineAsLink); return values; }
public Object saveState(FacesContext ctx) { Object values[] = new Object[2]; values[0] = super.saveState(ctx); values[1] = Boolean.valueOf(headlineAsLink); return values; }
3,227,872
protected DataLoader createHierarchyLoader() { return new DatasetLoader(component, datasetsID); }
protected DataLoader createHierarchyLoader(boolean refresh) { return new DatasetLoader(component, datasetsID); }
3,227,874
protected DataLoader createHierarchyLoader() { return new DatasetLoader(component, datasetsID); }
protected DataLoader createHierarchyLoader() { return new DatasetLoader(component, datasetsID, refresh); }
3,227,875
final private void doRequest( HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { WebContext context = null; if (_problem != null) { init(); if (_problem != null) { try { resp.setContentType("text/html"); FastWriter out = getFastWriter(resp.getOutputStream(), resp.getCharacterEncoding()); out.write("<html><head><title>WebMacro Error</title></head>"); out.write("<body><h1><font color=\"red\">WebMacro Error: "); out.write("</font></h1><pre>"); out.write(_problem); out.write("</pre>"); out.write("Please contact the server administrator"); out.flush(); out.close(); } catch (Exception e) { _log.error(_problem, e); } return; } } boolean timing = false; try { context = newContext(req, resp); timing = Flags.PROFILE && context.isTiming(); if (timing) context.startTiming("WMServlet", req.getRequestURI()); Template t; try { if (timing) context.startTiming("handle"); t = handle(context); } finally { if (timing) context.stopTiming(); } if (t != null) { execute(t, context); } if (timing) context.startTiming("WMServlet.destroyContext()"); try { destroyContext(context); } finally { if (timing) context.stopTiming(); } } catch (HandlerException e) { if (context == null) { context = _wcPrototype.newInstance(req, resp); } _log.error("Your handler failed to handle the request:" + this, e); Template tmpl = error(context, "Your handler was unable to process the request successfully " + "for some reason. Here are the details:<p>" + "<pre>" + e + "</pre>"); execute(tmpl, context); } catch (Exception e) { if (context == null) { context = _wcPrototype.newInstance(req, resp); } _log.error("Your handler failed to handle the request:" + this, e); Template tmpl = error(context, "The handler WebMacro used to handle this request failed for " + "some reason. This is likely a bug in the handler written " + "for this application. Here are the details:<p>" + "<pre>" + e + "</pre>"); execute(tmpl, context); } finally { if (timing) context.stopTiming(); context.recycle(); } }
final private void doRequest( HttpServletRequest req, HttpServletResponse resp) throws IOException { WebContext context = null; if (_problem != null) { init(); if (_problem != null) { try { resp.setContentType("text/html"); FastWriter out = getFastWriter(resp.getOutputStream(), resp.getCharacterEncoding()); out.write("<html><head><title>WebMacro Error</title></head>"); out.write("<body><h1><font color=\"red\">WebMacro Error: "); out.write("</font></h1><pre>"); out.write(_problem); out.write("</pre>"); out.write("Please contact the server administrator"); out.flush(); out.close(); } catch (Exception e) { _log.error(_problem, e); } return; } } boolean timing = false; try { context = newContext(req, resp); timing = Flags.PROFILE && context.isTiming(); if (timing) context.startTiming("WMServlet", req.getRequestURI()); Template t; try { if (timing) context.startTiming("handle"); t = handle(context); } finally { if (timing) context.stopTiming(); } if (t != null) { execute(t, context); } if (timing) context.startTiming("WMServlet.destroyContext()"); try { destroyContext(context); } finally { if (timing) context.stopTiming(); } } catch (HandlerException e) { if (context == null) { context = _wcPrototype.newInstance(req, resp); } _log.error("Your handler failed to handle the request:" + this, e); Template tmpl = error(context, "Your handler was unable to process the request successfully " + "for some reason. Here are the details:<p>" + "<pre>" + e + "</pre>"); execute(tmpl, context); } catch (Exception e) { if (context == null) { context = _wcPrototype.newInstance(req, resp); } _log.error("Your handler failed to handle the request:" + this, e); Template tmpl = error(context, "The handler WebMacro used to handle this request failed for " + "some reason. This is likely a bug in the handler written " + "for this application. Here are the details:<p>" + "<pre>" + e + "</pre>"); execute(tmpl, context); } finally { if (timing) context.stopTiming(); context.recycle(); } }
3,227,876
public void write(String s) throws IOException { this.write(s,0,s.length()); }
public void write(int b) throws IOException { this.write(s,0,s.length()); }
3,227,877
public void write(String s) throws IOException { this.write(s,0,s.length()); }
public void write(String s) throws IOException { if ((_cpos + 1) > CSIZE) cflush(); _cbuf[_cpos] = (char) b; _cpos++; }
3,227,878
public IRubyObject method1(ThreadContext context, IRubyObject self, IRubyObject[] args) { return self.getRuntime().newString("tag:yaml.org,2002:map"); }
public IRubyObject method1(ThreadContext context, IRubyObject self, IRubyObject[] args) { String className = self.getType().getName(); if("Hash".equals(className)) { return self.getRuntime().newString("tag:yaml.org,2002:map"); } else { return self.getRuntime().newString("tag:yaml.org,2002:map:" + className); } }
3,227,880
public IRubyObject method9(ThreadContext context, IRubyObject self, IRubyObject[] args) { return self.getRuntime().newString("tag:yaml.org,2002:seq"); }
public IRubyObject method9(ThreadContext context, IRubyObject self, IRubyObject[] args) { String className = self.getType().getName(); if("Array".equals(className)) { return self.getRuntime().newString("tag:yaml.org,2002:seq"); } else { return self.getRuntime().newString("tag:yaml.org,2002:seq:" + className); } }
3,227,881
public IRubyObject method2(ThreadContext context, IRubyObject self, IRubyObject[] args) { //yaml_load_file IRubyObject io = self.getRuntime().getClass("File").callMethod(context,"open", args[0]); self.callMethod(context,"load", io); io.callMethod(context, "close"); return io; }
public IRubyObject method2(ThreadContext context, IRubyObject self, IRubyObject[] args) { //yaml_load_file IRubyObject io = self.getRuntime().getClass("File").callMethod(context,"open", args[0]); self.callMethod(context,"load", io); io.callMethod(context, "close"); return io; }
3,227,882
public IRubyObject method2(ThreadContext context, IRubyObject self, IRubyObject[] args) { //yaml_load_file IRubyObject io = self.getRuntime().getClass("File").callMethod(context,"open", args[0]); self.callMethod(context,"load", io); io.callMethod(context, "close"); return io; }
public IRubyObject method2(ThreadContext context, IRubyObject self, IRubyObject[] args) { //yaml_load_file IRubyObject io = self.getRuntime().getClass("File").callMethod(context,"open", args[0]); self.callMethod(context,"load", io); io.callMethod(context, "close"); return val; }
3,227,883
public static QuantumStrategy getStrategy(QuantumDef qd, PixelsType type) { verifyDef(qd, type); QuantumStrategy strg = null; strg = getQuantization(qd,type); if (strg == null) throw new IllegalArgumentException("Unsupported strategy"); return strg; }
public static QuantumStrategy getStrategy(QuantumDef qd, PixelsType type) { verifyDef(qd, type); QuantumStrategy strg = null; strg = getQuantization(qd,type); if (strg == null) throw new IllegalArgumentException("Unsupported strategy"); return strg; }
3,227,885
public static QuantumStrategy getStrategy(QuantumDef qd, PixelsType type) { verifyDef(qd, type); QuantumStrategy strg = null; strg = getQuantization(qd,type); if (strg == null) throw new IllegalArgumentException("Unsupported strategy"); return strg; }
public static QuantumStrategy getStrategy(QuantumDef qd, PixelsType type) { verifyDef(qd, type); QuantumStrategy strg = null; strg = getQuantization(qd,type, iPixels); if (strg == null) throw new IllegalArgumentException("Unsupported strategy"); return strg; }
3,227,886