bugged
stringlengths
6
599k
fixed
stringlengths
6
40.8M
__index_level_0__
int64
0
3.24M
public void actionPerformed(ActionEvent ae) { int datasetID = actionTarget.getDataset().getID(); String name = actionTarget.getDataset().getName(); agent.loadCategories(datasetID,name); }
public void actionPerformed(ActionEvent ae) { int datasetID = actionTarget.getDataset().getID(); String name = actionTarget.getDataset().getName(); agent.loadCategories(datasetID,name); }
3,237,365
public void itemStateChanged(ItemEvent e) { if(e.getStateChange() == ItemEvent.SELECTED) { PiccoloAction magnifierOnAction = PiccoloActionFactory.getMagnifyOnAction(actionTarget); magnifierOnAction.execute(); } else if(e.getStateChange() == ItemEvent.DESELECTED) { PiccoloAction magnifierOffAction = PiccoloActionFactory.getMagnifyOffAction(actionTarget); magnifierOffAction.execute(); } }
public void itemStateChanged(ItemEvent e) { if(e.getStateChange() == ItemEvent.DESELECTED) { PiccoloAction magnifierOnAction = PiccoloActionFactory.getMagnifyOnAction(actionTarget); magnifierOnAction.execute(); } else if(e.getStateChange() == ItemEvent.DESELECTED) { PiccoloAction magnifierOffAction = PiccoloActionFactory.getMagnifyOffAction(actionTarget); magnifierOffAction.execute(); } }
3,237,366
public void itemStateChanged(ItemEvent e) { if(e.getStateChange() == ItemEvent.SELECTED) { PiccoloAction magnifierOnAction = PiccoloActionFactory.getMagnifyOnAction(actionTarget); magnifierOnAction.execute(); } else if(e.getStateChange() == ItemEvent.DESELECTED) { PiccoloAction magnifierOffAction = PiccoloActionFactory.getMagnifyOffAction(actionTarget); magnifierOffAction.execute(); } }
public void itemStateChanged(ItemEvent e) { if(e.getStateChange() == ItemEvent.SELECTED) { PiccoloAction magnifierOnAction = PiccoloActionFactory.getMagnifyOnAction(actionTarget); magnifierOnAction.execute(); } else if(e.getStateChange() == ItemEvent.DESELECTED) { PiccoloAction magnifierOffAction = PiccoloActionFactory.getMagnifyOffAction(actionTarget); magnifierOffAction.execute(); } }
3,237,367
public void itemStateChanged(ItemEvent e) { if(e.getStateChange() == ItemEvent.SELECTED) { PiccoloAction magnifierOnAction = PiccoloActionFactory.getMagnifyOnAction(actionTarget); magnifierOnAction.execute(); } else if(e.getStateChange() == ItemEvent.DESELECTED) { PiccoloAction magnifierOffAction = PiccoloActionFactory.getMagnifyOffAction(actionTarget); magnifierOffAction.execute(); } }
public void itemStateChanged(ItemEvent e) { if(e.getStateChange() == ItemEvent.SELECTED) { PiccoloAction magnifierOnAction = PiccoloActionFactory.getMagnifyOnAction(actionTarget); magnifierOnAction.execute(); } else if(e.getStateChange() == ItemEvent.SELECTED) { PiccoloAction magnifierOffAction = PiccoloActionFactory.getMagnifyOffAction(actionTarget); magnifierOffAction.execute(); } }
3,237,368
public void itemStateChanged(ItemEvent e) { if(e.getStateChange() == ItemEvent.SELECTED) { PiccoloAction magnifierOnAction = PiccoloActionFactory.getMagnifyOnAction(actionTarget); magnifierOnAction.execute(); } else if(e.getStateChange() == ItemEvent.DESELECTED) { PiccoloAction magnifierOffAction = PiccoloActionFactory.getMagnifyOffAction(actionTarget); magnifierOffAction.execute(); } }
public void itemStateChanged(ItemEvent e) { if(e.getStateChange() == ItemEvent.SELECTED) { PiccoloAction magnifierOnAction = PiccoloActionFactory.getMagnifyOnAction(actionTarget); magnifierOnAction.execute(); } else if(e.getStateChange() == ItemEvent.DESELECTED) { PiccoloAction magnifierOffAction = PiccoloActionFactory.getMagnifyOffAction(actionTarget); magnifierOffAction.execute(); } }
3,237,369
public void actionPerformed(ActionEvent ae) { ColorMapManager manager = env.getColorMapManager(); ColorMapUI ui = manager.getUI(); ui.setClosable(true); ui.setIconifiable(true); ui.setResizable(false); ui.setMaximizable(false); if(!ui.isShowing()) { tf.addToDesktop(ui,TopFrame.PALETTE_LAYER); ui.show(); } else { try { ui.setSelected(true); } catch(PropertyVetoException ex) {} } }
public void actionPerformed(ActionEvent ae) { ColorMapManager manager = env.getColorMapManager(); ColorMapUI ui = manager.getUI(); ui.setClosable(true); ui.setIconifiable(true); ui.setResizable(false); ui.setMaximizable(false); if(!ui.isShowing()) { tf.addToDesktop(ui,TopFrame.PALETTE_LAYER); ui.show(); } else { try { ui.setSelected(true); } catch(PropertyVetoException ex) {} } }
3,237,370
public void itemStateChanged(ItemEvent e) { if(e.getStateChange() == ItemEvent.DESELECTED) { actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); } else if(e.getStateChange() == ItemEvent.SELECTED) { actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); } }
public void itemStateChanged(ItemEvent e) { if(e.getStateChange() == ItemEvent.DESELECTED) { actionTarget.removePaintMethod(PaintMethods.DRAW_WELLNO_METHOD, Thumbnail.FOREGROUND_PAINT_METHOD); } else if(e.getStateChange() == ItemEvent.SELECTED) { actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); } }
3,237,371
public void itemStateChanged(ItemEvent e) { if(e.getStateChange() == ItemEvent.DESELECTED) { actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); } else if(e.getStateChange() == ItemEvent.SELECTED) { actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); } }
public void itemStateChanged(ItemEvent e) { if(e.getStateChange() == ItemEvent.DESELECTED) { actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); } else if(e.getStateChange() == ItemEvent.SELECTED) { actionTarget.addPaintMethod(PaintMethods.DRAW_WELLNO_METHOD, Thumbnail.FOREGROUND_PAINT_METHOD); } }
3,237,372
public void itemStateChanged(ItemEvent e) { if(e.getStateChange() == ItemEvent.DESELECTED) { // TODO add multidimension paint method } else if(e.getStateChange() == ItemEvent.SELECTED) { // TODO add multidimension paint method } }
actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); publicactionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); voidactionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); itemStateChanged(ItemEventactionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); e)actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); {actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); if(e.getStateChange()actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); ==actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); ItemEvent.DESELECTED)actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); {actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); //actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); TODOactionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); addactionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); multidimensionactionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); paintactionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); methodactionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); }actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); elseactionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); if(e.getStateChange()actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); ==actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); ItemEvent.SELECTED)actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); {actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); //actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); TODOactionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); addactionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); multidimensionactionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); paintactionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); methodactionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); }actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); }
3,237,373
public void itemStateChanged(ItemEvent e) { if(e.getStateChange() == ItemEvent.DESELECTED) { // TODO add multidimension paint method } else if(e.getStateChange() == ItemEvent.SELECTED) { // TODO add multidimension paint method } }
actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); publicactionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); voidactionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); itemStateChanged(ItemEventactionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); e)actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); {actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); if(e.getStateChange()actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); ==actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); ItemEvent.DESELECTED)actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); {actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); //actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); TODOactionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); addactionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); multidimensionactionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); paintactionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); methodactionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); }actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); elseactionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); if(e.getStateChange()actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); ==actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); ItemEvent.SELECTED)actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); {actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); //actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); TODOactionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); addactionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); multidimensionactionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); paintactionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); methodactionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); }actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); }
3,237,374
public void loadCompositeImages() { BrowserEnvironment env = BrowserEnvironment.getInstance(); BrowserAgent agent = env.getBrowserAgent(); if(!multipleModeOn) { ThumbnailDataModel model = parentThumbnail.getModel(); Pixels pix = (Pixels)model.getAttributeMap().getAttribute("Pixels"); setImage(agent.getResizedThumbnail(pix,compositeWidth, compositeHeight)); setBounds(border); } else { ThumbnailDataModel[] models = parentThumbnail.getMultipleModels(); for(int i=0;i<models.length;i++) { Pixels pix = (Pixels)models[i].getAttributeMap().getAttribute("Pixels"); thumbnailImages[i] = agent.getResizedThumbnail(pix,compositeWidth, compositeHeight); } setImage(thumbnailImages[parentThumbnail.getMultipleImageIndex()]); setBounds(border); } repaint(); }
public void loadCompositeImages() { BrowserEnvironment env = BrowserEnvironment.getInstance(); BrowserAgent agent = env.getBrowserAgent(); if(!multipleModeOn) { ThumbnailDataModel model = parentThumbnail.getModel(); Pixels pix = (Pixels)model.getAttributeMap().getAttribute("Pixels"); setImage(agent.getResizedThumbnail(pix,compositeWidth, compositeHeight)); setBounds(border); } else { ThumbnailDataModel[] models = parentThumbnail.getMultipleModels(); for(int i=0;i<models.length;i++) { Pixels pix = (Pixels)models[i].getAttributeMap().getAttribute("Pixels"); thumbnailImages[i] = agent.getResizedThumbnail(pix,compositeWidth, compositeHeight); } setImage(thumbnailImages[parentThumbnail.getMultipleImageIndex()]); setBounds(border); } repaint(); }
3,237,375
void viewDataObject() { TreeImageDisplay d = getLastSelectedDisplay(); if (d == null) return; Object o = d.getUserObject(); if (o instanceof DataObject) { ViewCmd cmd = new ViewCmd(parent, (DataObject) o); cmd.execute(); } }
void viewDataObject() { TreeImageDisplay d = getLastSelectedDisplay(); if (d == null) return; Object o = d.getUserObject(); if (o instanceof ImageData) { ViewCmd cmd = new ViewCmd(parent, (DataObject) o); cmd.execute(); } }
3,237,376
public void mousePressed(MouseEvent me) { ThumbWinPopupMenu.hideMenu(); }
public void mousePressed(MouseEvent me) { ThumbWinPopupMenu.hideMenu(); }
3,237,377
public void mouseReleased(MouseEvent me) { if (me.isPopupTrigger()) { popupPoint = me.getPoint(); ThumbWinPopupMenu.showMenuFor(this); } }
public void mouseReleased(MouseEvent me) { if (me.isPopupTrigger()) { popupPoint = me.getPoint(); ThumbWinPopupMenu.showMenuFor(this); } }
3,237,378
public void initialize() { ProviderManager.addExtensionProvider("phone-event", "http://jivesoftware.com/xmlns/phone", new PhoneEventPacketExtensionProvider()); ProviderManager.addIQProvider("phone-action", "http://jivesoftware.com/xmlns/phone", new PhoneActionIQProvider()); final XMPPConnection con = SparkManager.getConnection(); SwingWorker worker = new SwingWorker() { public Object construct() { try { phoneClient = new PhoneClient(con); // Add BaseListener phoneClient.addEventListener(new PhoneListener()); } catch (Exception e) { // Ignore because the user does not have support. //Log.error(e); } return phoneClient; } public void finished() { if (phoneClient != null) { setupPhoneSystem(); } } }; worker.start(); }
Log.error(e); Log.error(e); Log.error(e); Log.error(e); publicLog.error(e); voidLog.error(e); initialize()Log.error(e); {Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); ProviderManager.addExtensionProvider("phone-event",Log.error(e); "http://jivesoftware.com/xmlns/phone",Log.error(e); newLog.error(e); PhoneEventPacketExtensionProvider());Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); ProviderManager.addIQProvider("phone-action",Log.error(e); "http://jivesoftware.com/xmlns/phone",Log.error(e); newLog.error(e); PhoneActionIQProvider());Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); finalLog.error(e); XMPPConnectionLog.error(e); conLog.error(e); =Log.error(e); SparkManager.getConnection();Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); SwingWorkerLog.error(e); workerLog.error(e); =Log.error(e); newLog.error(e); SwingWorker()Log.error(e); {Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); publicLog.error(e); ObjectLog.error(e); construct()Log.error(e); {Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); tryLog.error(e); {Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); phoneClientLog.error(e); =Log.error(e); newLog.error(e); PhoneClient(con);Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); //Log.error(e); AddLog.error(e); BaseListenerLog.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); phoneClient.addEventListener(newLog.error(e); PhoneListener());Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); }Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); catchLog.error(e); (ExceptionLog.error(e); e)Log.error(e); {Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); //Log.error(e); IgnoreLog.error(e); becauseLog.error(e); theLog.error(e); userLog.error(e); doesLog.error(e); notLog.error(e); haveLog.error(e); support.Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); //Log.error(e);Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); }Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); returnLog.error(e); phoneClient;Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); }Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); publicLog.error(e); voidLog.error(e); finished()Log.error(e); {Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); ifLog.error(e); (phoneClientLog.error(e); !=Log.error(e); null)Log.error(e); {Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); setupPhoneSystem();Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); }Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); }Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); };Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); worker.start();Log.error(e); Log.error(e); Log.error(e); Log.error(e); }
3,237,379
public Object construct() { try { phoneClient = new PhoneClient(con); // Add BaseListener phoneClient.addEventListener(new PhoneListener()); } catch (Exception e) { // Ignore because the user does not have support. //Log.error(e); } return phoneClient; }
Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); publicLog.error(e); ObjectLog.error(e); construct()Log.error(e); {Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); tryLog.error(e); {Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); phoneClientLog.error(e); =Log.error(e); newLog.error(e); PhoneClient(con);Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); //Log.error(e); AddLog.error(e); BaseListenerLog.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); phoneClient.addEventListener(newLog.error(e); PhoneListener());Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); }Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); catchLog.error(e); (ExceptionLog.error(e); e)Log.error(e); {Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); //Log.error(e); IgnoreLog.error(e); becauseLog.error(e); theLog.error(e); userLog.error(e); doesLog.error(e); notLog.error(e); haveLog.error(e); support.Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); //Log.error(e);Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); }Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); returnLog.error(e); phoneClient;Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); Log.error(e); }
3,237,380
public void actionPerformed(ActionEvent e) { String s = (String) e.getActionCommand(); try { int index = Integer.parseInt(s); switch (index) { case DM_VISIBLE: abstraction.activate(); break; case PROJECT_ITEM: createProject(); break; case DATASET_ITEM: createDataset(); break; }// end switch } catch(NumberFormatException nfe) { //impossible if IDs are set correctly throw nfe; //just to be on the safe side... } }
public void actionPerformed(ActionEvent e) { String s = (String) e.getActionCommand(); try { int index = Integer.parseInt(s); switch (index) { case DM_VISIBLE: abstraction.activate(); break; case PROJECT_ITEM: createProject(); break; case DATASET_ITEM: createDataset(); break; }// end switch } catch(NumberFormatException nfe) { //impossible if IDs are set correctly throw nfe; //just to be on the safe side... } }
3,237,381
public List<AccountItem> getAccounts() { List<AccountItem> list = new ArrayList<AccountItem>(); for (Transport transport : TransportManager.getTransports()) { if (TransportManager.isRegistered(SparkManager.getConnection(), transport)) { AccountItem item = new AccountItem(transport.getIcon(), transport.getName(), transport); list.add(item); } } return list; }
public List<AccountItem> getAccounts() { List<AccountItem> list = new ArrayList<AccountItem>(); for (Transport transport : TransportManager.getTransports()) { if (TransportManager.isRegistered(SparkManager.getConnection(), transport)) { AccountItem item = new AccountItem(transport.getIcon(), transport.getName(), transport); list.add(item); } } return list; }
3,237,383
public void onDataObjectSave(DataObject data, int operation) { int state = model.getState(); if (operation == REMOVE_OBJECT && state != SAVE) throw new IllegalStateException("This method can only be " + "invoked in the SAVE state"); switch (state) { case DISCARDED: throw new IllegalStateException("This method cannot be " + "invoked in the DISCARDED state"); } if (data == null) throw new IllegalArgumentException("No data object. "); switch (operation) { case CREATE_OBJECT: case UPDATE_OBJECT: case REMOVE_OBJECT: break; default: throw new IllegalArgumentException("Save operation not " + "supported."); } //int editor = model.getEditorType(); //removeEditor(); //remove the currently selected editor. if (operation == REMOVE_OBJECT) { model.setState(READY); fireStateChange(); } view.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); Browser browser = model.getSelectedBrowser(); browser.refreshEdition(data, operation); if (operation == UPDATE_OBJECT) { Map browsers = model.getBrowsers(); Iterator i = browsers.keySet().iterator(); while (i.hasNext()) { browser = (Browser) browsers.get(i.next()); if (!(browser.equals(model.getSelectedBrowser()))) browser.refreshEdition(data, operation); } } //onComponentStateChange(true); // if (editor == CREATE_EDITOR) { onSelectedDisplay(); // } setStatus(false, "", true); view.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR)); }
public void onDataObjectSave(DataObject data, int operation) { int state = model.getState(); if (operation == REMOVE_OBJECT && state != SAVE) throw new IllegalStateException("This method can only be " + "invoked in the SAVE state"); switch (state) { case DISCARDED: throw new IllegalStateException("This method cannot be " + "invoked in the DISCARDED state"); } model.setEditor(null); if (data == null) throw new IllegalArgumentException("No data object. "); switch (operation) { case CREATE_OBJECT: case UPDATE_OBJECT: case REMOVE_OBJECT: break; default: throw new IllegalArgumentException("Save operation not " + "supported."); } model.setEditor(null); //int editor = model.getEditorType(); //removeEditor(); //remove the currently selected editor. if (operation == REMOVE_OBJECT) { model.setState(READY); fireStateChange(); } model.setEditor(null); view.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); Browser browser = model.getSelectedBrowser(); browser.refreshEdition(data, operation); if (operation == UPDATE_OBJECT) { Map browsers = model.getBrowsers(); Iterator i = browsers.keySet().iterator(); while (i.hasNext()) { browser = (Browser) browsers.get(i.next()); if (!(browser.equals(model.getSelectedBrowser()))) browser.refreshEdition(data, operation); } model.setEditor(null); } model.setEditor(null); //onComponentStateChange(true); // if (editor == CREATE_EDITOR) { onSelectedDisplay(); // } model.setEditor(null); setStatus(false, "", true); view.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR)); }
3,237,384
public void start() { super.start(); try { final PipedInputStream pipeIn = new PipedInputStream(); final PipedOutputStream out = new PipedOutputStream(pipeIn); final PipedInputStream in = new PipedInputStream(); final PipedOutputStream pipeOut = new PipedOutputStream(in); final IRuby runtime = Ruby.newInstance(pipeIn, new PrintStream(pipeOut), new PrintStream(pipeOut), false); runtime.defineGlobalConstant("ARGV", runtime.newArray(new IRubyObject[] { runtime.newString("-f"), runtime.newString("--noreadline"), runtime.newString("--prompt-mode"), runtime.newString("simple") })); runtime.getLoadService().init(new ArrayList(0)); final JTextArea text = new JTextArea(); text.setLineWrap(true); text.setWrapStyleWord(false); text.setEditable(false); text.getCaret().setBlinkRate(500); text.setCaretColor(Color.GRAY); text.setBackground(Color.WHITE); text.setForeground(Color.GRAY); final JScrollPane pane = new JScrollPane(); pane.setViewportView(text); add(pane); pane.setPreferredSize(getSize()); this.validate(); Thread t = new Thread() { public void run() { byte[] buffer = new byte[256]; try { while (true) { int len = in.read(buffer); text.append(new String(buffer, 0, len)); text.setCaretPosition(text.getText().length()); } } catch (IOException ioe) { ioe.printStackTrace(); } } }; t.start(); text.addKeyListener(new KeyListener() { StringBuffer line = new StringBuffer(); public void keyPressed(KeyEvent e) { text.getCaret().setVisible(true); } public void keyReleased(KeyEvent e) { text.getCaret().setVisible(true); } public void keyTyped(KeyEvent e) { switch (e.getKeyChar()) { case 8: if (line.length() > 0) { text.setText(text.getText().substring(0, text.getText().length() - 1)); line.setLength(line.length() - 1); } break; case 10: try { text.append("\n"); out.write(line.append("\n").toString().getBytes()); Thread.yield(); } catch (IOException ioe) { ioe.printStackTrace(); } line.setLength(0); break; default: text.append(String.valueOf(e.getKeyChar())); line.append(String.valueOf(e.getKeyChar())); } text.setCaretPosition(text.getText().length()); text.getCaret().setVisible(true); } }); text.addMouseListener(new MouseListener() { public void mouseClicked(MouseEvent e) { text.setCaretPosition(text.getText().length()); text.getCaret().setVisible(true); } public void mouseEntered(MouseEvent e) { } public void mouseExited(MouseEvent e) { } public void mousePressed(MouseEvent e) { } public void mouseReleased(MouseEvent e) { text.getCaret().setVisible(true); } }); text.append("*** Welcome to Ruby for the Web! ***\n"); text.getDocument().addDocumentListener(new DocumentListener() { public void changedUpdate(DocumentEvent e) { text.setCaretPosition(text.getText().length()); text.getCaret().setVisible(true); } public void insertUpdate(DocumentEvent e) { text.setCaretPosition(text.getText().length()); text.getCaret().setVisible(true); } public void removeUpdate(DocumentEvent e) { text.setCaretPosition(text.getText().length()); text.getCaret().setVisible(true); } }); Thread t2 = new Thread() { public void run() { runtime.evalScript("require 'irb'; IRB.start"); } }; t2.start(); } catch (IOException ioe) { ioe.printStackTrace(); } }
public void start() { super.start(); try { final PipedInputStream pipeIn = new PipedInputStream(); final PipedOutputStream out = new PipedOutputStream(pipeIn); final PipedInputStream in = new PipedInputStream(); final PipedOutputStream pipeOut = new PipedOutputStream(in); final IRuby runtime = Ruby.newInstance(pipeIn, new PrintStream(pipeOut), new PrintStream(pipeOut), false); runtime.defineGlobalConstant("ARGV", runtime.newArray(new IRubyObject[] { runtime.newString("-f"), runtime.newString("--noreadline"), runtime.newString("--prompt-mode"), runtime.newString("simple") })); runtime.getLoadService().init(new ArrayList(0)); final JTextArea text = new JTextArea(); text.setLineWrap(true); text.setWrapStyleWord(false); text.setEditable(false); text.getCaret().setBlinkRate(500); text.setCaretColor(Color.GRAY); text.setBackground(Color.WHITE); text.setForeground(Color.GRAY); final JScrollPane pane = new JScrollPane(); pane.setViewportView(text); add(pane); pane.setPreferredSize(getSize()); this.validate(); Thread t = new Thread() { public void run() { byte[] buffer = new byte[256]; try { while (true) { int len = in.read(buffer); text.append(new String(buffer, 0, len)); text.setCaretPosition(text.getText().length()); } } catch (IOException ioe) { ioe.printStackTrace(); } } }; t.start(); text.addKeyListener(new KeyListener() { StringBuffer line = new StringBuffer(); public void keyPressed(KeyEvent e) { text.getCaret().setVisible(true); } public void keyReleased(KeyEvent e) { text.getCaret().setVisible(true); } public void keyTyped(KeyEvent e) { switch (e.getKeyChar()) { case 8: if (line.length() > 0) { text.setText(text.getText().substring(0, text.getText().length() - 1)); line.setLength(line.length() - 1); } break; case 10: try { text.append("\n"); out.write(line.append("\n").toString().getBytes()); Thread.yield(); } catch (IOException ioe) { ioe.printStackTrace(); } line.setLength(0); break; default: text.append(String.valueOf(e.getKeyChar())); line.append(String.valueOf(e.getKeyChar())); } text.setCaretPosition(text.getText().length()); text.getCaret().setVisible(true); } }); text.addMouseListener(new MouseListener() { public void mouseClicked(MouseEvent e) { text.setCaretPosition(text.getText().length()); text.getCaret().setVisible(true); } public void mouseEntered(MouseEvent e) { } public void mouseExited(MouseEvent e) { } public void mousePressed(MouseEvent e) { } public void mouseReleased(MouseEvent e) { text.getCaret().setVisible(true); } }); text.append("*** Welcome to Ruby for the Web! ***\n"); text.getDocument().addDocumentListener(new DocumentListener() { public void changedUpdate(DocumentEvent e) { text.setCaretPosition(text.getText().length()); text.getCaret().setVisible(true); } public void insertUpdate(DocumentEvent e) { text.setCaretPosition(text.getText().length()); text.getCaret().setVisible(true); } public void removeUpdate(DocumentEvent e) { text.setCaretPosition(text.getText().length()); text.getCaret().setVisible(true); } }); Thread t2 = new Thread() { public void run() { runtime.evalScript("require 'irb'; IRB.start"); } }; t2.start(); } catch (IOException ioe) { ioe.printStackTrace(); } }
3,237,386
public void run() { byte[] buffer = new byte[256]; try { while (true) { int len = in.read(buffer); text.append(new String(buffer, 0, len)); text.setCaretPosition(text.getText().length()); } } catch (IOException ioe) { ioe.printStackTrace(); } }
public void run() { byte[] buffer = new byte[256]; try { while (true) { int len = in.read(buffer); text.append(new String(buffer, 0, len)); text.setCaretPosition(text.getText().length()); } } catch (IOException ioe) { ioe.printStackTrace(); } }
3,237,387
private DatasetsAddTableModel() { DatasetData ds; for (int i = 0; i < datasets.length; i++) { ds = (DatasetData) datasets[i]; data[i][0] = ds.getName(); data[i][1] = new Boolean(dats.contains(ds)); } }
private DatasetsAddTableModel() { DatasetData ds; for (int i = 0; i < datasets.length; i++) { ds = (DatasetData) datasets[i]; data[i][0] = ds.getName(); data[i][1] = new Boolean(dats.contains(ds)); } }
3,237,388
public void mouseDragged(MouseEvent evt) { if (dragging == false) return; int x = Math.min(evt.getX(), getSize().width - 1); x = Math.max(x, 0); int y = Math.min(evt.getY(), getSize().height - 1); y = Math.max(y, 0); paintComponent(g); Rectangle r = new Rectangle(Math.min(prevX, x), Math.min(prevY, y), Math.abs(x - prevX), Math.abs(y - prevY)); g.drawRect(r.x, r.y, r.width, r.height); Color c = new Color(228, 228, 205); g.setPaint(c); g.fill(r); g.setPaint(Color.BLACK); g.draw(r); rect = r; }
public void mouseDragged(MouseEvent evt) { if (dragging == false) return; int x = Math.min(evt.getX(), getSize().width - 1); x = Math.max(x, 0); int y = Math.min(evt.getY(), getSize().height - 1); y = Math.max(y, 0); paintComponent(g); Rectangle r = new Rectangle(Math.min(prevX, x), Math.min(prevY, y), Math.abs(x - prevX), Math.abs(y - prevY)); g.drawRect(r.x, r.y, r.width, r.height); Color c = new Color(228, 228, 205); g.setPaint(c); g.fill(r); g.setPaint(Color.BLACK); g.draw(r); rect = r; }
3,237,391
public void mouseReleased(MouseEvent evt) { if (dragging == false) return; dragging = false; g.dispose(); g = null; rectangles.add(rect); rect = null; }
public void mouseReleased(MouseEvent evt) { if (dragging == false) return; dragging = false; g.dispose(); g = null; rectangles.add(rect); rect = null; }
3,237,392
public void paintComponent(Graphics g) { // create the hardware accelerated image. createBackBuffer(); // Main rendering loop. Volatile images may lose their contents. // This loop will continually render to (and produce if neccessary) volatile images // until the rendering was completed successfully. do { // Validate the volatile image for the graphics configuration of this // component. If the volatile image doesn't apply for this graphics configuration // (in other words, the hardware acceleration doesn't apply for the new device) // then we need to re-create it. GraphicsConfiguration gc = this.getGraphicsConfiguration(); int valCode = volatileImg.validate(gc); // This means the device doesn't match up to this hardware accelerated image. if (valCode == VolatileImage.IMAGE_INCOMPATIBLE) { createBackBuffer(); // recreate the hardware accelerated image. } Graphics2D offscreenGraphics = (Graphics2D) volatileImg .getGraphics(); render(getWidth(), getHeight(), offscreenGraphics); // call core paint method. // paint back buffer to main graphics g.drawImage(volatileImg, 0, 0, this); // Test if content is lost } while (volatileImg.contentsLost()); }
public void paintComponent(Graphics g) { // create the hardware accelerated image. createBackBuffer(); // Main rendering loop. Volatile images may lose their contents. // This loop will continually render to (and produce if neccessary) volatile images // until the rendering was completed successfully. do { // Validate the volatile image for the graphics configuration of this // component. If the volatile image doesn't apply for this graphics configuration // (in other words, the hardware acceleration doesn't apply for the new device) // then we need to re-create it. GraphicsConfiguration gc = this.getGraphicsConfiguration(); int valCode = volatileImg.validate(gc); // This means the device doesn't match up to this hardware accelerated image. if (valCode == VolatileImage.IMAGE_INCOMPATIBLE) { createBackBuffer(); // recreate the hardware accelerated image. } Graphics2D offscreenGraphics = (Graphics2D) volatileImg .getGraphics(); render(getWidth(), getHeight(), offscreenGraphics); // call core paint method. // paint back buffer to main graphics g.drawImage(volatileImg, 0, 0, this); // Test if content is lost } while (volatileImg.contentsLost()); }
3,237,393
public void paintComponent(Graphics g) { // create the hardware accelerated image. createBackBuffer(); // Main rendering loop. Volatile images may lose their contents. // This loop will continually render to (and produce if neccessary) volatile images // until the rendering was completed successfully. do { // Validate the volatile image for the graphics configuration of this // component. If the volatile image doesn't apply for this graphics configuration // (in other words, the hardware acceleration doesn't apply for the new device) // then we need to re-create it. GraphicsConfiguration gc = this.getGraphicsConfiguration(); int valCode = volatileImg.validate(gc); // This means the device doesn't match up to this hardware accelerated image. if (valCode == VolatileImage.IMAGE_INCOMPATIBLE) { createBackBuffer(); // recreate the hardware accelerated image. } Graphics2D offscreenGraphics = (Graphics2D) volatileImg .getGraphics(); render(getWidth(), getHeight(), offscreenGraphics); // call core paint method. // paint back buffer to main graphics g.drawImage(volatileImg, 0, 0, this); // Test if content is lost } while (volatileImg.contentsLost()); }
public void paintComponent(Graphics g) { // create the hardware accelerated image. createBackBuffer(); // Main rendering loop. Volatile images may lose their contents. // This loop will continually render to (and produce if neccessary) volatile images // until the rendering was completed successfully. do { // Validate the volatile image for the graphics configuration of this // component. If the volatile image doesn't apply for this graphics configuration // (in other words, the hardware acceleration doesn't apply for the new device) // then we need to re-create it. GraphicsConfiguration gc = this.getGraphicsConfiguration(); int valCode = volatileImg.validate(gc); // This means the device doesn't match up to this hardware accelerated image. if (valCode == VolatileImage.IMAGE_INCOMPATIBLE) { createBackBuffer(); // recreate the hardware accelerated image. } Graphics2D offscreenGraphics = (Graphics2D) volatileImg .getGraphics(); render(getWidth(), getHeight(), offscreenGraphics); // call core paint method. // paint back buffer to main graphics g.drawImage(volatileImg, 0, 0, this); // Test if content is lost } while (volatileImg.contentsLost()); }
3,237,394
public void paintComponent(Graphics g) { // create the hardware accelerated image. createBackBuffer(); // Main rendering loop. Volatile images may lose their contents. // This loop will continually render to (and produce if neccessary) volatile images // until the rendering was completed successfully. do { // Validate the volatile image for the graphics configuration of this // component. If the volatile image doesn't apply for this graphics configuration // (in other words, the hardware acceleration doesn't apply for the new device) // then we need to re-create it. GraphicsConfiguration gc = this.getGraphicsConfiguration(); int valCode = volatileImg.validate(gc); // This means the device doesn't match up to this hardware accelerated image. if (valCode == VolatileImage.IMAGE_INCOMPATIBLE) { createBackBuffer(); // recreate the hardware accelerated image. } Graphics2D offscreenGraphics = (Graphics2D) volatileImg .getGraphics(); render(getWidth(), getHeight(), offscreenGraphics); // call core paint method. // paint back buffer to main graphics g.drawImage(volatileImg, 0, 0, this); // Test if content is lost } while (volatileImg.contentsLost()); }
public void paintComponent(Graphics g) { // create the hardware accelerated image. createBackBuffer(); // Main rendering loop. Volatile images may lose their contents. // This loop will continually render to (and produce if neccessary) volatile images // until the rendering was completed successfully. do { // Validate the volatile image for the graphics configuration of this // component. If the volatile image doesn't apply for this graphics configuration // (in other words, the hardware acceleration doesn't apply for the new device) // then we need to re-create it. GraphicsConfiguration gc = this.getGraphicsConfiguration(); int valCode = volatileImg.validate(gc); // This means the device doesn't match up to this hardware accelerated image. if (valCode == VolatileImage.IMAGE_INCOMPATIBLE) { createBackBuffer(); // recreate the hardware accelerated image. } Graphics2D offscreenGraphics = (Graphics2D) volatileImg .getGraphics(); render(getWidth(), getHeight(), offscreenGraphics); // call core paint method. // paint back buffer to main graphics g.drawImage(volatileImg, 0, 0, this); // Test if content is lost } while (volatileImg.contentsLost()); }
3,237,395
public void paintComponent(Graphics g) { // create the hardware accelerated image. createBackBuffer(); // Main rendering loop. Volatile images may lose their contents. // This loop will continually render to (and produce if neccessary) volatile images // until the rendering was completed successfully. do { // Validate the volatile image for the graphics configuration of this // component. If the volatile image doesn't apply for this graphics configuration // (in other words, the hardware acceleration doesn't apply for the new device) // then we need to re-create it. GraphicsConfiguration gc = this.getGraphicsConfiguration(); int valCode = volatileImg.validate(gc); // This means the device doesn't match up to this hardware accelerated image. if (valCode == VolatileImage.IMAGE_INCOMPATIBLE) { createBackBuffer(); // recreate the hardware accelerated image. } Graphics2D offscreenGraphics = (Graphics2D) volatileImg .getGraphics(); render(getWidth(), getHeight(), offscreenGraphics); // call core paint method. // paint back buffer to main graphics g.drawImage(volatileImg, 0, 0, this); // Test if content is lost } while (volatileImg.contentsLost()); }
public void paintComponent(Graphics g) { // create the hardware accelerated image. createBackBuffer(); // Main rendering loop. Volatile images may lose their contents. // This loop will continually render to (and produce if neccessary) volatile images // until the rendering was completed successfully. do { // Validate the volatile image for the graphics configuration of this // component. If the volatile image doesn't apply for this graphics configuration // (in other words, the hardware acceleration doesn't apply for the new device) // then we need to re-create it. GraphicsConfiguration gc = this.getGraphicsConfiguration(); int valCode = volatileImg.validate(gc); // This means the device doesn't match up to this hardware accelerated image. if (valCode == VolatileImage.IMAGE_INCOMPATIBLE) { createBackBuffer(); // recreate the hardware accelerated image. } Graphics2D offscreenGraphics = (Graphics2D) volatileImg .getGraphics(); render(getWidth(), getHeight(), offscreenGraphics); // call core paint method. // paint back buffer to main graphics g.drawImage(volatileImg, 0, 0, this); // Test if content is lost } while (volatileImg.contentsLost()); }
3,237,396
public void paintComponent(Graphics g) { // create the hardware accelerated image. createBackBuffer(); // Main rendering loop. Volatile images may lose their contents. // This loop will continually render to (and produce if neccessary) volatile images // until the rendering was completed successfully. do { // Validate the volatile image for the graphics configuration of this // component. If the volatile image doesn't apply for this graphics configuration // (in other words, the hardware acceleration doesn't apply for the new device) // then we need to re-create it. GraphicsConfiguration gc = this.getGraphicsConfiguration(); int valCode = volatileImg.validate(gc); // This means the device doesn't match up to this hardware accelerated image. if (valCode == VolatileImage.IMAGE_INCOMPATIBLE) { createBackBuffer(); // recreate the hardware accelerated image. } Graphics2D offscreenGraphics = (Graphics2D) volatileImg .getGraphics(); render(getWidth(), getHeight(), offscreenGraphics); // call core paint method. // paint back buffer to main graphics g.drawImage(volatileImg, 0, 0, this); // Test if content is lost } while (volatileImg.contentsLost()); }
public void paintComponent(Graphics g) { // create the hardware accelerated image. createBackBuffer(); // Main rendering loop. Volatile images may lose their contents. // This loop will continually render to (and produce if neccessary) volatile images // until the rendering was completed successfully. do { // Validate the volatile image for the graphics configuration of this // component. If the volatile image doesn't apply for this graphics configuration // (in other words, the hardware acceleration doesn't apply for the new device) // then we need to re-create it. GraphicsConfiguration gc = this.getGraphicsConfiguration(); int valCode = volatileImg.validate(gc); // This means the device doesn't match up to this hardware accelerated image. if (valCode == VolatileImage.IMAGE_INCOMPATIBLE) { createBackBuffer(); // recreate the hardware accelerated image. } Graphics2D offscreenGraphics = (Graphics2D) volatileImg .getGraphics(); render(getWidth(), getHeight(), offscreenGraphics); // call core paint method. // paint back buffer to main graphics g.drawImage(volatileImg, 0, 0, this); // Test if content is lost } while (volatileImg.contentsLost()); }
3,237,397
public void update(Observable p, Object arg1) { constraints = ((QPRectanglePlacement) p).constraintGenerator.getConstraints(); paintComponent(getGraphics()); }
public void update(Observable p, Object arg1) { constraints = ((QPRectanglePlacement) p).constraintGenerator.getConstraints(); paintComponent(getGraphics()); }
3,237,398
private MainWindow(String title, ImageIcon icon) { // Initialize and dock the menus configureMenu(); // Add Workspace Container getContentPane().setLayout(new BorderLayout()); // Add menubar this.setJMenuBar(mainWindowBar); this.getContentPane().add(topBar, BorderLayout.NORTH); setTitle(title + " - " + SparkManager.getSessionManager().getUsername()); setIconImage(icon.getImage()); // Setup WindowListener to be the proxy to the actual window listener // which cannot normally be used outside of the Window component because // of protected access. addWindowListener(new WindowAdapter() { /** * This event fires when the window has become active. * * @param e WindowEvent is not used. */ public void windowActivated(WindowEvent e) { fireWindowActivated(); } /** * Invoked when a window is de-activated. */ public void windowDeactivated(WindowEvent e) { } /** * This event fires whenever a user minimizes the window * from the toolbar. * * @param e WindowEvent is not used. */ public void windowIconified(WindowEvent e) { } /** * This event fires when the application is closing. * This allows Plugins to do any persistence or other * work before exiting. * * @param e WindowEvent is never used. */ public void windowClosing(WindowEvent e) { setVisible(false); // Show confirmation about hiding. // SparkManager.getNotificationsEngine().confirmHidingIfNecessary(); } }); this.addWindowFocusListener(new MainWindowFocusListener()); }
private MainWindow(String title, ImageIcon icon) { // Initialize and dock the menus buildMenu(); // Add Workspace Container getContentPane().setLayout(new BorderLayout()); // Add menubar this.setJMenuBar(mainWindowBar); this.getContentPane().add(topBar, BorderLayout.NORTH); setTitle(title + " - " + SparkManager.getSessionManager().getUsername()); setIconImage(icon.getImage()); // Setup WindowListener to be the proxy to the actual window listener // which cannot normally be used outside of the Window component because // of protected access. addWindowListener(new WindowAdapter() { /** * This event fires when the window has become active. * * @param e WindowEvent is not used. */ public void windowActivated(WindowEvent e) { fireWindowActivated(); } /** * Invoked when a window is de-activated. */ public void windowDeactivated(WindowEvent e) { } /** * This event fires whenever a user minimizes the window * from the toolbar. * * @param e WindowEvent is not used. */ public void windowIconified(WindowEvent e) { } /** * This event fires when the application is closing. * This allows Plugins to do any persistence or other * work before exiting. * * @param e WindowEvent is never used. */ public void windowClosing(WindowEvent e) { setVisible(false); // Show confirmation about hiding. // SparkManager.getNotificationsEngine().confirmHidingIfNecessary(); } }); this.addWindowFocusListener(new MainWindowFocusListener()); }
3,237,399
public void run() { checkUpdate(false); }
public void run() { checkForUpdates(false); }
3,237,400
public void actionPerformed(ActionEvent actionEvent) { checkUpdate(true); }
public void actionPerformed(ActionEvent actionEvent) { checkForUpdates(true); }
3,237,401
public void logout(boolean sendStatus) { final XMPPConnection con = SparkManager.getConnection(); if (con.isConnected() && sendStatus) { final InputTextAreaDialog inputTextDialog = new InputTextAreaDialog(); String status = inputTextDialog.getInput("Status Message", "Let others know your current status or activity.", SparkRes.getImageIcon(SparkRes.USER1_MESSAGE_24x24), this); if (status != null) { Presence presence = new Presence(Presence.Type.unavailable); presence.setStatus(status); con.sendPacket(presence); } } // Set auto-login to false SettingsManager.getLocalPreferences().setAutoLogin(false); // Notify all MainWindowListeners try { fireWindowShutdown(); setVisible(false); } finally { final SwingWorker shutdownThread = new SwingWorker() { public Object construct() { try { Thread.sleep(10); } catch (InterruptedException e) { Log.error(e); } return true; } public void finished() { closeConnectionAndInvoke(); } }; shutdownThread.start(); } }
public void logout(boolean sendStatus) { final XMPPConnection con = SparkManager.getConnection(); if (con.isConnected() && sendStatus) { final InputTextAreaDialog inputTextDialog = new InputTextAreaDialog(); String status = inputTextDialog.getInput(Res.getString("title.status.message"), Res.getString("message.current.status"), SparkRes.getImageIcon(SparkRes.USER1_MESSAGE_24x24), this); if (status != null) { Presence presence = new Presence(Presence.Type.unavailable); presence.setStatus(status); con.sendPacket(presence); } } // Set auto-login to false SettingsManager.getLocalPreferences().setAutoLogin(false); // Notify all MainWindowListeners try { fireWindowShutdown(); setVisible(false); } finally { final SwingWorker shutdownThread = new SwingWorker() { public Object construct() { try { Thread.sleep(10); } catch (InterruptedException e) { Log.error(e); } return true; } public void finished() { closeConnectionAndInvoke(); } }; shutdownThread.start(); } }
3,237,402
public void create() { super.create(); delegate = (IPixels) applicationContext.getBean( IPixels.class.getName()); }
public void create() { super.create(); delegate = (IPixels) applicationContext.getBean( IPixels.class.getName()); }
3,237,404
public Object invoke( InvocationContext context ) throws Exception { return wrap( context, "&pixelsService" ); }
public Object invoke( InvocationContext context ) throws Exception { return wrap( context, IPixels.class ); }
3,237,405
void createUI() { createWheel(); createHSVSlider(); createAlphaSlider(); createAlphaTextbox(); JPanel container = new JPanel(); container.setLayout(new BoxLayout(container, BoxLayout.X_AXIS)); //setLayout(new FlowLayout()); container.add(wheel); container.add(UIUtilities.buildComponentPanel(HSVSlider)); // JPanel p = new JPanel(); GridBagConstraints c = new GridBagConstraints(); c.anchor = GridBagConstraints.WEST; c.weightx = 0.0; p.setLayout(new GridBagLayout()); p.add(alphaSlider, c); c.gridx = 1; p.add(alphaTextbox, c); setLayout(new BoxLayout(this, BoxLayout.Y_AXIS)); add(container); add(UIUtilities.buildComponentPanel(p)); }
void createUI() { createWheel(); createHSVSlider(); createAlphaSlider(); createAlphaTextbox(); JPanel container = new JPanel(); container.setLayout(new BoxLayout(container, BoxLayout.X_AXIS)); //setLayout(new FlowLayout()); container.add(wheel); container.add(UIUtilities.buildComponentPanel(HSVSlider)); // JPanel p = new JPanel(); GridBagConstraints c = new GridBagConstraints(); c.anchor = GridBagConstraints.WEST; c.weightx = 0.0; p.setLayout(new GridBagLayout()); p.add(alphaSlider, c); c.gridx = 1; p.add(alphaTextbox, c); setLayout(new BoxLayout(this, BoxLayout.Y_AXIS)); add(container); add(UIUtilities.buildComponentPanel(p)); }
3,237,407
void createUI() { createWheel(); createHSVSlider(); createAlphaSlider(); createAlphaTextbox(); JPanel container = new JPanel(); container.setLayout(new BoxLayout(container, BoxLayout.X_AXIS)); //setLayout(new FlowLayout()); container.add(wheel); container.add(UIUtilities.buildComponentPanel(HSVSlider)); // JPanel p = new JPanel(); GridBagConstraints c = new GridBagConstraints(); c.anchor = GridBagConstraints.WEST; c.weightx = 0.0; p.setLayout(new GridBagLayout()); p.add(alphaSlider, c); c.gridx = 1; p.add(alphaTextbox, c); setLayout(new BoxLayout(this, BoxLayout.Y_AXIS)); add(container); add(UIUtilities.buildComponentPanel(p)); }
void createUI() { createWheel(); createHSVSlider(); createAlphaSlider(); createAlphaTextbox(); JPanel container = new JPanel(); container.setLayout(new BoxLayout(container, BoxLayout.X_AXIS)); //setLayout(new FlowLayout()); container.add(wheel); container.add(UIUtilities.buildComponentPanel(HSVSlider)); // JPanel p = new JPanel(); GridBagConstraints c = new GridBagConstraints(); c.anchor = GridBagConstraints.WEST; c.weightx = 0.0; p.setLayout(new GridBagLayout()); p.add(alphaSlider, c); c.gridx = 1; p.add(alphaTextbox, c); setLayout(new BoxLayout(this, BoxLayout.Y_AXIS)); add(container); add(UIUtilities.buildComponentPanel(p)); }
3,237,408
public static IRubyObject new_float(IRubyObject recv, IRubyObject object) { return object.callMethod(recv.getRuntime().getCurrentContext(), "to_f"); }
public static IRubyObject new_float(IRubyObject recv, IRubyObject object) { if(object instanceof RubyString) { return RubyNumeric.str2fnum(recv.getRuntime(),(RubyString)object,true); } else { return object.callMethod(recv.getRuntime().getCurrentContext(), "to_f"); } }
3,237,409
public static IRubyObject new_integer(IRubyObject recv, IRubyObject object) { ThreadContext context = recv.getRuntime().getCurrentContext(); if(object instanceof RubyString) { String val = object.toString(); if(val.length() > 0 && val.charAt(0) == '0') { if(val.length() > 1) { if(val.charAt(1) == 'x') { return recv.getRuntime().newString(val.substring(2)).callMethod(context,"to_i", recv.getRuntime().newFixnum(16)); } else if(val.charAt(1) == 'b') { return recv.getRuntime().newString(val.substring(2)).callMethod(context,"to_i", recv.getRuntime().newFixnum(2)); } else { return recv.getRuntime().newString(val.substring(1)).callMethod(context,"to_i", recv.getRuntime().newFixnum(8)); } } } } return object.callMethod(context, "to_i"); }
public static IRubyObject new_integer(IRubyObject recv, IRubyObject object) { ThreadContext context = recv.getRuntime().getCurrentContext(); if(object instanceof RubyString) { String val = object.toString(); if(val.length() > 0 && val.charAt(0) == '0') { if(val.length() > 1) { if(val.charAt(1) == 'x') { return RubyNumeric.str2inum(recv.getRuntime(),recv.getRuntime().newString(val.substring(2)),16,true); } else if(val.charAt(1) == 'b') { return recv.getRuntime().newString(val.substring(2)).callMethod(context,"to_i", recv.getRuntime().newFixnum(2)); } else { return recv.getRuntime().newString(val.substring(1)).callMethod(context,"to_i", recv.getRuntime().newFixnum(8)); } } } } return object.callMethod(context, "to_i"); }
3,237,410
public static IRubyObject new_integer(IRubyObject recv, IRubyObject object) { ThreadContext context = recv.getRuntime().getCurrentContext(); if(object instanceof RubyString) { String val = object.toString(); if(val.length() > 0 && val.charAt(0) == '0') { if(val.length() > 1) { if(val.charAt(1) == 'x') { return recv.getRuntime().newString(val.substring(2)).callMethod(context,"to_i", recv.getRuntime().newFixnum(16)); } else if(val.charAt(1) == 'b') { return recv.getRuntime().newString(val.substring(2)).callMethod(context,"to_i", recv.getRuntime().newFixnum(2)); } else { return recv.getRuntime().newString(val.substring(1)).callMethod(context,"to_i", recv.getRuntime().newFixnum(8)); } } } } return object.callMethod(context, "to_i"); }
public static IRubyObject new_integer(IRubyObject recv, IRubyObject object) { ThreadContext context = recv.getRuntime().getCurrentContext(); if(object instanceof RubyString) { String val = object.toString(); if(val.length() > 0 && val.charAt(0) == '0') { if(val.length() > 1) { if(val.charAt(1) == 'x') { return recv.getRuntime().newString(val.substring(2)).callMethod(context,"to_i", recv.getRuntime().newFixnum(16)); } else if(val.charAt(1) == 'b') { return RubyNumeric.str2inum(recv.getRuntime(),recv.getRuntime().newString(val.substring(2)),2,true); } else { return recv.getRuntime().newString(val.substring(1)).callMethod(context,"to_i", recv.getRuntime().newFixnum(8)); } } } } return object.callMethod(context, "to_i"); }
3,237,411
public static IRubyObject new_integer(IRubyObject recv, IRubyObject object) { ThreadContext context = recv.getRuntime().getCurrentContext(); if(object instanceof RubyString) { String val = object.toString(); if(val.length() > 0 && val.charAt(0) == '0') { if(val.length() > 1) { if(val.charAt(1) == 'x') { return recv.getRuntime().newString(val.substring(2)).callMethod(context,"to_i", recv.getRuntime().newFixnum(16)); } else if(val.charAt(1) == 'b') { return recv.getRuntime().newString(val.substring(2)).callMethod(context,"to_i", recv.getRuntime().newFixnum(2)); } else { return recv.getRuntime().newString(val.substring(1)).callMethod(context,"to_i", recv.getRuntime().newFixnum(8)); } } } } return object.callMethod(context, "to_i"); }
public static IRubyObject new_integer(IRubyObject recv, IRubyObject object) { ThreadContext context = recv.getRuntime().getCurrentContext(); if(object instanceof RubyString) { String val = object.toString(); if(val.length() > 0 && val.charAt(0) == '0') { if(val.length() > 1) { if(val.charAt(1) == 'x') { return recv.getRuntime().newString(val.substring(2)).callMethod(context,"to_i", recv.getRuntime().newFixnum(16)); } else if(val.charAt(1) == 'b') { return recv.getRuntime().newString(val.substring(2)).callMethod(context,"to_i", recv.getRuntime().newFixnum(2)); } else { return RubyNumeric.str2inum(recv.getRuntime(),recv.getRuntime().newString(val.substring(1)),8,true); } } } } return object.callMethod(context, "to_i"); }
3,237,412
public static IRubyObject new_integer(IRubyObject recv, IRubyObject object) { ThreadContext context = recv.getRuntime().getCurrentContext(); if(object instanceof RubyString) { String val = object.toString(); if(val.length() > 0 && val.charAt(0) == '0') { if(val.length() > 1) { if(val.charAt(1) == 'x') { return recv.getRuntime().newString(val.substring(2)).callMethod(context,"to_i", recv.getRuntime().newFixnum(16)); } else if(val.charAt(1) == 'b') { return recv.getRuntime().newString(val.substring(2)).callMethod(context,"to_i", recv.getRuntime().newFixnum(2)); } else { return recv.getRuntime().newString(val.substring(1)).callMethod(context,"to_i", recv.getRuntime().newFixnum(8)); } } } } return object.callMethod(context, "to_i"); }
public static IRubyObject new_integer(IRubyObject recv, IRubyObject object) { ThreadContext context = recv.getRuntime().getCurrentContext(); if(object instanceof RubyString) { String val = object.toString(); if(val.length() > 0 && val.charAt(0) == '0') { if(val.length() > 1) { if(val.charAt(1) == 'x') { return recv.getRuntime().newString(val.substring(2)).callMethod(context,"to_i", recv.getRuntime().newFixnum(16)); } else if(val.charAt(1) == 'b') { return recv.getRuntime().newString(val.substring(2)).callMethod(context,"to_i", recv.getRuntime().newFixnum(2)); } else { return recv.getRuntime().newString(val.substring(1)).callMethod(context,"to_i", recv.getRuntime().newFixnum(8)); } } } } return object.callMethod(context,"to_i"); }
3,237,413
public void destroy(StopStrategy stopStrategy) throws IllegalServiceStateException, UnsatisfiedConditionsException { // if we are not restartable, we need to stop try { if (!stop(stopStrategy)) { throw new IllegalServiceStateException("Service did not stop", serviceName); } } catch (UnsatisfiedConditionsException e) { throw e; } if (!serviceFactory.isRestartable()) { lock("destroy"); try { if (state != ServiceState.STOPPED) { state = ServiceState.STARTING; serviceMonitor.serviceStopping(createServiceEvent()); try { // destroy the service serviceFactory.destroyService(standardServiceContext); } catch (Throwable e) { serviceMonitor.serviceStopError(createErrorServiceEvent(e)); } destroyAllConditions(serviceMonitor); service = null; startTime = 0; state = ServiceState.STOPPED; serviceMonitor.serviceStopped(createServiceEvent()); } } finally { unlock(); } } // cool we can unregistered serviceMonitor.serviceUnregistered(createServiceEvent()); }
public void destroy(StopStrategy stopStrategy) throws IllegalServiceStateException, UnsatisfiedConditionsException { // if we are not restartable, we need to stop try { if (!stop(stopStrategy)) { throw new IllegalServiceStateException("Service did not stop", serviceName); } } catch (UnsatisfiedConditionsException e) { throw e; } if (!serviceFactory.isRestartable()) { lock("destroy"); try { if (state != ServiceState.STOPPED) { state = ServiceState.STARTING; serviceMonitor.serviceStopping(createServiceEvent()); try { // destroy the service serviceFactory.destroyService(standardServiceContext); } catch (Throwable e) { serviceMonitor.serviceStopError(createErrorServiceEvent(e)); } destroyAllConditions(serviceMonitor); service = null; startTime = 0; state = ServiceState.STOPPED; serviceMonitor.serviceStopped(createServiceEvent()); } } finally { unlock(); } } // cool we can unregistered serviceMonitor.serviceUnregistered(createServiceEvent()); }
3,237,414
private void destroyAllConditions(ServiceMonitor monitor) { if (!lock.isHeldByCurrentThread()) { throw new IllegalStateException("Current thread must hold lock before calling destroyAllConditions"); } if (startConditions != null) { List errors = startConditions.destroy(); // errors from destroying the start conditions are stop errors because destroy is only called while // stopping the service for (Iterator iterator = errors.iterator(); iterator.hasNext();) { Throwable stopError = (Throwable) iterator.next(); monitor.serviceStopError(createErrorServiceEvent(stopError)); } startConditions = null; } if (stopConditions != null) { List errors = stopConditions.destroy(); for (Iterator iterator = errors.iterator(); iterator.hasNext();) { Throwable stopError = (Throwable) iterator.next(); monitor.serviceStopError(createErrorServiceEvent(stopError)); } stopConditions = null; } }
private void destroyAllConditions(ServiceMonitor monitor) { if (!lock.isHeldByCurrentThread()) { throw new IllegalStateException("Current thread must hold lock before calling destroyAllConditions"); } if (startConditions != null) { List errors = startConditions.destroy(); // errors from destroying the start conditions are stop errors because destroy is only called while // stopping the service for (Iterator iterator = errors.iterator(); iterator.hasNext();) { Throwable stopError = (Throwable) iterator.next(); monitor.serviceStopError(createErrorServiceEvent(stopError)); } startConditions = null; } if (stopConditions != null) { List errors = stopConditions.destroy(); for (Iterator iterator = errors.iterator(); iterator.hasNext();) { Throwable stopError = (Throwable) iterator.next(); monitor.serviceStopError(createErrorServiceEvent(stopError)); } stopConditions = null; } }
3,237,415
private void destroyAllConditions(ServiceMonitor monitor) { if (!lock.isHeldByCurrentThread()) { throw new IllegalStateException("Current thread must hold lock before calling destroyAllConditions"); } if (startConditions != null) { List errors = startConditions.destroy(); // errors from destroying the start conditions are stop errors because destroy is only called while // stopping the service for (Iterator iterator = errors.iterator(); iterator.hasNext();) { Throwable stopError = (Throwable) iterator.next(); monitor.serviceStopError(createErrorServiceEvent(stopError)); } startConditions = null; } if (stopConditions != null) { List errors = stopConditions.destroy(); for (Iterator iterator = errors.iterator(); iterator.hasNext();) { Throwable stopError = (Throwable) iterator.next(); monitor.serviceStopError(createErrorServiceEvent(stopError)); } stopConditions = null; } }
private void destroyAllConditions(ServiceMonitor monitor) { if (!lock.isHeldByCurrentThread()) { throw new IllegalStateException("Current thread must hold lock before calling destroyAllConditions"); } if (startConditions != null) { List errors = startConditions.destroy(); // errors from destroying the start conditions are stop errors because destroy is only called while // stopping the service for (Iterator iterator = errors.iterator(); iterator.hasNext();) { Throwable stopError = (Throwable) iterator.next(); monitor.serviceStopError(createErrorServiceEvent(stopError)); } startCondition = null; } if (stopConditions != null) { List errors = stopConditions.destroy(); for (Iterator iterator = errors.iterator(); iterator.hasNext();) { Throwable stopError = (Throwable) iterator.next(); monitor.serviceStopError(createErrorServiceEvent(stopError)); } stopConditions = null; } }
3,237,416
private void destroyAllConditions(ServiceMonitor monitor) { if (!lock.isHeldByCurrentThread()) { throw new IllegalStateException("Current thread must hold lock before calling destroyAllConditions"); } if (startConditions != null) { List errors = startConditions.destroy(); // errors from destroying the start conditions are stop errors because destroy is only called while // stopping the service for (Iterator iterator = errors.iterator(); iterator.hasNext();) { Throwable stopError = (Throwable) iterator.next(); monitor.serviceStopError(createErrorServiceEvent(stopError)); } startConditions = null; } if (stopConditions != null) { List errors = stopConditions.destroy(); for (Iterator iterator = errors.iterator(); iterator.hasNext();) { Throwable stopError = (Throwable) iterator.next(); monitor.serviceStopError(createErrorServiceEvent(stopError)); } stopConditions = null; } }
private void destroyAllConditions(ServiceMonitor monitor) { if (!lock.isHeldByCurrentThread()) { throw new IllegalStateException("Current thread must hold lock before calling destroyAllConditions"); } if (startConditions != null) { List errors = startConditions.destroy(); // errors from destroying the start conditions are stop errors because destroy is only called while // stopping the service for (Iterator iterator = errors.iterator(); iterator.hasNext();) { Throwable stopError = (Throwable) iterator.next(); monitor.serviceStopError(createErrorServiceEvent(stopError)); } startConditions = null; } if (stopConditions != null) { List errors = stopConditions.destroy(); for (Iterator iterator = errors.iterator(); iterator.hasNext();) { Throwable stopError = (Throwable) iterator.next(); monitor.serviceStopError(createErrorServiceEvent(stopError)); } stopConditions = null; } }
3,237,417
private void destroyAllConditions(ServiceMonitor monitor) { if (!lock.isHeldByCurrentThread()) { throw new IllegalStateException("Current thread must hold lock before calling destroyAllConditions"); } if (startConditions != null) { List errors = startConditions.destroy(); // errors from destroying the start conditions are stop errors because destroy is only called while // stopping the service for (Iterator iterator = errors.iterator(); iterator.hasNext();) { Throwable stopError = (Throwable) iterator.next(); monitor.serviceStopError(createErrorServiceEvent(stopError)); } startConditions = null; } if (stopConditions != null) { List errors = stopConditions.destroy(); for (Iterator iterator = errors.iterator(); iterator.hasNext();) { Throwable stopError = (Throwable) iterator.next(); monitor.serviceStopError(createErrorServiceEvent(stopError)); } stopConditions = null; } }
private void destroyAllConditions(ServiceMonitor monitor) { if (!lock.isHeldByCurrentThread()) { throw new IllegalStateException("Current thread must hold lock before calling destroyAllConditions"); } if (startConditions != null) { List errors = startConditions.destroy(); // errors from destroying the start conditions are stop errors because destroy is only called while // stopping the service for (Iterator iterator = errors.iterator(); iterator.hasNext();) { Throwable stopError = (Throwable) iterator.next(); monitor.serviceStopError(createErrorServiceEvent(stopError)); } startConditions = null; } if (stopConditions != null) { List errors = stopConditions.destroy(); for (Iterator iterator = errors.iterator(); iterator.hasNext();) { Throwable stopError = (Throwable) iterator.next(); monitor.serviceStopError(createErrorServiceEvent(stopError)); } stopCondition = null; } }
3,237,418
public void initialize() throws IllegalServiceStateException, UnsatisfiedConditionsException, Exception { if (!serviceFactory.isRestartable() && !serviceFactory.isEnabled()) { throw new IllegalServiceStateException("A disabled non-restartable service factory can not be initalized", serviceName); } serviceMonitor.serviceRegistered(createServiceEvent()); // if we are not restartable, we need to start immediately, otherwise we are not going to register this service if (!serviceFactory.isRestartable()) { try { start(false, StartStrategies.UNREGISTER); } catch (UnregisterServiceException e) { serviceMonitor.serviceUnregistered(createServiceEvent()); Throwable cause = e.getCause(); if (cause instanceof Exception) { throw (Exception) cause; } else if (cause instanceof Error) { throw (Error) cause; } else { throw new AssertionError(cause); } } // a non restartable service uses a special stop conditions object that picks up stop conditions as they // are added. When the stop() method is called on a non-restartable service all of the stop conditions // registered with the service factory are initialized (if not already initialized), and the isSatisfied // method is called. This should cause the stop logic of a stop condition to fire. lock("initialize"); try { stopConditions = new NonRestartableStopConditions(kernel, serviceName, classLoader, serviceFactory.getStartConditions(), lock, serviceFactory); } finally { unlock(); } } }
public void initialize() throws IllegalServiceStateException, UnsatisfiedConditionsException, Exception { if (!serviceFactory.isRestartable() && !serviceFactory.isEnabled()) { throw new IllegalServiceStateException("A disabled non-restartable service factory can not be initalized", serviceName); } serviceMonitor.serviceRegistered(createServiceEvent()); // if we are not restartable, we need to start immediately, otherwise we are not going to register this service if (!serviceFactory.isRestartable()) { try { start(false, StartStrategies.UNREGISTER); } catch (UnregisterServiceException e) { serviceMonitor.serviceUnregistered(createServiceEvent()); Throwable cause = e.getCause(); if (cause instanceof Exception) { throw (Exception) cause; } else if (cause instanceof Error) { throw (Error) cause; } else { throw new AssertionError(cause); } } // a non restartable service uses a special stop conditions object that picks up stop conditions as they // are added. When the stop() method is called on a non-restartable service all of the stop conditions // registered with the service factory are initialized (if not already initialized), and the isSatisfied // method is called. This should cause the stop logic of a stop condition to fire. lock("initialize"); try { stopCondition = new NonRestartableStopCondition(kernel, serviceName, classLoader, lock, serviceFactory); } finally { unlock(); } } }
3,237,419
public void start(boolean recursive, StartStrategy startStrategy) throws IllegalServiceStateException, UnregisterServiceException, UnsatisfiedConditionsException, Exception { // verify that it is possible to start this service in the current state before obtaining the lock if (!verifyStartable(state)) { if (recursive) { startOwnedServices(startStrategy); } return; } boolean shouldStartRecursive = false; lock("start"); try { // update the recursive flag this.recursive = this.recursive || recursive; Throwable startError = null; try { // // Loop until all start conditions have been satified. The start strategy can break this loop. // boolean satisfied = false; while (!satisfied) { // do we still want to start? if (!verifyStartable(state)) { // assume someone else called startOwnedServices return; } // if we are in the STOPPED state, we need to move to the STARTING state if (state == ServiceState.STOPPED) { // Grab a synchronized lock on the service factory before changing state and getting a snapshot of // the startConditions. This allows other code to assure the service is in the correct state before // adding a startCondition. synchronized (serviceFactory) { state = ServiceState.STARTING; startConditions = new AggregateConditions(kernel, serviceName, classLoader, serviceFactory.getStartConditions(), lock); } // we are now officially starting serviceMonitor.serviceStarting(createServiceEvent()); // initialize the start conditions startConditions.initialize(); } // are we satisfied? Set unsatisfiedConditions = startConditions.getUnsatisfied(); satisfied = unsatisfiedConditions.isEmpty(); if (!satisfied) { // if the stragegy wants us to wait for conditions to be satisfied, it will return true if (startStrategy.waitForUnsatisfiedConditions(serviceName, unsatisfiedConditions)) { // wait for satisfaction and loop startConditions.awaitSatisfaction(); } else { // no wait, notify the monitor and exit serviceMonitor.serviceWaitingToStart(createWaitingServiceEvent(unsatisfiedConditions)); return; } } } // we are ready to create the service service = serviceFactory.createService(standardServiceContext); // success transition to running startTime = System.currentTimeMillis(); state = ServiceState.RUNNING; serviceMonitor.serviceRunning(createServiceEvent()); // should we recursively start our children shouldStartRecursive = this.recursive || recursive; this.recursive = false; } catch (UnsatisfiedConditionsException e) { // thrown from waitForUnsatisfiedConditions throw e; } catch (IllegalServiceStateException e) { // this can be thrown while awaiting satisfaction throw e; } catch (Exception e) { startError = e; } catch (Error e) { startError = e; } if (startError != null) { try { if (startError instanceof UnregisterServiceException) { throw (UnregisterServiceException) startError; } else { // the strategy will normally rethrow the startError, but if it doesn't notify the service monitor startStrategy.startError(serviceName, startError); serviceMonitor.serviceStartError(createErrorServiceEvent(startError)); } } finally { // we are now STOPPING state = ServiceState.STOPPING; serviceMonitor.serviceStopping(createServiceEvent()); // clean up the conditons destroyAllConditions(serviceMonitor); // transition to the STOPPED state service = null; startTime = 0; state = ServiceState.STOPPED; serviceMonitor.serviceStopped(createServiceEvent()); } } } finally { unlock(); } // startRecursive all of the owned services if (shouldStartRecursive) { startOwnedServices(startStrategy); } }
public void start(boolean recursive, StartStrategy startStrategy) throws IllegalServiceStateException, UnregisterServiceException, UnsatisfiedConditionsException, Exception { // verify that it is possible to start this service in the current state before obtaining the lock if (!verifyStartable(state)) { if (recursive) { startOwnedServices(startStrategy); } return; } boolean shouldStartRecursive = false; lock("start"); try { // update the recursive flag this.recursive = this.recursive || recursive; Throwable startError = null; try { // // Loop until all start conditions have been satified. The start strategy can break this loop. // boolean satisfied = false; while (!satisfied) { // do we still want to start? if (!verifyStartable(state)) { // assume someone else called startOwnedServices return; } // if we are in the STOPPED state, we need to move to the STARTING state if (state == ServiceState.STOPPED) { // Grab a synchronized lock on the service factory before changing state and getting a snapshot of // the startConditions. This allows other code to assure the service is in the correct state before // adding a startCondition. synchronized (serviceFactory) { state = ServiceState.STARTING; startConditions = new AggregateConditions(kernel, serviceName, classLoader, serviceFactory.getStartConditions(), lock); } // we are now officially starting serviceMonitor.serviceStarting(createServiceEvent()); // initialize the start conditions startConditions.initialize(); } // are we satisfied? Set unsatisfiedConditions = startConditions.getUnsatisfied(); satisfied = unsatisfiedConditions.isEmpty(); if (!satisfied) { // if the stragegy wants us to wait for conditions to be satisfied, it will return true if (startStrategy.waitForUnsatisfiedConditions(serviceName, unsatisfiedConditions)) { // wait for satisfaction and loop startConditions.awaitSatisfaction(); } else { // no wait, notify the monitor and exit serviceMonitor.serviceWaitingToStart(createWaitingServiceEvent(unsatisfiedConditions)); return; } } } // we are ready to create the service service = serviceFactory.createService(standardServiceContext); // success transition to running startTime = System.currentTimeMillis(); state = ServiceState.RUNNING; serviceMonitor.serviceRunning(createServiceEvent()); // should we recursively start our children shouldStartRecursive = this.recursive || recursive; this.recursive = false; } catch (UnsatisfiedConditionsException e) { // thrown from waitForUnsatisfiedConditions throw e; } catch (IllegalServiceStateException e) { // this can be thrown while awaiting satisfaction throw e; } catch (Exception e) { startError = e; } catch (Error e) { startError = e; } if (startError != null) { try { if (startError instanceof UnregisterServiceException) { throw (UnregisterServiceException) startError; } else { // the strategy will normally rethrow the startError, but if it doesn't notify the service monitor startStrategy.startError(serviceName, startError); serviceMonitor.serviceStartError(createErrorServiceEvent(startError)); } } finally { // we are now STOPPING state = ServiceState.STOPPING; serviceMonitor.serviceStopping(createServiceEvent()); // clean up the conditons destroyAllConditions(serviceMonitor); // transition to the STOPPED state service = null; startTime = 0; state = ServiceState.STOPPED; serviceMonitor.serviceStopped(createServiceEvent()); } } } finally { unlock(); } // startRecursive all of the owned services if (shouldStartRecursive) { startOwnedServices(startStrategy); } }
3,237,420
public void start(boolean recursive, StartStrategy startStrategy) throws IllegalServiceStateException, UnregisterServiceException, UnsatisfiedConditionsException, Exception { // verify that it is possible to start this service in the current state before obtaining the lock if (!verifyStartable(state)) { if (recursive) { startOwnedServices(startStrategy); } return; } boolean shouldStartRecursive = false; lock("start"); try { // update the recursive flag this.recursive = this.recursive || recursive; Throwable startError = null; try { // // Loop until all start conditions have been satified. The start strategy can break this loop. // boolean satisfied = false; while (!satisfied) { // do we still want to start? if (!verifyStartable(state)) { // assume someone else called startOwnedServices return; } // if we are in the STOPPED state, we need to move to the STARTING state if (state == ServiceState.STOPPED) { // Grab a synchronized lock on the service factory before changing state and getting a snapshot of // the startConditions. This allows other code to assure the service is in the correct state before // adding a startCondition. synchronized (serviceFactory) { state = ServiceState.STARTING; startConditions = new AggregateConditions(kernel, serviceName, classLoader, serviceFactory.getStartConditions(), lock); } // we are now officially starting serviceMonitor.serviceStarting(createServiceEvent()); // initialize the start conditions startConditions.initialize(); } // are we satisfied? Set unsatisfiedConditions = startConditions.getUnsatisfied(); satisfied = unsatisfiedConditions.isEmpty(); if (!satisfied) { // if the stragegy wants us to wait for conditions to be satisfied, it will return true if (startStrategy.waitForUnsatisfiedConditions(serviceName, unsatisfiedConditions)) { // wait for satisfaction and loop startConditions.awaitSatisfaction(); } else { // no wait, notify the monitor and exit serviceMonitor.serviceWaitingToStart(createWaitingServiceEvent(unsatisfiedConditions)); return; } } } // we are ready to create the service service = serviceFactory.createService(standardServiceContext); // success transition to running startTime = System.currentTimeMillis(); state = ServiceState.RUNNING; serviceMonitor.serviceRunning(createServiceEvent()); // should we recursively start our children shouldStartRecursive = this.recursive || recursive; this.recursive = false; } catch (UnsatisfiedConditionsException e) { // thrown from waitForUnsatisfiedConditions throw e; } catch (IllegalServiceStateException e) { // this can be thrown while awaiting satisfaction throw e; } catch (Exception e) { startError = e; } catch (Error e) { startError = e; } if (startError != null) { try { if (startError instanceof UnregisterServiceException) { throw (UnregisterServiceException) startError; } else { // the strategy will normally rethrow the startError, but if it doesn't notify the service monitor startStrategy.startError(serviceName, startError); serviceMonitor.serviceStartError(createErrorServiceEvent(startError)); } } finally { // we are now STOPPING state = ServiceState.STOPPING; serviceMonitor.serviceStopping(createServiceEvent()); // clean up the conditons destroyAllConditions(serviceMonitor); // transition to the STOPPED state service = null; startTime = 0; state = ServiceState.STOPPED; serviceMonitor.serviceStopped(createServiceEvent()); } } } finally { unlock(); } // startRecursive all of the owned services if (shouldStartRecursive) { startOwnedServices(startStrategy); } }
public void start(boolean recursive, StartStrategy startStrategy) throws IllegalServiceStateException, UnregisterServiceException, UnsatisfiedConditionsException, Exception { // verify that it is possible to start this service in the current state before obtaining the lock if (!verifyStartable(state)) { if (recursive) { startOwnedServices(startStrategy); } return; } boolean shouldStartRecursive = false; lock("start"); try { // update the recursive flag this.recursive = this.recursive || recursive; Throwable startError = null; try { // // Loop until all start conditions have been satified. The start strategy can break this loop. // boolean satisfied = false; while (!satisfied) { // do we still want to start? if (!verifyStartable(state)) { // assume someone else called startOwnedServices return; } // if we are in the STOPPED state, we need to move to the STARTING state if (state == ServiceState.STOPPED) { // Grab a synchronized lock on the service factory before changing state and getting a snapshot of // the startConditions. This allows other code to assure the service is in the correct state before // adding a startCondition. synchronized (serviceFactory) { state = ServiceState.STARTING; startConditions = new AggregateConditions(kernel, serviceName, classLoader, serviceFactory.getStartConditions(), lock); } // we are now officially starting serviceMonitor.serviceStarting(createServiceEvent()); // initialize the start conditions startCondition = new AggregateCondition(kernel, serviceName, classLoader, lock, serviceFactory.getStartConditions()); startCondition.initialize(); } // are we satisfied? Set unsatisfiedConditions = startConditions.getUnsatisfied(); satisfied = unsatisfiedConditions.isEmpty(); if (!satisfied) { // if the stragegy wants us to wait for conditions to be satisfied, it will return true if (startStrategy.waitForUnsatisfiedConditions(serviceName, unsatisfiedConditions)) { // wait for satisfaction and loop startConditions.awaitSatisfaction(); } else { // no wait, notify the monitor and exit serviceMonitor.serviceWaitingToStart(createWaitingServiceEvent(unsatisfiedConditions)); return; } } } // we are ready to create the service service = serviceFactory.createService(standardServiceContext); // success transition to running startTime = System.currentTimeMillis(); state = ServiceState.RUNNING; serviceMonitor.serviceRunning(createServiceEvent()); // should we recursively start our children shouldStartRecursive = this.recursive || recursive; this.recursive = false; } catch (UnsatisfiedConditionsException e) { // thrown from waitForUnsatisfiedConditions throw e; } catch (IllegalServiceStateException e) { // this can be thrown while awaiting satisfaction throw e; } catch (Exception e) { startError = e; } catch (Error e) { startError = e; } if (startError != null) { try { if (startError instanceof UnregisterServiceException) { throw (UnregisterServiceException) startError; } else { // the strategy will normally rethrow the startError, but if it doesn't notify the service monitor startStrategy.startError(serviceName, startError); serviceMonitor.serviceStartError(createErrorServiceEvent(startError)); } } finally { // we are now STOPPING state = ServiceState.STOPPING; serviceMonitor.serviceStopping(createServiceEvent()); // clean up the conditons destroyAllConditions(serviceMonitor); // transition to the STOPPED state service = null; startTime = 0; state = ServiceState.STOPPED; serviceMonitor.serviceStopped(createServiceEvent()); } } } finally { unlock(); } // startRecursive all of the owned services if (shouldStartRecursive) { startOwnedServices(startStrategy); } }
3,237,421
public void start(boolean recursive, StartStrategy startStrategy) throws IllegalServiceStateException, UnregisterServiceException, UnsatisfiedConditionsException, Exception { // verify that it is possible to start this service in the current state before obtaining the lock if (!verifyStartable(state)) { if (recursive) { startOwnedServices(startStrategy); } return; } boolean shouldStartRecursive = false; lock("start"); try { // update the recursive flag this.recursive = this.recursive || recursive; Throwable startError = null; try { // // Loop until all start conditions have been satified. The start strategy can break this loop. // boolean satisfied = false; while (!satisfied) { // do we still want to start? if (!verifyStartable(state)) { // assume someone else called startOwnedServices return; } // if we are in the STOPPED state, we need to move to the STARTING state if (state == ServiceState.STOPPED) { // Grab a synchronized lock on the service factory before changing state and getting a snapshot of // the startConditions. This allows other code to assure the service is in the correct state before // adding a startCondition. synchronized (serviceFactory) { state = ServiceState.STARTING; startConditions = new AggregateConditions(kernel, serviceName, classLoader, serviceFactory.getStartConditions(), lock); } // we are now officially starting serviceMonitor.serviceStarting(createServiceEvent()); // initialize the start conditions startConditions.initialize(); } // are we satisfied? Set unsatisfiedConditions = startConditions.getUnsatisfied(); satisfied = unsatisfiedConditions.isEmpty(); if (!satisfied) { // if the stragegy wants us to wait for conditions to be satisfied, it will return true if (startStrategy.waitForUnsatisfiedConditions(serviceName, unsatisfiedConditions)) { // wait for satisfaction and loop startConditions.awaitSatisfaction(); } else { // no wait, notify the monitor and exit serviceMonitor.serviceWaitingToStart(createWaitingServiceEvent(unsatisfiedConditions)); return; } } } // we are ready to create the service service = serviceFactory.createService(standardServiceContext); // success transition to running startTime = System.currentTimeMillis(); state = ServiceState.RUNNING; serviceMonitor.serviceRunning(createServiceEvent()); // should we recursively start our children shouldStartRecursive = this.recursive || recursive; this.recursive = false; } catch (UnsatisfiedConditionsException e) { // thrown from waitForUnsatisfiedConditions throw e; } catch (IllegalServiceStateException e) { // this can be thrown while awaiting satisfaction throw e; } catch (Exception e) { startError = e; } catch (Error e) { startError = e; } if (startError != null) { try { if (startError instanceof UnregisterServiceException) { throw (UnregisterServiceException) startError; } else { // the strategy will normally rethrow the startError, but if it doesn't notify the service monitor startStrategy.startError(serviceName, startError); serviceMonitor.serviceStartError(createErrorServiceEvent(startError)); } } finally { // we are now STOPPING state = ServiceState.STOPPING; serviceMonitor.serviceStopping(createServiceEvent()); // clean up the conditons destroyAllConditions(serviceMonitor); // transition to the STOPPED state service = null; startTime = 0; state = ServiceState.STOPPED; serviceMonitor.serviceStopped(createServiceEvent()); } } } finally { unlock(); } // startRecursive all of the owned services if (shouldStartRecursive) { startOwnedServices(startStrategy); } }
public void start(boolean recursive, StartStrategy startStrategy) throws IllegalServiceStateException, UnregisterServiceException, UnsatisfiedConditionsException, Exception { // verify that it is possible to start this service in the current state before obtaining the lock if (!verifyStartable(state)) { if (recursive) { startOwnedServices(startStrategy); } return; } boolean shouldStartRecursive = false; lock("start"); try { // update the recursive flag this.recursive = this.recursive || recursive; Throwable startError = null; try { // // Loop until all start conditions have been satified. The start strategy can break this loop. // boolean satisfied = false; while (!satisfied) { // do we still want to start? if (!verifyStartable(state)) { // assume someone else called startOwnedServices return; } // if we are in the STOPPED state, we need to move to the STARTING state if (state == ServiceState.STOPPED) { // Grab a synchronized lock on the service factory before changing state and getting a snapshot of // the startConditions. This allows other code to assure the service is in the correct state before // adding a startCondition. synchronized (serviceFactory) { state = ServiceState.STARTING; startConditions = new AggregateConditions(kernel, serviceName, classLoader, serviceFactory.getStartConditions(), lock); } // we are now officially starting serviceMonitor.serviceStarting(createServiceEvent()); // initialize the start conditions startConditions.initialize(); } // are we satisfied? Set unsatisfiedConditions = startCondition.getUnsatisfied(); satisfied = unsatisfiedConditions.isEmpty(); if (!satisfied) { // if the stragegy wants us to wait for conditions to be satisfied, it will return true if (startStrategy.waitForUnsatisfiedConditions(serviceName, unsatisfiedConditions)) { // wait for satisfaction and loop startConditions.awaitSatisfaction(); } else { // no wait, notify the monitor and exit serviceMonitor.serviceWaitingToStart(createWaitingServiceEvent(unsatisfiedConditions)); return; } } } // we are ready to create the service service = serviceFactory.createService(standardServiceContext); // success transition to running startTime = System.currentTimeMillis(); state = ServiceState.RUNNING; serviceMonitor.serviceRunning(createServiceEvent()); // should we recursively start our children shouldStartRecursive = this.recursive || recursive; this.recursive = false; } catch (UnsatisfiedConditionsException e) { // thrown from waitForUnsatisfiedConditions throw e; } catch (IllegalServiceStateException e) { // this can be thrown while awaiting satisfaction throw e; } catch (Exception e) { startError = e; } catch (Error e) { startError = e; } if (startError != null) { try { if (startError instanceof UnregisterServiceException) { throw (UnregisterServiceException) startError; } else { // the strategy will normally rethrow the startError, but if it doesn't notify the service monitor startStrategy.startError(serviceName, startError); serviceMonitor.serviceStartError(createErrorServiceEvent(startError)); } } finally { // we are now STOPPING state = ServiceState.STOPPING; serviceMonitor.serviceStopping(createServiceEvent()); // clean up the conditons destroyAllConditions(serviceMonitor); // transition to the STOPPED state service = null; startTime = 0; state = ServiceState.STOPPED; serviceMonitor.serviceStopped(createServiceEvent()); } } } finally { unlock(); } // startRecursive all of the owned services if (shouldStartRecursive) { startOwnedServices(startStrategy); } }
3,237,422
public void start(boolean recursive, StartStrategy startStrategy) throws IllegalServiceStateException, UnregisterServiceException, UnsatisfiedConditionsException, Exception { // verify that it is possible to start this service in the current state before obtaining the lock if (!verifyStartable(state)) { if (recursive) { startOwnedServices(startStrategy); } return; } boolean shouldStartRecursive = false; lock("start"); try { // update the recursive flag this.recursive = this.recursive || recursive; Throwable startError = null; try { // // Loop until all start conditions have been satified. The start strategy can break this loop. // boolean satisfied = false; while (!satisfied) { // do we still want to start? if (!verifyStartable(state)) { // assume someone else called startOwnedServices return; } // if we are in the STOPPED state, we need to move to the STARTING state if (state == ServiceState.STOPPED) { // Grab a synchronized lock on the service factory before changing state and getting a snapshot of // the startConditions. This allows other code to assure the service is in the correct state before // adding a startCondition. synchronized (serviceFactory) { state = ServiceState.STARTING; startConditions = new AggregateConditions(kernel, serviceName, classLoader, serviceFactory.getStartConditions(), lock); } // we are now officially starting serviceMonitor.serviceStarting(createServiceEvent()); // initialize the start conditions startConditions.initialize(); } // are we satisfied? Set unsatisfiedConditions = startConditions.getUnsatisfied(); satisfied = unsatisfiedConditions.isEmpty(); if (!satisfied) { // if the stragegy wants us to wait for conditions to be satisfied, it will return true if (startStrategy.waitForUnsatisfiedConditions(serviceName, unsatisfiedConditions)) { // wait for satisfaction and loop startConditions.awaitSatisfaction(); } else { // no wait, notify the monitor and exit serviceMonitor.serviceWaitingToStart(createWaitingServiceEvent(unsatisfiedConditions)); return; } } } // we are ready to create the service service = serviceFactory.createService(standardServiceContext); // success transition to running startTime = System.currentTimeMillis(); state = ServiceState.RUNNING; serviceMonitor.serviceRunning(createServiceEvent()); // should we recursively start our children shouldStartRecursive = this.recursive || recursive; this.recursive = false; } catch (UnsatisfiedConditionsException e) { // thrown from waitForUnsatisfiedConditions throw e; } catch (IllegalServiceStateException e) { // this can be thrown while awaiting satisfaction throw e; } catch (Exception e) { startError = e; } catch (Error e) { startError = e; } if (startError != null) { try { if (startError instanceof UnregisterServiceException) { throw (UnregisterServiceException) startError; } else { // the strategy will normally rethrow the startError, but if it doesn't notify the service monitor startStrategy.startError(serviceName, startError); serviceMonitor.serviceStartError(createErrorServiceEvent(startError)); } } finally { // we are now STOPPING state = ServiceState.STOPPING; serviceMonitor.serviceStopping(createServiceEvent()); // clean up the conditons destroyAllConditions(serviceMonitor); // transition to the STOPPED state service = null; startTime = 0; state = ServiceState.STOPPED; serviceMonitor.serviceStopped(createServiceEvent()); } } } finally { unlock(); } // startRecursive all of the owned services if (shouldStartRecursive) { startOwnedServices(startStrategy); } }
public void start(boolean recursive, StartStrategy startStrategy) throws IllegalServiceStateException, UnregisterServiceException, UnsatisfiedConditionsException, Exception { // verify that it is possible to start this service in the current state before obtaining the lock if (!verifyStartable(state)) { if (recursive) { startOwnedServices(startStrategy); } return; } boolean shouldStartRecursive = false; lock("start"); try { // update the recursive flag this.recursive = this.recursive || recursive; Throwable startError = null; try { // // Loop until all start conditions have been satified. The start strategy can break this loop. // boolean satisfied = false; while (!satisfied) { // do we still want to start? if (!verifyStartable(state)) { // assume someone else called startOwnedServices return; } // if we are in the STOPPED state, we need to move to the STARTING state if (state == ServiceState.STOPPED) { // Grab a synchronized lock on the service factory before changing state and getting a snapshot of // the startConditions. This allows other code to assure the service is in the correct state before // adding a startCondition. synchronized (serviceFactory) { state = ServiceState.STARTING; startConditions = new AggregateConditions(kernel, serviceName, classLoader, serviceFactory.getStartConditions(), lock); } // we are now officially starting serviceMonitor.serviceStarting(createServiceEvent()); // initialize the start conditions startConditions.initialize(); } // are we satisfied? Set unsatisfiedConditions = startConditions.getUnsatisfied(); satisfied = unsatisfiedConditions.isEmpty(); if (!satisfied) { // if the stragegy wants us to wait for conditions to be satisfied, it will return true if (startStrategy.waitForUnsatisfiedConditions(serviceName, unsatisfiedConditions)) { // wait for satisfaction and loop startCondition.awaitSatisfaction(); } else { // no wait, notify the monitor and exit serviceMonitor.serviceWaitingToStart(createWaitingServiceEvent(unsatisfiedConditions)); return; } } } // we are ready to create the service service = serviceFactory.createService(standardServiceContext); // success transition to running startTime = System.currentTimeMillis(); state = ServiceState.RUNNING; serviceMonitor.serviceRunning(createServiceEvent()); // should we recursively start our children shouldStartRecursive = this.recursive || recursive; this.recursive = false; } catch (UnsatisfiedConditionsException e) { // thrown from waitForUnsatisfiedConditions throw e; } catch (IllegalServiceStateException e) { // this can be thrown while awaiting satisfaction throw e; } catch (Exception e) { startError = e; } catch (Error e) { startError = e; } if (startError != null) { try { if (startError instanceof UnregisterServiceException) { throw (UnregisterServiceException) startError; } else { // the strategy will normally rethrow the startError, but if it doesn't notify the service monitor startStrategy.startError(serviceName, startError); serviceMonitor.serviceStartError(createErrorServiceEvent(startError)); } } finally { // we are now STOPPING state = ServiceState.STOPPING; serviceMonitor.serviceStopping(createServiceEvent()); // clean up the conditons destroyAllConditions(serviceMonitor); // transition to the STOPPED state service = null; startTime = 0; state = ServiceState.STOPPED; serviceMonitor.serviceStopped(createServiceEvent()); } } } finally { unlock(); } // startRecursive all of the owned services if (shouldStartRecursive) { startOwnedServices(startStrategy); } }
3,237,423
public boolean stop(StopStrategy stopStrategy) throws UnsatisfiedConditionsException { // check that we aren't already stopped before attempting to acquire the lock ServiceState initialState = state; if (initialState == ServiceState.STOPPED) { return true; } lock("stop"); try { try { // // Loop until all stop conditions have been satified. The stop strategy can break this loop. // boolean satisfied = false; while (!satisfied) { // do we still want to stop? if (state == ServiceState.STOPPED) { return true; } // if we are not the STOPPING state, transition to it // we check on the stopConditions variable because non-restartable services preset this in the // intialization method if (stopConditions == null) { // Grab a synchronized lock on the service factory before changing state and getting a snapshot of // the stopConditions. This allows other code to assure the service is in the correct state before // adding a stopCondition. // todo broken synchronized (serviceFactory) { state = ServiceState.STOPPING; stopConditions = new AggregateConditions(kernel, serviceName, classLoader, serviceFactory.getStopConditions(), lock); } serviceMonitor.serviceStopping(createServiceEvent()); // initialize all of the stop conditions stopConditions.initialize(); } // are we satisfied? Set unsatisfiedConditions = stopConditions.getUnsatisfied(); satisfied = unsatisfiedConditions.isEmpty(); if (!satisfied) { // if the stragegy wants us to wait for conditions to be satisfied, it will return true if (stopStrategy.waitForUnsatisfiedConditions(serviceName, unsatisfiedConditions)) { // wait for satisfaction and loop stopConditions.awaitSatisfaction(); } else { // no wait, notify the monitor and exit serviceMonitor.serviceWaitingToStop(createWaitingServiceEvent(unsatisfiedConditions)); return false; } } } } catch (UnsatisfiedConditionsException e) { throw e; } catch (ForcedStopException e) { serviceMonitor.serviceStopError(createErrorServiceEvent(e)); } catch (Exception e) { serviceMonitor.serviceStopError(createErrorServiceEvent(e)); } catch (Error e) { serviceMonitor.serviceStopError(createErrorServiceEvent(e)); } if (serviceFactory.isRestartable()) { try { // destroy the service serviceFactory.destroyService(standardServiceContext); } catch (Throwable e) { serviceMonitor.serviceStopError(createErrorServiceEvent(e)); } destroyAllConditions(serviceMonitor); service = null; startTime = 0; state = ServiceState.STOPPED; serviceMonitor.serviceStopped(createServiceEvent()); } return true; } finally { unlock(); } }
public boolean stop(StopStrategy stopStrategy) throws UnsatisfiedConditionsException { // check that we aren't already stopped before attempting to acquire the lock ServiceState initialState = state; if (initialState == ServiceState.STOPPED) { return true; } lock("stop"); try { try { // // Loop until all stop conditions have been satified. The stop strategy can break this loop. // boolean satisfied = false; while (!satisfied) { // do we still want to stop? if (state == ServiceState.STOPPED) { return true; } // if we are not the STOPPING state, transition to it // we check on the stopConditions variable because non-restartable services preset this in the // intialization method if (stopConditions == null) { // Grab a synchronized lock on the service factory before changing state and getting a snapshot of // the stopConditions. This allows other code to assure the service is in the correct state before // adding a stopCondition. // todo broken synchronized (serviceFactory) { state = ServiceState.STOPPING; stopConditions = new AggregateConditions(kernel, serviceName, classLoader, serviceFactory.getStopConditions(), lock); } serviceMonitor.serviceStopping(createServiceEvent()); // initialize all of the stop conditions stopConditions.initialize(); } // are we satisfied? Set unsatisfiedConditions = stopConditions.getUnsatisfied(); satisfied = unsatisfiedConditions.isEmpty(); if (!satisfied) { // if the stragegy wants us to wait for conditions to be satisfied, it will return true if (stopStrategy.waitForUnsatisfiedConditions(serviceName, unsatisfiedConditions)) { // wait for satisfaction and loop stopConditions.awaitSatisfaction(); } else { // no wait, notify the monitor and exit serviceMonitor.serviceWaitingToStop(createWaitingServiceEvent(unsatisfiedConditions)); return false; } } } } catch (UnsatisfiedConditionsException e) { throw e; } catch (ForcedStopException e) { serviceMonitor.serviceStopError(createErrorServiceEvent(e)); } catch (Exception e) { serviceMonitor.serviceStopError(createErrorServiceEvent(e)); } catch (Error e) { serviceMonitor.serviceStopError(createErrorServiceEvent(e)); } if (serviceFactory.isRestartable()) { try { // destroy the service serviceFactory.destroyService(standardServiceContext); } catch (Throwable e) { serviceMonitor.serviceStopError(createErrorServiceEvent(e)); } destroyAllConditions(serviceMonitor); service = null; startTime = 0; state = ServiceState.STOPPED; serviceMonitor.serviceStopped(createServiceEvent()); } return true; } finally { unlock(); } }
3,237,424
public boolean stop(StopStrategy stopStrategy) throws UnsatisfiedConditionsException { // check that we aren't already stopped before attempting to acquire the lock ServiceState initialState = state; if (initialState == ServiceState.STOPPED) { return true; } lock("stop"); try { try { // // Loop until all stop conditions have been satified. The stop strategy can break this loop. // boolean satisfied = false; while (!satisfied) { // do we still want to stop? if (state == ServiceState.STOPPED) { return true; } // if we are not the STOPPING state, transition to it // we check on the stopConditions variable because non-restartable services preset this in the // intialization method if (stopConditions == null) { // Grab a synchronized lock on the service factory before changing state and getting a snapshot of // the stopConditions. This allows other code to assure the service is in the correct state before // adding a stopCondition. // todo broken synchronized (serviceFactory) { state = ServiceState.STOPPING; stopConditions = new AggregateConditions(kernel, serviceName, classLoader, serviceFactory.getStopConditions(), lock); } serviceMonitor.serviceStopping(createServiceEvent()); // initialize all of the stop conditions stopConditions.initialize(); } // are we satisfied? Set unsatisfiedConditions = stopConditions.getUnsatisfied(); satisfied = unsatisfiedConditions.isEmpty(); if (!satisfied) { // if the stragegy wants us to wait for conditions to be satisfied, it will return true if (stopStrategy.waitForUnsatisfiedConditions(serviceName, unsatisfiedConditions)) { // wait for satisfaction and loop stopConditions.awaitSatisfaction(); } else { // no wait, notify the monitor and exit serviceMonitor.serviceWaitingToStop(createWaitingServiceEvent(unsatisfiedConditions)); return false; } } } } catch (UnsatisfiedConditionsException e) { throw e; } catch (ForcedStopException e) { serviceMonitor.serviceStopError(createErrorServiceEvent(e)); } catch (Exception e) { serviceMonitor.serviceStopError(createErrorServiceEvent(e)); } catch (Error e) { serviceMonitor.serviceStopError(createErrorServiceEvent(e)); } if (serviceFactory.isRestartable()) { try { // destroy the service serviceFactory.destroyService(standardServiceContext); } catch (Throwable e) { serviceMonitor.serviceStopError(createErrorServiceEvent(e)); } destroyAllConditions(serviceMonitor); service = null; startTime = 0; state = ServiceState.STOPPED; serviceMonitor.serviceStopped(createServiceEvent()); } return true; } finally { unlock(); } }
public boolean stop(StopStrategy stopStrategy) throws UnsatisfiedConditionsException { // check that we aren't already stopped before attempting to acquire the lock ServiceState initialState = state; if (initialState == ServiceState.STOPPED) { return true; } lock("stop"); try { try { // // Loop until all stop conditions have been satified. The stop strategy can break this loop. // boolean satisfied = false; while (!satisfied) { // do we still want to stop? if (state == ServiceState.STOPPED) { return true; } // if we are not the STOPPING state, transition to it // we check on the stopConditions variable because non-restartable services preset this in the // intialization method if (stopConditions == null) { // Grab a synchronized lock on the service factory before changing state and getting a snapshot of // the stopConditions. This allows other code to assure the service is in the correct state before // adding a stopCondition. // todo broken synchronized (serviceFactory) { state = ServiceState.STOPPING; stopConditions = new AggregateConditions(kernel, serviceName, classLoader, serviceFactory.getStopConditions(), lock); } serviceMonitor.serviceStopping(createServiceEvent()); // initialize all of the stop conditions stopCondition = new AggregateCondition(kernel, serviceName, classLoader, lock, serviceFactory.getStopConditions()); stopCondition.initialize(); } // are we satisfied? Set unsatisfiedConditions = stopConditions.getUnsatisfied(); satisfied = unsatisfiedConditions.isEmpty(); if (!satisfied) { // if the stragegy wants us to wait for conditions to be satisfied, it will return true if (stopStrategy.waitForUnsatisfiedConditions(serviceName, unsatisfiedConditions)) { // wait for satisfaction and loop stopConditions.awaitSatisfaction(); } else { // no wait, notify the monitor and exit serviceMonitor.serviceWaitingToStop(createWaitingServiceEvent(unsatisfiedConditions)); return false; } } } } catch (UnsatisfiedConditionsException e) { throw e; } catch (ForcedStopException e) { serviceMonitor.serviceStopError(createErrorServiceEvent(e)); } catch (Exception e) { serviceMonitor.serviceStopError(createErrorServiceEvent(e)); } catch (Error e) { serviceMonitor.serviceStopError(createErrorServiceEvent(e)); } if (serviceFactory.isRestartable()) { try { // destroy the service serviceFactory.destroyService(standardServiceContext); } catch (Throwable e) { serviceMonitor.serviceStopError(createErrorServiceEvent(e)); } destroyAllConditions(serviceMonitor); service = null; startTime = 0; state = ServiceState.STOPPED; serviceMonitor.serviceStopped(createServiceEvent()); } return true; } finally { unlock(); } }
3,237,425
public boolean stop(StopStrategy stopStrategy) throws UnsatisfiedConditionsException { // check that we aren't already stopped before attempting to acquire the lock ServiceState initialState = state; if (initialState == ServiceState.STOPPED) { return true; } lock("stop"); try { try { // // Loop until all stop conditions have been satified. The stop strategy can break this loop. // boolean satisfied = false; while (!satisfied) { // do we still want to stop? if (state == ServiceState.STOPPED) { return true; } // if we are not the STOPPING state, transition to it // we check on the stopConditions variable because non-restartable services preset this in the // intialization method if (stopConditions == null) { // Grab a synchronized lock on the service factory before changing state and getting a snapshot of // the stopConditions. This allows other code to assure the service is in the correct state before // adding a stopCondition. // todo broken synchronized (serviceFactory) { state = ServiceState.STOPPING; stopConditions = new AggregateConditions(kernel, serviceName, classLoader, serviceFactory.getStopConditions(), lock); } serviceMonitor.serviceStopping(createServiceEvent()); // initialize all of the stop conditions stopConditions.initialize(); } // are we satisfied? Set unsatisfiedConditions = stopConditions.getUnsatisfied(); satisfied = unsatisfiedConditions.isEmpty(); if (!satisfied) { // if the stragegy wants us to wait for conditions to be satisfied, it will return true if (stopStrategy.waitForUnsatisfiedConditions(serviceName, unsatisfiedConditions)) { // wait for satisfaction and loop stopConditions.awaitSatisfaction(); } else { // no wait, notify the monitor and exit serviceMonitor.serviceWaitingToStop(createWaitingServiceEvent(unsatisfiedConditions)); return false; } } } } catch (UnsatisfiedConditionsException e) { throw e; } catch (ForcedStopException e) { serviceMonitor.serviceStopError(createErrorServiceEvent(e)); } catch (Exception e) { serviceMonitor.serviceStopError(createErrorServiceEvent(e)); } catch (Error e) { serviceMonitor.serviceStopError(createErrorServiceEvent(e)); } if (serviceFactory.isRestartable()) { try { // destroy the service serviceFactory.destroyService(standardServiceContext); } catch (Throwable e) { serviceMonitor.serviceStopError(createErrorServiceEvent(e)); } destroyAllConditions(serviceMonitor); service = null; startTime = 0; state = ServiceState.STOPPED; serviceMonitor.serviceStopped(createServiceEvent()); } return true; } finally { unlock(); } }
public boolean stop(StopStrategy stopStrategy) throws UnsatisfiedConditionsException { // check that we aren't already stopped before attempting to acquire the lock ServiceState initialState = state; if (initialState == ServiceState.STOPPED) { return true; } lock("stop"); try { try { // // Loop until all stop conditions have been satified. The stop strategy can break this loop. // boolean satisfied = false; while (!satisfied) { // do we still want to stop? if (state == ServiceState.STOPPED) { return true; } // if we are not the STOPPING state, transition to it // we check on the stopConditions variable because non-restartable services preset this in the // intialization method if (stopConditions == null) { // Grab a synchronized lock on the service factory before changing state and getting a snapshot of // the stopConditions. This allows other code to assure the service is in the correct state before // adding a stopCondition. // todo broken synchronized (serviceFactory) { state = ServiceState.STOPPING; stopConditions = new AggregateConditions(kernel, serviceName, classLoader, serviceFactory.getStopConditions(), lock); } serviceMonitor.serviceStopping(createServiceEvent()); // initialize all of the stop conditions stopConditions.initialize(); } // are we satisfied? Set unsatisfiedConditions = stopCondition.getUnsatisfied(); satisfied = unsatisfiedConditions.isEmpty(); if (!satisfied) { // if the stragegy wants us to wait for conditions to be satisfied, it will return true if (stopStrategy.waitForUnsatisfiedConditions(serviceName, unsatisfiedConditions)) { // wait for satisfaction and loop stopConditions.awaitSatisfaction(); } else { // no wait, notify the monitor and exit serviceMonitor.serviceWaitingToStop(createWaitingServiceEvent(unsatisfiedConditions)); return false; } } } } catch (UnsatisfiedConditionsException e) { throw e; } catch (ForcedStopException e) { serviceMonitor.serviceStopError(createErrorServiceEvent(e)); } catch (Exception e) { serviceMonitor.serviceStopError(createErrorServiceEvent(e)); } catch (Error e) { serviceMonitor.serviceStopError(createErrorServiceEvent(e)); } if (serviceFactory.isRestartable()) { try { // destroy the service serviceFactory.destroyService(standardServiceContext); } catch (Throwable e) { serviceMonitor.serviceStopError(createErrorServiceEvent(e)); } destroyAllConditions(serviceMonitor); service = null; startTime = 0; state = ServiceState.STOPPED; serviceMonitor.serviceStopped(createServiceEvent()); } return true; } finally { unlock(); } }
3,237,426
public boolean stop(StopStrategy stopStrategy) throws UnsatisfiedConditionsException { // check that we aren't already stopped before attempting to acquire the lock ServiceState initialState = state; if (initialState == ServiceState.STOPPED) { return true; } lock("stop"); try { try { // // Loop until all stop conditions have been satified. The stop strategy can break this loop. // boolean satisfied = false; while (!satisfied) { // do we still want to stop? if (state == ServiceState.STOPPED) { return true; } // if we are not the STOPPING state, transition to it // we check on the stopConditions variable because non-restartable services preset this in the // intialization method if (stopConditions == null) { // Grab a synchronized lock on the service factory before changing state and getting a snapshot of // the stopConditions. This allows other code to assure the service is in the correct state before // adding a stopCondition. // todo broken synchronized (serviceFactory) { state = ServiceState.STOPPING; stopConditions = new AggregateConditions(kernel, serviceName, classLoader, serviceFactory.getStopConditions(), lock); } serviceMonitor.serviceStopping(createServiceEvent()); // initialize all of the stop conditions stopConditions.initialize(); } // are we satisfied? Set unsatisfiedConditions = stopConditions.getUnsatisfied(); satisfied = unsatisfiedConditions.isEmpty(); if (!satisfied) { // if the stragegy wants us to wait for conditions to be satisfied, it will return true if (stopStrategy.waitForUnsatisfiedConditions(serviceName, unsatisfiedConditions)) { // wait for satisfaction and loop stopConditions.awaitSatisfaction(); } else { // no wait, notify the monitor and exit serviceMonitor.serviceWaitingToStop(createWaitingServiceEvent(unsatisfiedConditions)); return false; } } } } catch (UnsatisfiedConditionsException e) { throw e; } catch (ForcedStopException e) { serviceMonitor.serviceStopError(createErrorServiceEvent(e)); } catch (Exception e) { serviceMonitor.serviceStopError(createErrorServiceEvent(e)); } catch (Error e) { serviceMonitor.serviceStopError(createErrorServiceEvent(e)); } if (serviceFactory.isRestartable()) { try { // destroy the service serviceFactory.destroyService(standardServiceContext); } catch (Throwable e) { serviceMonitor.serviceStopError(createErrorServiceEvent(e)); } destroyAllConditions(serviceMonitor); service = null; startTime = 0; state = ServiceState.STOPPED; serviceMonitor.serviceStopped(createServiceEvent()); } return true; } finally { unlock(); } }
public boolean stop(StopStrategy stopStrategy) throws UnsatisfiedConditionsException { // check that we aren't already stopped before attempting to acquire the lock ServiceState initialState = state; if (initialState == ServiceState.STOPPED) { return true; } lock("stop"); try { try { // // Loop until all stop conditions have been satified. The stop strategy can break this loop. // boolean satisfied = false; while (!satisfied) { // do we still want to stop? if (state == ServiceState.STOPPED) { return true; } // if we are not the STOPPING state, transition to it // we check on the stopConditions variable because non-restartable services preset this in the // intialization method if (stopConditions == null) { // Grab a synchronized lock on the service factory before changing state and getting a snapshot of // the stopConditions. This allows other code to assure the service is in the correct state before // adding a stopCondition. // todo broken synchronized (serviceFactory) { state = ServiceState.STOPPING; stopConditions = new AggregateConditions(kernel, serviceName, classLoader, serviceFactory.getStopConditions(), lock); } serviceMonitor.serviceStopping(createServiceEvent()); // initialize all of the stop conditions stopConditions.initialize(); } // are we satisfied? Set unsatisfiedConditions = stopConditions.getUnsatisfied(); satisfied = unsatisfiedConditions.isEmpty(); if (!satisfied) { // if the stragegy wants us to wait for conditions to be satisfied, it will return true if (stopStrategy.waitForUnsatisfiedConditions(serviceName, unsatisfiedConditions)) { // wait for satisfaction and loop stopCondition.awaitSatisfaction(); } else { // no wait, notify the monitor and exit serviceMonitor.serviceWaitingToStop(createWaitingServiceEvent(unsatisfiedConditions)); return false; } } } } catch (UnsatisfiedConditionsException e) { throw e; } catch (ForcedStopException e) { serviceMonitor.serviceStopError(createErrorServiceEvent(e)); } catch (Exception e) { serviceMonitor.serviceStopError(createErrorServiceEvent(e)); } catch (Error e) { serviceMonitor.serviceStopError(createErrorServiceEvent(e)); } if (serviceFactory.isRestartable()) { try { // destroy the service serviceFactory.destroyService(standardServiceContext); } catch (Throwable e) { serviceMonitor.serviceStopError(createErrorServiceEvent(e)); } destroyAllConditions(serviceMonitor); service = null; startTime = 0; state = ServiceState.STOPPED; serviceMonitor.serviceStopped(createServiceEvent()); } return true; } finally { unlock(); } }
3,237,427
public boolean stop(StopStrategy stopStrategy) throws UnsatisfiedConditionsException { // check that we aren't already stopped before attempting to acquire the lock ServiceState initialState = state; if (initialState == ServiceState.STOPPED) { return true; } lock("stop"); try { try { // // Loop until all stop conditions have been satified. The stop strategy can break this loop. // boolean satisfied = false; while (!satisfied) { // do we still want to stop? if (state == ServiceState.STOPPED) { return true; } // if we are not the STOPPING state, transition to it // we check on the stopConditions variable because non-restartable services preset this in the // intialization method if (stopConditions == null) { // Grab a synchronized lock on the service factory before changing state and getting a snapshot of // the stopConditions. This allows other code to assure the service is in the correct state before // adding a stopCondition. // todo broken synchronized (serviceFactory) { state = ServiceState.STOPPING; stopConditions = new AggregateConditions(kernel, serviceName, classLoader, serviceFactory.getStopConditions(), lock); } serviceMonitor.serviceStopping(createServiceEvent()); // initialize all of the stop conditions stopConditions.initialize(); } // are we satisfied? Set unsatisfiedConditions = stopConditions.getUnsatisfied(); satisfied = unsatisfiedConditions.isEmpty(); if (!satisfied) { // if the stragegy wants us to wait for conditions to be satisfied, it will return true if (stopStrategy.waitForUnsatisfiedConditions(serviceName, unsatisfiedConditions)) { // wait for satisfaction and loop stopConditions.awaitSatisfaction(); } else { // no wait, notify the monitor and exit serviceMonitor.serviceWaitingToStop(createWaitingServiceEvent(unsatisfiedConditions)); return false; } } } } catch (UnsatisfiedConditionsException e) { throw e; } catch (ForcedStopException e) { serviceMonitor.serviceStopError(createErrorServiceEvent(e)); } catch (Exception e) { serviceMonitor.serviceStopError(createErrorServiceEvent(e)); } catch (Error e) { serviceMonitor.serviceStopError(createErrorServiceEvent(e)); } if (serviceFactory.isRestartable()) { try { // destroy the service serviceFactory.destroyService(standardServiceContext); } catch (Throwable e) { serviceMonitor.serviceStopError(createErrorServiceEvent(e)); } destroyAllConditions(serviceMonitor); service = null; startTime = 0; state = ServiceState.STOPPED; serviceMonitor.serviceStopped(createServiceEvent()); } return true; } finally { unlock(); } }
public boolean stop(StopStrategy stopStrategy) throws UnsatisfiedConditionsException { // check that we aren't already stopped before attempting to acquire the lock ServiceState initialState = state; if (initialState == ServiceState.STOPPED) { return true; } lock("stop"); try { try { // // Loop until all stop conditions have been satified. The stop strategy can break this loop. // boolean satisfied = false; while (!satisfied) { // do we still want to stop? if (state == ServiceState.STOPPED) { return true; } // if we are not the STOPPING state, transition to it // we check on the stopConditions variable because non-restartable services preset this in the // intialization method if (stopConditions == null) { // Grab a synchronized lock on the service factory before changing state and getting a snapshot of // the stopConditions. This allows other code to assure the service is in the correct state before // adding a stopCondition. // todo broken synchronized (serviceFactory) { state = ServiceState.STOPPING; stopConditions = new AggregateConditions(kernel, serviceName, classLoader, serviceFactory.getStopConditions(), lock); } serviceMonitor.serviceStopping(createServiceEvent()); // initialize all of the stop conditions stopConditions.initialize(); } // are we satisfied? Set unsatisfiedConditions = stopConditions.getUnsatisfied(); satisfied = unsatisfiedConditions.isEmpty(); if (!satisfied) { // if the stragegy wants us to wait for conditions to be satisfied, it will return true if (stopStrategy.waitForUnsatisfiedConditions(serviceName, unsatisfiedConditions)) { // wait for satisfaction and loop stopConditions.awaitSatisfaction(); } else { // no wait, notify the monitor and exit serviceMonitor.serviceWaitingToStop(createWaitingServiceEvent(unsatisfiedConditions)); return false; } } } } catch (UnsatisfiedConditionsException e) { throw e; } catch (ForcedStopException e) { serviceMonitor.serviceStopError(createErrorServiceEvent(e)); } catch (Exception e) { serviceMonitor.serviceStopError(createErrorServiceEvent(e)); } catch (Error e) { serviceMonitor.serviceStopError(createErrorServiceEvent(e)); } if (serviceFactory.isRestartable()) { try { // destroy the service serviceFactory.destroyService(standardServiceContext); } catch (Throwable e) { serviceMonitor.serviceStopError(createErrorServiceEvent(e)); } destroyAllConditions(serviceMonitor); service = null; startTime = 0; state = ServiceState.STOPPED; serviceMonitor.serviceStopped(createServiceEvent()); } return true; } finally { unlock(); } }
3,237,428
public ObjectSpaceIterator(RubyModule rubyClass) { this.rubyClass = rubyClass; this.iterator = new ArrayList(references).iterator(); prefetch(); }
public ObjectSpaceIterator(RubyModule rubyClass) { this.rubyClass = rubyClass; this.iterator = new ArrayList(references).iterator(); prefetch(); }
3,237,429
public String toString(){ return "Project"+(projectId==null ? ":Hash"+this.hashCode() : ":"+projectId); }
public String toString(){ return "Project"+(projectId==null ? ":Hash_"+this.hashCode() : ":Id_"+projectId); }
3,237,430
public void clearThumbnails() { thumbnailSet.clear(); for(Iterator iter = groupModels.iterator(); iter.hasNext();) { GroupModel group = (GroupModel)iter.next(); group.clearThumbnails(); } updateModelListeners(); }
public void clearThumbnails() { thumbnailSet.clear(); GroupModel[] models = groupingMethod.getGroups(); for(int i=0;i<models.length;i++) { GroupModel group = (GroupModel)iter.next(); group.clearThumbnails(); } updateModelListeners(); }
3,237,431
public void clearThumbnails() { thumbnailSet.clear(); for(Iterator iter = groupModels.iterator(); iter.hasNext();) { GroupModel group = (GroupModel)iter.next(); group.clearThumbnails(); } updateModelListeners(); }
public void clearThumbnails() { thumbnailSet.clear(); for(Iterator iter = groupModels.iterator(); iter.hasNext();) { GroupModel group = (GroupModel)iter.next(); group.clearThumbnails(); } updateModelListeners(); }
3,237,432
private void init() { env = BrowserEnvironment.getInstance(); progressListeners = new HashSet(); modelListeners = new HashSet(); selectedThumbnails = new HashSet(); attributeMap = new AttributeMap(); groupingMethod = new SingleGroupingMethod(); groupModels = Arrays.asList(groupingMethod.getGroups()); thumbnailSet = new HashSet(); imageIDMap = new HashMap(); annotationModel = new PaintMethodZOrder(); modeClassMap = new HashMap(); availableTypesList = new ArrayList(); categoryTree = new CategoryTree(); // empty category tree. panActionClass = new BrowserModeClass(PAN_MODE_NAME, new BrowserMode[] { BrowserMode.DEFAULT_MODE, BrowserMode.HAND_MODE}, BrowserMode.DEFAULT_MODE); majorUIModeClass = new BrowserModeClass(MAJOR_UI_MODE_NAME, new BrowserMode[] { BrowserMode.DEFAULT_MODE, BrowserMode.ANNOTATE_MODE, BrowserMode.CLASSIFY_MODE, BrowserMode.GRAPH_MODE}, BrowserMode.DEFAULT_MODE); selectModeClass = new BrowserModeClass(SELECT_MODE_NAME, new BrowserMode[] { BrowserMode.UNSELECTED_MODE, BrowserMode.SELECTING_MODE, BrowserMode.SELECTED_MODE}, BrowserMode.UNSELECTED_MODE); zoomModeClass = new BrowserModeClass(ZOOM_MODE_NAME, new BrowserMode[] { BrowserMode.ZOOM_TO_FIT_MODE, BrowserMode.ZOOM_50_MODE, BrowserMode.ZOOM_75_MODE, BrowserMode.ZOOM_ACTUAL_MODE, BrowserMode.ZOOM_200_MODE}, BrowserMode.ZOOM_TO_FIT_MODE); semanticModeClass = new BrowserModeClass(SEMANTIC_MODE_NAME, new BrowserMode[] { BrowserMode.NOOP_MODE, BrowserMode.IMAGE_NAME_MODE, BrowserMode.SEMANTIC_ZOOMING_MODE}, BrowserMode.SEMANTIC_ZOOMING_MODE); modeClassMap.put(PAN_MODE_NAME,panActionClass); modeClassMap.put(MAJOR_UI_MODE_NAME,majorUIModeClass); modeClassMap.put(SELECT_MODE_NAME,selectModeClass); modeClassMap.put(ZOOM_MODE_NAME,zoomModeClass); modeClassMap.put(SEMANTIC_MODE_NAME,semanticModeClass); }
private void init() { env = BrowserEnvironment.getInstance(); progressListeners = new HashSet(); modelListeners = new HashSet(); selectedThumbnails = new HashSet(); attributeMap = new AttributeMap(); groupingMethod = new SingleGroupingMethod(); defaultGroupingMethod = groupingMethod; thumbnailSet = new HashSet(); imageIDMap = new HashMap(); annotationModel = new PaintMethodZOrder(); modeClassMap = new HashMap(); availableTypesList = new ArrayList(); categoryTree = new CategoryTree(); // empty category tree. panActionClass = new BrowserModeClass(PAN_MODE_NAME, new BrowserMode[] { BrowserMode.DEFAULT_MODE, BrowserMode.HAND_MODE}, BrowserMode.DEFAULT_MODE); majorUIModeClass = new BrowserModeClass(MAJOR_UI_MODE_NAME, new BrowserMode[] { BrowserMode.DEFAULT_MODE, BrowserMode.ANNOTATE_MODE, BrowserMode.CLASSIFY_MODE, BrowserMode.GRAPH_MODE}, BrowserMode.DEFAULT_MODE); selectModeClass = new BrowserModeClass(SELECT_MODE_NAME, new BrowserMode[] { BrowserMode.UNSELECTED_MODE, BrowserMode.SELECTING_MODE, BrowserMode.SELECTED_MODE}, BrowserMode.UNSELECTED_MODE); zoomModeClass = new BrowserModeClass(ZOOM_MODE_NAME, new BrowserMode[] { BrowserMode.ZOOM_TO_FIT_MODE, BrowserMode.ZOOM_50_MODE, BrowserMode.ZOOM_75_MODE, BrowserMode.ZOOM_ACTUAL_MODE, BrowserMode.ZOOM_200_MODE}, BrowserMode.ZOOM_TO_FIT_MODE); semanticModeClass = new BrowserModeClass(SEMANTIC_MODE_NAME, new BrowserMode[] { BrowserMode.NOOP_MODE, BrowserMode.IMAGE_NAME_MODE, BrowserMode.SEMANTIC_ZOOMING_MODE}, BrowserMode.SEMANTIC_ZOOMING_MODE); modeClassMap.put(PAN_MODE_NAME,panActionClass); modeClassMap.put(MAJOR_UI_MODE_NAME,majorUIModeClass); modeClassMap.put(SELECT_MODE_NAME,selectModeClass); modeClassMap.put(ZOOM_MODE_NAME,zoomModeClass); modeClassMap.put(SEMANTIC_MODE_NAME,semanticModeClass); }
3,237,433
public void actionPerformed(ActionEvent e) { int index = Integer.parseInt(e.getActionCommand()); try { switch (index) { case T_FIELD_CMD: tFieldActionHandler(); break; case Z_FIELD_CMD: zFieldActionHandler(); break; case RENDER_CMD: control.showRendering(); break; case INSPECTOR_CMD: control.showInspector(); break; case SAVEAS_CMD: control.showImageSaver(); break; case VIEWER3D_CMD: control.showImage3DViewer(); break; case MOVIE_CMD: control.showMovie(); break; } } catch(NumberFormatException nfe) { throw new Error("Invalid Action ID "+index, nfe); } }
public void actionPerformed(ActionEvent e) { int index = Integer.parseInt(e.getActionCommand()); try { switch (index) { case T_FIELD_CMD: tFieldActionHandler(); break; case Z_FIELD_CMD: zFieldActionHandler(); break; case RENDER_CMD: control.showRendering(); break; case INSPECTOR_CMD: control.showInspector(); break; case SAVEAS_CMD: control.showImageSaver(); break; case VIEWER3D_CMD: control.showImage3DViewer(); break; case MOVIE_CMD: control.showMovie(); break; } } catch(NumberFormatException nfe) { throw new Error("Invalid Action ID "+index, nfe); } }
3,237,436
public void actionPerformed(ActionEvent e) { int index = Integer.parseInt(e.getActionCommand()); try { switch (index) { case T_FIELD_CMD: tFieldActionHandler(); break; case Z_FIELD_CMD: zFieldActionHandler(); break; case RENDER_CMD: control.showRendering(); break; case INSPECTOR_CMD: control.showInspector(); break; case SAVEAS_CMD: control.showImageSaver(); break; case VIEWER3D_CMD: control.showImage3DViewer(); break; case MOVIE_CMD: control.showMovie(); break; } } catch(NumberFormatException nfe) { throw new Error("Invalid Action ID "+index, nfe); } }
public void actionPerformed(ActionEvent e) { int index = Integer.parseInt(e.getActionCommand()); try { switch (index) { case T_FIELD_CMD: tFieldActionHandler(); break; case Z_FIELD_CMD: zFieldActionHandler(); break; case RENDER_CMD: control.showRendering(); break; case INSPECTOR_CMD: control.showInspector(); break; case SAVEAS_CMD: control.showImageSaver(); break; case VIEWER3D_CMD: control.showImage3DViewer(); break; case MOVIE_CMD: control.showMovie(); break; } } catch(NumberFormatException nfe) { throw new Error("Invalid Action ID "+index, nfe); } }
3,237,437
public void focusLost(FocusEvent e) { String tVal = view.getTField().getText(), t = ""+curT; String zVal = view.getZField().getText(), z = ""+curZ; if (tVal == null || !tVal.equals(t)) view.getTField().setText(t); if (zVal == null || !zVal.equals(z)) view.getZField().setText(z); }
public void focusLost(FocusEvent e) { String tVal = view.getTField().getText(), t = ""+curT; String zVal = view.getZField().getText(), z = ""+curZ; if (tVal == null || !tVal.equals(t)) view.getTField().setText(t); if (zVal == null || !zVal.equals(z)) view.getZField().setText(z); }
3,237,438
private void tFieldActionHandler() { boolean valid = false; int val = 0; try { val = Integer.parseInt(view.getTField().getText()); if (0 <= val && val <= maxT) valid = true; } catch(NumberFormatException nfe) {} if (valid) { curT = val; control.onTChange(curZ, curT); } else { view.getTField().selectAll(); UserNotifier un = control.getRegistry().getUserNotifier(); un.notifyInfo("Invalid timepoint", "Please enter a timepoint between 0 and "+maxT); } }
private void tFieldActionHandler() { boolean valid = false; int val = 0; try { val = Integer.parseInt(view.getTField().getText()); if (0 <= val && val <= maxT) valid = true; } catch(NumberFormatException nfe) {} if (valid) { curT = val; control.onTChange(curZ, curT); } else { view.getTField().selectAll(); UserNotifier un = control.getRegistry().getUserNotifier(); un.notifyInfo("Invalid timepoint", "Please enter a timepoint between 0 and "+maxT); } }
3,237,439
private void zFieldActionHandler() { boolean valid = false; int val = 0; try { val = Integer.parseInt(view.getZField().getText()); if (0 <= val && val <= maxZ) valid = true; } catch(NumberFormatException nfe) {} if (valid) { curZ = val; control.onZChange(curZ, curT); } else { view.getZField().selectAll(); UserNotifier un = control.getRegistry().getUserNotifier(); un.notifyInfo("Invalid z-section", "Please enter a z-section between 0 and "+maxZ); } }
private void zFieldActionHandler() { boolean valid = false; int val = 0; try { val = Integer.parseInt(view.getZField().getText()); if (0 <= val && val <= maxZ) valid = true; } catch(NumberFormatException nfe) {} if (valid) { curZ = val; control.onZChange(curZ, curT); } else { view.getZField().selectAll(); UserNotifier un = control.getRegistry().getUserNotifier(); un.notifyInfo("Invalid z-section", "Please enter a z-section between 0 and "+maxZ); } }
3,237,440
public LineGeometry(SpotsTrajectory t,Extents extents) { super(t.getLength(),GeometryArray.COORDINATES,new int[] {t.getLength()}); this.traj=t; this.extents = extents; // set coordinates pts = new Point3d[t.getLength()]; for (int i = 0; i < t.getLength(); i++) { SpotsTrajectoryEntry pt = traj.getPoint(i); pts[i] = extents.calculatePoint(pt); } // setCapability(GeometryArray.ALLOW_COORDINATE_READ); setCapability(GeometryArray.ALLOW_COORDINATE_WRITE); setCapability(GeometryArray.ALLOW_REF_DATA_READ); setCapability(GeometryArray.ALLOW_REF_DATA_WRITE); setCapability(GeometryArray.ALLOW_INTERSECT); setCapability(Primitive.ENABLE_GEOMETRY_PICKING); setCoordinates(0,pts); }
public LineGeometry(SpotsTrajectory t,Extents extents) { super(t.getLength(),GeometryArray.COORDINATES,new int[] {t.getLength()}); this.traj=t; this.extents = extents; // set coordinates pts = new Point3d[t.getLength()]; for (int i = 0; i < t.getLength(); i++) { SpotsTrajectoryEntry pt = traj.getPoint(i); pts[i] = extents.calculatePoint(pt); } // setCapability(GeometryArray.ALLOW_COORDINATE_READ); setCapability(GeometryArray.ALLOW_COORDINATE_WRITE); setCapability(GeometryArray.ALLOW_REF_DATA_READ); setCapability(GeometryArray.ALLOW_REF_DATA_WRITE); setCapability(GeometryArray.ALLOW_INTERSECT); setCapability(Primitive.ENABLE_GEOMETRY_PICKING); setCoordinates(0,pts); }
3,237,441
public void mousePressed(MouseEvent e) { Point p = new Point(e.getPoint()); view.resetLens(); if (!dragging && onOff && drawingArea.contains(p)) { dragging = true; drawLens(p); } }
public void mousePressed(MouseEvent e) { Point p = new Point(e.getPoint()); view.resetLens(); if (!dragging && onOff && drawingArea.contains(p)) { dragging = true; drawLens(p); } }
3,237,442
public ImageInspectorManager(ImageInspector view, ViewerCtrl control, double magFactor) { this.view = view; this.control = control; curZoomLevel = magFactor; attachListener(); }
public ImageInspectorManager(ImageInspector view, ViewerCtrl control, double magFactor) { this.view = view; this.control = control; curZoomLevel = magFactor; attachListener(); }
3,237,443
public ImageInspectorManager(ImageInspector view, ViewerCtrl control, double magFactor) { this.view = view; this.control = control; curZoomLevel = magFactor; attachListener(); }
public ImageInspectorManager(ImageInspector view, ViewerCtrl control, double magFactor) { this.view = view; this.control = control; curZoomLevel = magFactor; attachListener(); }
3,237,444
private void attachListener() { view.addWindowListener(new WindowAdapter() { public void windowClosing(WindowEvent we) { onClosing(); } }); }
private void attachListener() { view.addWindowListener(new WindowAdapter() { public void windowClosing(WindowEvent we) { onClosing(); } }); }
3,237,445
private void onClosing() { control.setMagFactor(curZoomLevel); view.dispose(); }
private void onClosing() { canvas.resetLens(); canvas.repaint(); view.dispose(); }
3,237,446
void setImageDimension(int width, int height) { imageWidth = width; imageHeight = height; }
void setImageDimension(int width, int height) { imageWidth = width; imageHeight = height; }
3,237,447
public void setZoomLevel(double level) { if (curZoomLevel != level) { zoom(level); curZoomLevel = level; } }
public void setZoomLevel(double level) { if (curZoomLevel != level) { zoom(level); curZoomLevel = level; } }
3,237,448
private void zoom(double level) { ZoomBar zoomBar = view.toolBar.getZoomBar(); zoomBar.getManager().setText(level); ZoomMenu zoomMenu = view.menuBar.getZoomMenu(); zoomMenu.getManager().setItemSelected(level); int w = (int) (imageWidth*level)+2*ViewerUIF.START; int h = (int) (imageHeight*level)+2*ViewerUIF.START; control.setSizePaintedComponents(new Dimension(w, h)); canvas.paintImage(level, w, h); }
private void zoom(double level) { ZoomBar zoomBar = view.toolBar.getZoomBar(); zoomBar.getManager().setText(level); ZoomMenu zoomMenu = view.menuBar.getZoomMenu(); zoomMenu.getManager().setItemSelected(level); int w = (int) (imageWidth*level)+2*ViewerUIF.START; int h = (int) (imageHeight*level)+2*ViewerUIF.START; control.setSizePaintedComponents(new Dimension(w, h)); canvas.paintImage(level, w, h); }
3,237,449
private void zoom(double level) { ZoomBar zoomBar = view.toolBar.getZoomBar(); zoomBar.getManager().setText(level); ZoomMenu zoomMenu = view.menuBar.getZoomMenu(); zoomMenu.getManager().setItemSelected(level); int w = (int) (imageWidth*level)+2*ViewerUIF.START; int h = (int) (imageHeight*level)+2*ViewerUIF.START; control.setSizePaintedComponents(new Dimension(w, h)); canvas.paintImage(level, w, h); }
private void zoom(double level) { ZoomBar zoomBar = view.toolBar.getZoomBar(); zoomBar.getManager().setText(level); ZoomMenu zoomMenu = view.menuBar.getZoomMenu(); zoomMenu.getManager().setItemSelected(level); int w = (int) (imageWidth*level)+2*ViewerUIF.START; int h = (int) (imageHeight*level)+2*ViewerUIF.START; control.setSizePaintedComponents(new Dimension(w, h)); canvas.paintImage(level, w, h); }
3,237,450
public static String summary(Object a) { Map count = new HashMap(); StringBuffer sb = new StringBuffer(summary(a, "\n", count)); sb.append("-----------------------------\n"); for (Iterator i = count.keySet().iterator(); i.hasNext();) { Class c = (Class) i.next(); Set set = (Set) count.get(c); sb.append(set.size()); sb.append("\t"); sb.append(c); sb.append("\n"); } return sb.toString(); }
public static String summary(Object a) { Map count = new HashMap(); StringBuffer sb = new StringBuffer(summary(a, "\n", count)); sb.append("\n-----------------------------\n"); for (Iterator i = count.keySet().iterator(); i.hasNext();) { Class c = (Class) i.next(); Set set = (Set) count.get(c); sb.append(set.size()); sb.append("\t"); sb.append(c); sb.append("\n"); } return sb.toString(); }
3,237,451
private void handleRaise(JumpException je) { RaiseException re = (RaiseException)je; RubyException raisedException = re.getException(); setResult(raisedException); // TODO: Rubicon TestKernel dies without this line. A cursory glance implies we // falsely set $! to nil and this sets it back to something valid. This should // get fixed at the same time we address bug #1296484. runtime.getGlobalVariables().set("$!", raisedException); // FIXME: don't use the raise rethrower; work with the exception rethrower like all other handlers do // pop everything but nearest rescuable while (!(getCurrentInstructionStack() == null || getCurrentInstructionStack().rescuable)) { InstructionBundle ib = getCurrentInstructionStack(); if (ib.ensured) { // exec ensured node, return to "breaking" afterwards popCurrentInstruction(); setCurrentException(je); addInstruction(ib.instructionContext, raiseRethrower); addInstructionBundle(ib); return; } popCurrentInstruction(); } if (getCurrentInstructionStack() == null ) { // no rescuers, throw exception to next level throw re; } // we're at rescuer now RescueNode iVisited = (RescueNode)getCurrentInstructionStack().instructionContext; popCurrentInstruction(); RescueBodyNode rescueBodyNode = iVisited.getRescueNode(); while (rescueBodyNode != null) { Node exceptionNodes = rescueBodyNode.getExceptionNodes(); ListNode exceptionNodesList; // need to make these iterative if (exceptionNodes instanceof SplatNode) { exceptionNodesList = (ListNode) begin(exceptionNodes); } else { exceptionNodesList = (ListNode) exceptionNodes; } if (isRescueHandled(raisedException, exceptionNodesList)) { addRetriableInstruction(iVisited); addNodeInstruction(rescueBodyNode); setCurrentException(null); clearResult(); return; } rescueBodyNode = rescueBodyNode.getOptRescueNode(); } // no takers; bubble up throw je; }
private void handleRaise(JumpException je) { RaiseException re = (RaiseException)je; RubyException raisedException = re.getException(); flushResults(); // TODO: Rubicon TestKernel dies without this line. A cursory glance implies we // falsely set $! to nil and this sets it back to something valid. This should // get fixed at the same time we address bug #1296484. runtime.getGlobalVariables().set("$!", raisedException); // FIXME: don't use the raise rethrower; work with the exception rethrower like all other handlers do // pop everything but nearest rescuable while (!(getCurrentInstructionStack() == null || getCurrentInstructionStack().rescuable)) { InstructionBundle ib = getCurrentInstructionStack(); if (ib.ensured) { // exec ensured node, return to "breaking" afterwards popCurrentInstruction(); setCurrentException(je); addInstruction(ib.instructionContext, raiseRethrower); addInstructionBundle(ib); return; } popCurrentInstruction(); } if (getCurrentInstructionStack() == null ) { // no rescuers, throw exception to next level throw re; } // we're at rescuer now RescueNode iVisited = (RescueNode)getCurrentInstructionStack().instructionContext; popCurrentInstruction(); RescueBodyNode rescueBodyNode = iVisited.getRescueNode(); while (rescueBodyNode != null) { Node exceptionNodes = rescueBodyNode.getExceptionNodes(); ListNode exceptionNodesList; // need to make these iterative if (exceptionNodes instanceof SplatNode) { exceptionNodesList = (ListNode) begin(exceptionNodes); } else { exceptionNodesList = (ListNode) exceptionNodes; } if (isRescueHandled(raisedException, exceptionNodesList)) { addRetriableInstruction(iVisited); addNodeInstruction(rescueBodyNode); setCurrentException(null); clearResult(); return; } rescueBodyNode = rescueBodyNode.getOptRescueNode(); } // no takers; bubble up throw je; }
3,237,454
public void initLoad(ArrayList ioAdditionalDirectory) { // don't know what this is used for in MRI, it holds the handle of all loaded libs // ruby_dln_librefs = rb_ary_new(); //in MRI the ruby installation path is determined from the place where the ruby lib is found //of course we can't do that, let's just use the jruby.home property String lRubyHome = System.getProperty("jruby.home"); String lRubyLib = System.getProperty("jruby.lib", lRubyHome + File.separatorChar + "lib"); for (int i = ioAdditionalDirectory.size() - 1; i >= 0; i--) { ioAdditionalDirectory.set(i, new RubyString(this, (String) ioAdditionalDirectory.get(i))); } if (lRubyLib != null && lRubyLib.length() != 0) { ioAdditionalDirectory.add(new RubyString(this, lRubyLib)); } if (lRubyHome != null && lRubyHome.length() != 0) { //FIXME: use the version number in some other way than hardcoded here String lRuby = lRubyHome + File.separatorChar + "lib" + File.separatorChar + "ruby" + File.separatorChar; String lSiteRuby = lRuby + "site_ruby"; String lSiteRubyVersion = lSiteRuby + File.separatorChar + RUBY_VERSION; String lArch = File.separatorChar + "JAVA"; String lRubyVersion = lRuby + RUBY_VERSION; ioAdditionalDirectory.add(new RubyString(this, lSiteRubyVersion)); ioAdditionalDirectory.add(new RubyString(this, lSiteRubyVersion + lArch)); ioAdditionalDirectory.add(new RubyString(this, lSiteRuby)); ioAdditionalDirectory.add(new RubyString(this, lRubyVersion)); ioAdditionalDirectory.add(new RubyString(this, lRubyVersion + lArch)); } //FIXME: safe level pb here ioAdditionalDirectory.add(new RubyString(this, ".")); RubyArray rb_load_path = new RubyArray(this, ioAdditionalDirectory); defineReadonlyVariable("$:", rb_load_path); defineReadonlyVariable("$-I", rb_load_path); defineReadonlyVariable("$LOAD_PATH", rb_load_path); RubyArray rb_features = new RubyArray(this); defineReadonlyVariable("$\"", rb_features); }
public void initLoad(ArrayList ioAdditionalDirectory) { // don't know what this is used for in MRI, it holds the handle of all loaded libs // ruby_dln_librefs = rb_ary_new(); //in MRI the ruby installation path is determined from the place where the ruby lib is found //of course we can't do that, let's just use the jruby.home property String lRubyHome = System.getProperty("jruby.home"); String lRubyLib = System.getProperty("jruby.lib", lRubyHome + File.separatorChar + "lib"); for (int i = ioAdditionalDirectory.size() - 1; i >= 0; i--) { ioAdditionalDirectory.set(i, new RubyString(this, (String) ioAdditionalDirectory.get(i))); } if (lRubyLib != null && lRubyLib.length() != 0) { ioAdditionalDirectory.add(new RubyString(this, lRubyLib)); } if (lRubyHome != null && lRubyHome.length() != 0) { //FIXME: use the version number in some other way than hardcoded here String lRuby = lRubyHome + File.separatorChar + "lib" + File.separatorChar + "ruby" + File.separatorChar; String lSiteRuby = lRuby + "site_ruby"; String lSiteRubyVersion = lSiteRuby + File.separatorChar + RUBY_VERSION; String lArch = File.separatorChar + "JAVA"; String lRubyVersion = lRuby + RUBY_VERSION; ioAdditionalDirectory.add(new RubyString(this, lSiteRubyVersion)); ioAdditionalDirectory.add(new RubyString(this, lSiteRubyVersion + lArch)); ioAdditionalDirectory.add(new RubyString(this, lSiteRuby)); ioAdditionalDirectory.add(new RubyString(this, lRubyVersion)); ioAdditionalDirectory.add(new RubyString(this, lRubyVersion + lArch)); } //FIXME: safe level pb here ioAdditionalDirectory.add(new RubyString(this, ".")); RubyArray rb_load_path = new RubyArray(this, ioAdditionalDirectory); defineReadonlyVariable("$:", rb_load_path); defineReadonlyVariable("$-I", rb_load_path); defineReadonlyVariable("$LOAD_PATH", rb_load_path); RubyArray rb_features = new RubyArray(this); defineReadonlyVariable("$\"", rb_features); }
3,237,455
public void initLoad(ArrayList ioAdditionalDirectory) { // don't know what this is used for in MRI, it holds the handle of all loaded libs // ruby_dln_librefs = rb_ary_new(); //in MRI the ruby installation path is determined from the place where the ruby lib is found //of course we can't do that, let's just use the jruby.home property String lRubyHome = System.getProperty("jruby.home"); String lRubyLib = System.getProperty("jruby.lib", lRubyHome + File.separatorChar + "lib"); for (int i = ioAdditionalDirectory.size() - 1; i >= 0; i--) { ioAdditionalDirectory.set(i, new RubyString(this, (String) ioAdditionalDirectory.get(i))); } if (lRubyLib != null && lRubyLib.length() != 0) { ioAdditionalDirectory.add(new RubyString(this, lRubyLib)); } if (lRubyHome != null && lRubyHome.length() != 0) { //FIXME: use the version number in some other way than hardcoded here String lRuby = lRubyHome + File.separatorChar + "lib" + File.separatorChar + "ruby" + File.separatorChar; String lSiteRuby = lRuby + "site_ruby"; String lSiteRubyVersion = lSiteRuby + File.separatorChar + RUBY_VERSION; String lArch = File.separatorChar + "JAVA"; String lRubyVersion = lRuby + RUBY_VERSION; ioAdditionalDirectory.add(new RubyString(this, lSiteRubyVersion)); ioAdditionalDirectory.add(new RubyString(this, lSiteRubyVersion + lArch)); ioAdditionalDirectory.add(new RubyString(this, lSiteRuby)); ioAdditionalDirectory.add(new RubyString(this, lRubyVersion)); ioAdditionalDirectory.add(new RubyString(this, lRubyVersion + lArch)); } //FIXME: safe level pb here ioAdditionalDirectory.add(new RubyString(this, ".")); RubyArray rb_load_path = new RubyArray(this, ioAdditionalDirectory); defineReadonlyVariable("$:", rb_load_path); defineReadonlyVariable("$-I", rb_load_path); defineReadonlyVariable("$LOAD_PATH", rb_load_path); RubyArray rb_features = new RubyArray(this); defineReadonlyVariable("$\"", rb_features); }
public void initLoad(ArrayList ioAdditionalDirectory) { // don't know what this is used for in MRI, it holds the handle of all loaded libs // ruby_dln_librefs = rb_ary_new(); //in MRI the ruby installation path is determined from the place where the ruby lib is found //of course we can't do that, let's just use the jruby.home property String lRubyHome = System.getProperty("jruby.home"); String lRubyLib = System.getProperty("jruby.lib"); /*if (lRubyLib == null && lRubyHome != null && lRubyHome.length() != 0) { lRubyLib = lRubyHome + File.separatorChar + "lib"; }*/ for (int i = ioAdditionalDirectory.size() - 1; i >= 0; i--) { ioAdditionalDirectory.set(i, new RubyString(this, (String) ioAdditionalDirectory.get(i))); } if (lRubyLib != null && lRubyLib.length() != 0) { ioAdditionalDirectory.add(new RubyString(this, lRubyLib)); } if (lRubyHome != null && lRubyHome.length() != 0) { //FIXME: use the version number in some other way than hardcoded here String lRuby = lRubyHome + File.separatorChar + "lib" + File.separatorChar + "ruby" + File.separatorChar; String lSiteRuby = lRuby + "site_ruby"; String lSiteRubyVersion = lSiteRuby + File.separatorChar + RUBY_VERSION; String lArch = File.separatorChar + "JAVA"; String lRubyVersion = lRuby + RUBY_VERSION; ioAdditionalDirectory.add(new RubyString(this, lSiteRubyVersion)); ioAdditionalDirectory.add(new RubyString(this, lSiteRubyVersion + lArch)); ioAdditionalDirectory.add(new RubyString(this, lSiteRuby)); ioAdditionalDirectory.add(new RubyString(this, lRubyVersion)); ioAdditionalDirectory.add(new RubyString(this, lRubyVersion + lArch)); } //FIXME: safe level pb here ioAdditionalDirectory.add(new RubyString(this, ".")); RubyArray rb_load_path = new RubyArray(this, ioAdditionalDirectory); defineReadonlyVariable("$:", rb_load_path); defineReadonlyVariable("$-I", rb_load_path); defineReadonlyVariable("$LOAD_PATH", rb_load_path); RubyArray rb_features = new RubyArray(this); defineReadonlyVariable("$\"", rb_features); }
3,237,456
private void addContactListToWorkspace() { Workspace workspace = SparkManager.getWorkspace(); workspace.getWorkspacePane().addTab("Contacts", SparkRes.getImageIcon(SparkRes.SMALL_ALL_CHATS_IMAGE), this); //NOTRANS // Add To Contacts Menu final JMenu contactsMenu = SparkManager.getMainWindow().getMenuByName("Contacts"); JMenuItem addContactsMenu = new JMenuItem("", SparkRes.getImageIcon(SparkRes.USER1_ADD_16x16)); ResourceUtils.resButton(addContactsMenu, "&Add Contact"); ResourceUtils.resButton(addContactGroupMenu, "Add Contact &Group"); contactsMenu.add(addContactsMenu); contactsMenu.add(addContactGroupMenu); addContactsMenu.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { new RosterDialog().showRosterDialog(); } }); addContactGroupMenu.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { String groupName = JOptionPane.showInputDialog(getGUI(), Res.getString("message.name.of.group") + ":", Res.getString("title.add.new.group"), JOptionPane.QUESTION_MESSAGE); if (ModelUtil.hasLength(groupName)) { ContactGroup contactGroup = getContactGroup(groupName); if (contactGroup == null) { contactGroup = addContactGroup(groupName); contactGroup.setVisible(true); validateTree(); repaint(); } } } }); // Add Toggle Contacts Menu ResourceUtils.resButton(showHideMenu, Res.getString("menuitem.show.empty.groups")); contactsMenu.add(showHideMenu); showHideMenu.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { showEmptyGroups(showHideMenu.isSelected()); } }); // Initialize vcard support SparkManager.getVCardManager(); }
private void addContactListToWorkspace() { Workspace workspace = SparkManager.getWorkspace(); workspace.getWorkspacePane().addTab(Res.getString("tab.contacts"), SparkRes.getImageIcon(SparkRes.SMALL_ALL_CHATS_IMAGE), this); //NOTRANS // Add To Contacts Menu final JMenu contactsMenu = SparkManager.getMainWindow().getMenuByName("Contacts"); JMenuItem addContactsMenu = new JMenuItem("", SparkRes.getImageIcon(SparkRes.USER1_ADD_16x16)); ResourceUtils.resButton(addContactsMenu, "&Add Contact"); ResourceUtils.resButton(addContactGroupMenu, "Add Contact &Group"); contactsMenu.add(addContactsMenu); contactsMenu.add(addContactGroupMenu); addContactsMenu.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { new RosterDialog().showRosterDialog(); } }); addContactGroupMenu.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { String groupName = JOptionPane.showInputDialog(getGUI(), Res.getString("message.name.of.group") + ":", Res.getString("title.add.new.group"), JOptionPane.QUESTION_MESSAGE); if (ModelUtil.hasLength(groupName)) { ContactGroup contactGroup = getContactGroup(groupName); if (contactGroup == null) { contactGroup = addContactGroup(groupName); contactGroup.setVisible(true); validateTree(); repaint(); } } } }); // Add Toggle Contacts Menu ResourceUtils.resButton(showHideMenu, Res.getString("menuitem.show.empty.groups")); contactsMenu.add(showHideMenu); showHideMenu.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { showEmptyGroups(showHideMenu.isSelected()); } }); // Initialize vcard support SparkManager.getVCardManager(); }
3,237,460
private void addContactListToWorkspace() { Workspace workspace = SparkManager.getWorkspace(); workspace.getWorkspacePane().addTab("Contacts", SparkRes.getImageIcon(SparkRes.SMALL_ALL_CHATS_IMAGE), this); //NOTRANS // Add To Contacts Menu final JMenu contactsMenu = SparkManager.getMainWindow().getMenuByName("Contacts"); JMenuItem addContactsMenu = new JMenuItem("", SparkRes.getImageIcon(SparkRes.USER1_ADD_16x16)); ResourceUtils.resButton(addContactsMenu, "&Add Contact"); ResourceUtils.resButton(addContactGroupMenu, "Add Contact &Group"); contactsMenu.add(addContactsMenu); contactsMenu.add(addContactGroupMenu); addContactsMenu.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { new RosterDialog().showRosterDialog(); } }); addContactGroupMenu.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { String groupName = JOptionPane.showInputDialog(getGUI(), Res.getString("message.name.of.group") + ":", Res.getString("title.add.new.group"), JOptionPane.QUESTION_MESSAGE); if (ModelUtil.hasLength(groupName)) { ContactGroup contactGroup = getContactGroup(groupName); if (contactGroup == null) { contactGroup = addContactGroup(groupName); contactGroup.setVisible(true); validateTree(); repaint(); } } } }); // Add Toggle Contacts Menu ResourceUtils.resButton(showHideMenu, Res.getString("menuitem.show.empty.groups")); contactsMenu.add(showHideMenu); showHideMenu.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { showEmptyGroups(showHideMenu.isSelected()); } }); // Initialize vcard support SparkManager.getVCardManager(); }
private void addContactListToWorkspace() { Workspace workspace = SparkManager.getWorkspace(); workspace.getWorkspacePane().addTab("Contacts", SparkRes.getImageIcon(SparkRes.SMALL_ALL_CHATS_IMAGE), this); //NOTRANS // Add To Contacts Menu final JMenu contactsMenu = SparkManager.getMainWindow().getMenuByName(Res.getString("menuitem.contacts")); JMenuItem addContactsMenu = new JMenuItem("", SparkRes.getImageIcon(SparkRes.USER1_ADD_16x16)); ResourceUtils.resButton(addContactsMenu, "&Add Contact"); ResourceUtils.resButton(addContactGroupMenu, "Add Contact &Group"); contactsMenu.add(addContactsMenu); contactsMenu.add(addContactGroupMenu); addContactsMenu.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { new RosterDialog().showRosterDialog(); } }); addContactGroupMenu.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { String groupName = JOptionPane.showInputDialog(getGUI(), Res.getString("message.name.of.group") + ":", Res.getString("title.add.new.group"), JOptionPane.QUESTION_MESSAGE); if (ModelUtil.hasLength(groupName)) { ContactGroup contactGroup = getContactGroup(groupName); if (contactGroup == null) { contactGroup = addContactGroup(groupName); contactGroup.setVisible(true); validateTree(); repaint(); } } } }); // Add Toggle Contacts Menu ResourceUtils.resButton(showHideMenu, Res.getString("menuitem.show.empty.groups")); contactsMenu.add(showHideMenu); showHideMenu.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { showEmptyGroups(showHideMenu.isSelected()); } }); // Initialize vcard support SparkManager.getVCardManager(); }
3,237,461
private void addContactListToWorkspace() { Workspace workspace = SparkManager.getWorkspace(); workspace.getWorkspacePane().addTab("Contacts", SparkRes.getImageIcon(SparkRes.SMALL_ALL_CHATS_IMAGE), this); //NOTRANS // Add To Contacts Menu final JMenu contactsMenu = SparkManager.getMainWindow().getMenuByName("Contacts"); JMenuItem addContactsMenu = new JMenuItem("", SparkRes.getImageIcon(SparkRes.USER1_ADD_16x16)); ResourceUtils.resButton(addContactsMenu, "&Add Contact"); ResourceUtils.resButton(addContactGroupMenu, "Add Contact &Group"); contactsMenu.add(addContactsMenu); contactsMenu.add(addContactGroupMenu); addContactsMenu.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { new RosterDialog().showRosterDialog(); } }); addContactGroupMenu.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { String groupName = JOptionPane.showInputDialog(getGUI(), Res.getString("message.name.of.group") + ":", Res.getString("title.add.new.group"), JOptionPane.QUESTION_MESSAGE); if (ModelUtil.hasLength(groupName)) { ContactGroup contactGroup = getContactGroup(groupName); if (contactGroup == null) { contactGroup = addContactGroup(groupName); contactGroup.setVisible(true); validateTree(); repaint(); } } } }); // Add Toggle Contacts Menu ResourceUtils.resButton(showHideMenu, Res.getString("menuitem.show.empty.groups")); contactsMenu.add(showHideMenu); showHideMenu.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { showEmptyGroups(showHideMenu.isSelected()); } }); // Initialize vcard support SparkManager.getVCardManager(); }
private void addContactListToWorkspace() { Workspace workspace = SparkManager.getWorkspace(); workspace.getWorkspacePane().addTab("Contacts", SparkRes.getImageIcon(SparkRes.SMALL_ALL_CHATS_IMAGE), this); //NOTRANS // Add To Contacts Menu final JMenu contactsMenu = SparkManager.getMainWindow().getMenuByName("Contacts"); JMenuItem addContactsMenu = new JMenuItem("", SparkRes.getImageIcon(SparkRes.USER1_ADD_16x16)); ResourceUtils.resButton(addContactsMenu, "&Add Contact"); ResourceUtils.resButton(addContactGroupMenu, "Add Contact &Group"); contactsMenu.add(addContactsMenu); contactsMenu.add(addContactGroupMenu); addContactsMenu.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { new RosterDialog().showRosterDialog(); } }); addContactGroupMenu.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { String groupName = JOptionPane.showInputDialog(getGUI(), Res.getString("message.name.of.group") + ":", Res.getString("title.add.new.group"), JOptionPane.QUESTION_MESSAGE); if (ModelUtil.hasLength(groupName)) { ContactGroup contactGroup = getContactGroup(groupName); if (contactGroup == null) { contactGroup = addContactGroup(groupName); contactGroup.setVisible(true); validateTree(); repaint(); } } } }); // Add Toggle Contacts Menu ResourceUtils.resButton(showHideMenu, Res.getString("menuitem.show.empty.groups")); contactsMenu.add(showHideMenu); showHideMenu.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { showEmptyGroups(showHideMenu.isSelected()); } }); // Initialize vcard support SparkManager.getVCardManager(); }
3,237,462
private void attachListeners(JMenu menu) { menu.addMenuListener(new MenuListener() { /** Adds menu items when selected. */ public void menuSelected(MenuEvent e) { Object source = e.getSource(); if (source instanceof JMenu) createWindowsMenuItems((JMenu) source); } /** * Required by I/F but not actually needed in our case, * no op implementation. * @see MenuListener#menuCanceled(MenuEvent) */ public void menuCanceled(MenuEvent e) {} /** * Required by I/F but not actually needed in our case, * no op implementation. * @see MenuListener#menuDeselected(MenuEvent) */ public void menuDeselected(MenuEvent e) {} }); //Listen to keyboard selection menu.addMenuKeyListener(new MenuKeyListener() { /** Adds menu items when selected. */ public void menuKeyReleased(MenuKeyEvent e) { Object source = e.getSource(); if (source instanceof JMenu) createWindowsMenuItems((JMenu) source); } /** * Required by I/F but not actually needed in our case, * no op implementation. * @see MenuKeyListener#menuKeyPressed(MenuKeyEvent) */ public void menuKeyPressed(MenuKeyEvent e) {} /** * Required by I/F but not actually needed in our case, * no op implementation. * @see MenuKeyListener#menuKeyTyped(MenuKeyEvent) */ public void menuKeyTyped(MenuKeyEvent e) {} }); view.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE); view.addWindowListener(new WindowAdapter() { public void windowClosing(WindowEvent e) { model.discard(); } }); }
privatevoidattachListeners(JMenumenu){menu.addMenuListener(newMenuListener(){/**Addsmenuitemswhenselected.*/publicvoidmenuSelected(MenuEvente){Objectsource=e.getSource();if(sourceinstanceofJMenu)createWindowsMenuItems((JMenu)source);}/***RequiredbyI/Fbutnotactuallyneededinourcase,*noopimplementation.*@seeMenuListener#menuCanceled(MenuEvent)*/publicvoidmenuCanceled(MenuEvente){}/***RequiredbyI/Fbutnotactuallyneededinourcase,*noopimplementation.*@seeMenuListener#menuDeselected(MenuEvent)*/publicvoidmenuDeselected(MenuEvente){}});//Listentokeyboardselectionmenu.addMenuKeyListener(newMenuKeyListener(){/**Addsmenuitemswhenselected.*/publicvoidmenuKeyReleased(MenuKeyEvente){Objectsource=e.getSource();if(sourceinstanceofJMenu)createWindowsMenuItems((JMenu)source);}/***RequiredbyI/Fbutnotactuallyneededinourcase,*noopimplementation.*@seeMenuKeyListener#menuKeyPressed(MenuKeyEvent)*/publicvoidmenuKeyPressed(MenuKeyEvente){}/***RequiredbyI/Fbutnotactuallyneededinourcase,*noopimplementation.*@seeMenuKeyListener#menuKeyTyped(MenuKeyEvent)*/publicvoidmenuKeyTyped(MenuKeyEvente){}});view.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE);view.addWindowListener(newWindowAdapter(){publicvoidwindowClosing(WindowEvente){model.discard();}});}
3,237,463
void initialize(HiViewerWin view) { if (view == null) throw new NullPointerException("No view."); this.view = view; historyState = -1; model.addChangeListener(this); if (!HiViewerFactory.isWindowMenuAttachedToTaskBar()) { attachListeners(HiViewerFactory.getWindowMenu()); HiViewerFactory.attachWindowMenuToTaskBar(); } }
void initialize(HiViewerWin view) { if (view == null) throw new NullPointerException("No view."); this.view = view; historyState = -1; model.addChangeListener(this); if (!HiViewerFactory.isWindowMenuAttachedToTaskBar()) { attachListeners(HiViewerFactory.getWindowMenu()); HiViewerFactory.attachWindowMenuToTaskBar(); } }
3,237,464
static public ProjectData go(Project p, Map cache) { if (!ok(cache)) throw new IllegalArgumentException(cacheError); if (check(cache,p)) { return (ProjectData) from(cache, p); } ProjectData pd = new ProjectData(); to(cache, p, pd); if (null == p.getProjectId()) { // FIXME here NPE if (log.isDebugEnabled())log.debug(nullId+p); } else { pd.setID(p.getProjectId().intValue()); } pd.setName(p.getName()); pd.setDescription(p.getDescription()); if (null==p.getExperimenter()){ if (log.isDebugEnabled())log.debug(nullExp + p); } else { pd.setOwnerFirstName(p.getExperimenter().getFirstname()); } //TODO if (null==p.getDatasets()){ if (log.isDebugEnabled())log.debug(nullDs + p); } else { Set set = new HashSet(); for (Iterator i = p.getDatasets().iterator(); i.hasNext();) { Dataset d = (Dataset) i.next(); set.add(go(d,cache)); } pd.setDatasets(new ArrayList(set)); } return pd; }
static public ProjectData go(Project p, Map cache) { if (!ok(cache)) throw new IllegalArgumentException(cacheError); if (check(cache,p)) { return (ProjectData) from(cache, p); } ProjectData pd = new ProjectData(); to(cache, p, pd); if (null == p.getProjectId()) { // FIXME here NPE if (log.isDebugEnabled())log.debug(nullId+p); } else { pd.setID(p.getProjectId().intValue()); } pd.setName(p.getName()); pd.setDescription(p.getDescription()); if (null==p.getExperimenter()){ if (log.isDebugEnabled())log.debug(nullExp + p); } else { pd.setOwnerFirstName(p.getExperimenter().getFirstname()); } //TODO if (null==p.getDatasets()){ if (log.isDebugEnabled())log.debug(nullDs + p); } else { Set set = new HashSet(); for (Iterator i = p.getDatasets().iterator(); i.hasNext();) { Dataset d = (Dataset) i.next(); set.add(go(d,cache)); } pd.setDatasets(new ArrayList(set)); } return pd; }
3,237,465
static void to(Map cache, Object key, Object value) { // FIXME Why are there NULLs in the Cache!!!! cache.put(key, value); // TODO return either original value or a new one -- tough. Not when all // inherit from a single DataObject!!?? }
staticvoidto(Mapcache,Objectkey,Objectvalue){//FIXMEWhyarethereNULLsintheCache!!!!cache.put(key,value);//TODOreturneitheroriginalvalueoranewone--tough.Notwhenall//inheritfromasingleDataObject!!??}
3,237,466
static void to(Map cache, Object key, Object value) { // FIXME Why are there NULLs in the Cache!!!! cache.put(key, value); // TODO return either original value or a new one -- tough. Not when all // inherit from a single DataObject!!?? }
static void to(Map cache, Object key, Object value) {// FIXME Why are there NULLs in the Cache!!!!cache.put(key, value);// TODO return either original value or a new one -- tough. Not when all// inherit from a single DataObject!!??}
3,237,467
public String getChannelFamily(int w) { return rndDef.getChannel(w).getFamily(); //return servant.getChannelFamily(w).getValue(); }
publicStringgetChannelFamily(intw){returnrndDef.getChannel(w).getFamily();//returnservant.getChannelFamily(w).getValue();}
3,237,468
public String getModel() { return rndDef.getColorModel(); //return servant.getModel().getValue(); }
publicStringgetModel(){returnrndDef.getColorModel();//returnservant.getModel().getValue();}
3,237,469
public SoundPanel() { setLayout(new GridBagLayout()); // Add ResourceUtils ResourceUtils.resButton(incomingMessageBox, "&Play sound when new message arrives"); ResourceUtils.resButton(outgoingMessageBox, "&Play sound when a message is sent"); ResourceUtils.resButton(userOfflineCheckbox, "&Play sound when user goes offline"); ResourceUtils.resButton(incomingBrowseButton, "&Browse"); ResourceUtils.resButton(outgoingBrowseButton, "B&rowse"); ResourceUtils.resButton(offlineBrowseButton, "Br&owse"); // Handle incoming sounds add(incomingMessageBox, new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); add(incomingMessageSound, new GridBagConstraints(0, 1, 1, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 5), 0, 0)); add(incomingBrowseButton, new GridBagConstraints(1, 1, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); // Handle sending sounds add(outgoingMessageBox, new GridBagConstraints(0, 2, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); add(outgoingMessageSound, new GridBagConstraints(0, 3, 1, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 5), 0, 0)); add(outgoingBrowseButton, new GridBagConstraints(1, 3, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); // Handle User Online Sound add(userOfflineCheckbox, new GridBagConstraints(0, 4, 1, 1, 0.0, 0.0, GridBagConstraints.NORTHWEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); add(userOfflineField, new GridBagConstraints(0, 5, 1, 1, 1.0, 0.0, GridBagConstraints.NORTHWEST, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 5), 0, 0)); add(offlineBrowseButton, new GridBagConstraints(1, 5, 1, 1, 0.0, 1.0, GridBagConstraints.NORTHWEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); incomingBrowseButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { pickFile("Choose Incoming Sound File", incomingMessageSound); } }); outgoingBrowseButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { pickFile("Choose Outgoing Sound File", outgoingMessageSound); } }); offlineBrowseButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { pickFile("Choose Offline Sound File", userOfflineField); } }); }
public SoundPanel() { setLayout(new GridBagLayout()); // Add ResourceUtils ResourceUtils.resButton(incomingMessageBox, "&Play sound when new message arrives"); ResourceUtils.resButton(outgoingMessageBox, "&Play sound when a message is sent"); ResourceUtils.resButton(userOfflineCheckbox, "&Play sound when user goes offline"); ResourceUtils.resButton(incomingBrowseButton, "&Browse"); ResourceUtils.resButton(outgoingBrowseButton, "B&rowse"); ResourceUtils.resButton(offlineBrowseButton, "Br&owse"); // Handle incoming sounds add(incomingMessageBox, new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); add(incomingMessageSound, new GridBagConstraints(0, 1, 1, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 5), 0, 0)); add(incomingBrowseButton, new GridBagConstraints(1, 1, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); // Handle sending sounds add(outgoingMessageBox, new GridBagConstraints(0, 2, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); add(outgoingMessageSound, new GridBagConstraints(0, 3, 1, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 5), 0, 0)); add(outgoingBrowseButton, new GridBagConstraints(1, 3, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); // Handle User Online Sound add(userOfflineCheckbox, new GridBagConstraints(0, 4, 1, 1, 0.0, 0.0, GridBagConstraints.NORTHWEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); add(userOfflineField, new GridBagConstraints(0, 5, 1, 1, 1.0, 0.0, GridBagConstraints.NORTHWEST, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 5), 0, 0)); add(offlineBrowseButton, new GridBagConstraints(1, 5, 1, 1, 0.0, 1.0, GridBagConstraints.NORTHWEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); incomingBrowseButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { pickFile("Choose Incoming Sound File", incomingMessageSound); } }); outgoingBrowseButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { pickFile("Choose Outgoing Sound File", outgoingMessageSound); } }); offlineBrowseButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { pickFile("Choose Offline Sound File", userOfflineField); } }); }
3,237,470
public RubyClass getArgumentError() { return argumentError; }
public RubyClass getArgumentError() { return argumentError; }
3,237,471
public RubyClass getFatal() { return fatal; }
public RubyClass getFatal() { return fatal; }
3,237,472
public RubyClass getIndexError() { return indexError; }
public RubyClass getIndexError() { return indexError; }
3,237,473
public RubyClass getInterrupt() { return interrupt; }
public RubyClass getInterrupt() { return interrupt; }
3,237,474
public RubyClass getLoadError() { return loadError; }
public RubyClass getLoadError() { return loadError; }
3,237,475
public RubyClass getNameError() { return nameError; }
public RubyClass getNameError() { return nameError; }
3,237,476
public RubyClass getNoMemError() { return noMemError; }
public RubyClass getNoMemError() { return noMemError; }
3,237,477