bugged
stringlengths 6
599k
| fixed
stringlengths 6
40.8M
| __index_level_0__
int64 0
3.24M
|
|---|---|---|
public final String GetImage() { if (tokenBeginBuf == curBuf) return new String(curBuf.buffer, tokenBeginPos, curBuf.curPos - tokenBeginPos + 1); else return new String(otherBuf.buffer, tokenBeginPos, otherBuf.dataLen - tokenBeginPos) + new String(curBuf.buffer, 0, curBuf.curPos + 1); }
|
public final String GetImage() { if (tokenBeginBuf == curBuf) return new String(curBuf.buffer, tokenBeginPos, curBuf.curPos - tokenBeginPos + 1); else return new String(otherBuf.buffer, tokenBeginPos, otherBuf.dataLen - tokenBeginPos) + new String(curBuf.buffer, 0, curBuf.curPos); }
| 3,231,199
|
public ProjectLoader(HiViewer viewer, Set projectsID) { super(viewer); this.projectsID = projectsID; }
|
public ProjectLoader(HiViewer viewer, Set projectsID, boolean refresh) { super(viewer); this.projectsID = projectsID; }
| 3,231,201
|
public void handleResult(Object result) { if (viewer.getState() == HiViewer.DISCARDED) return; //Async cancel. viewer.setHierarchyRoots((Set) result, false); }
|
public void handleResult(Object result) { if (viewer.getState() == HiViewer.DISCARDED) return; //Async cancel. viewer.setHierarchyRoots((Set) result, false, refresh); }
| 3,231,203
|
protected void onStateChange(ChangeEvent e) { if (model.getState() == ImViewer.DISCARDED) discard(); }
|
protected void onStateChange(ChangeEvent e) { switch (model.getState()) { case ImViewer.DISCARDED: discard(); break; case ImViewer.RENDERING_CONTROL_LOADED: case ImViewer.READY: int max = Math.max(model.getMaxZ(), model.getMaxT()); setEnabled(max != 0); break; } }
| 3,231,204
|
final public void eatLeadingWsNl() { int i, j, l; i = size() - 1; if ( i < 0 || i+1 == literalMark ) return; Object o = elementAt(i); if (! (o instanceof String)) return; String s = (String) o; j = 0; l = s.length(); while (j < l && Character.isSpaceChar(s.charAt(j))) j++; if (j < l) { if (s.charAt(j) == '\r') j++; else if (s.charAt(j) == '\n') { j++; if (j < l && s.charAt(j) == '\r') j++; } } if (j >= l) remove(i); else if (j > 0) setElementAt(s.substring(j), i); markLiteral(); }
|
final public void eatLeadingWsNl() { int i, j, l; i = size() - 1; if ( i < 0 || i+1 == literalMark ) return; Object o = elementAt(i); if (! (o instanceof String)) return; String s = (String) o; j = 0; l = s.length(); while (j < l && isSpaceChar(s.charAt(j))) j++; if (j < l) { if (s.charAt(j) == '\r') j++; else if (s.charAt(j) == '\n') { j++; if (j < l && s.charAt(j) == '\r') j++; } } if (j >= l) remove(i); else if (j > 0) setElementAt(s.substring(j), i); markLiteral(); }
| 3,231,206
|
final public void eatOneWs() { int i, j; i = size() - 1; if ( i < 0 || i+1 == literalMark ) return; Object o = elementAt(i); if (! (o instanceof String)) return; String s = (String) o; j = eatOneWs(s, s.length() - 1); if (j < 0) remove(i); else if (j < s.length() - 1) setElementAt(s.substring(0, j+1), i); markLiteral(); }
|
final public void eatOneWs() { int i, j; i = size() - 1; if ( i < 0 || i+1 == literalMark ) return; Object o = elementAt(i); if (! (o instanceof String)) return; String s = (String) o; j = eatOneWs(s, s.length() - 1); if (j < 0) remove(i); else if (j < s.length() - 1) setElementAt(s.substring(0, j+1), i); markLiteral(); }
| 3,231,207
|
private final static int eatWs(String s, int pos) { while (pos >= 0 && Character.isSpaceChar(s.charAt(pos))) pos--; return pos; }
|
private final static int eatWs(String s, int pos) { while (pos >= 0 && isSpaceChar(s.charAt(pos))) pos--; return pos; }
| 3,231,208
|
public synchronized Iterator iterator(RubyModule rubyClass) { final List objList = new ArrayList(); WeakReferenceListNode current = top; while (current != null) { IRubyObject obj = (IRubyObject)current.get(); if (obj != null && obj.isKindOf(rubyClass)) { objList.add(current); } current = current.next; } return new Iterator() { private Iterator iter = objList.iterator(); public boolean hasNext() { return iter.hasNext(); } public Object next() { return ((WeakReferenceListNode)iter.next()).get(); } public void remove() { throw new UnsupportedOperationException(); } }; }
|
public synchronized Iterator iterator(RubyModule rubyClass) { final List objList = new ArrayList(); WeakReferenceListNode current = top; while (current != null) { IRubyObject obj = (IRubyObject)current.get(); if (obj != null && obj.isKindOf(rubyClass)) { objList.add(current); } current = current.next; } return new Iterator() { private Iterator iter = objList.iterator(); public boolean hasNext() { return iter.hasNext(); } public Object next() { return ((WeakReferenceListNode)iter.next()).get(); } public void remove() { throw new UnsupportedOperationException(); } }; }
| 3,231,209
|
public synchronized Iterator iterator(RubyModule rubyClass) { final List objList = new ArrayList(); WeakReferenceListNode current = top; while (current != null) { IRubyObject obj = (IRubyObject)current.get(); if (obj != null && obj.isKindOf(rubyClass)) { objList.add(current); } current = current.next; } return new Iterator() { private Iterator iter = objList.iterator(); public boolean hasNext() { return iter.hasNext(); } public Object next() { return ((WeakReferenceListNode)iter.next()).get(); } public void remove() { throw new UnsupportedOperationException(); } }; }
|
public synchronized Iterator iterator(RubyModule rubyClass) { final List objList = new ArrayList(); WeakReferenceListNode current = top; while (current != null) { IRubyObject obj = (IRubyObject)current.get(); if (obj != null && obj.isKindOf(rubyClass)) { objList.add(current); } current = current.next; } return new Iterator() { private Iterator iter = objList.iterator(); public boolean hasNext() { return iter.hasNext(); } public Object next() { return ((WeakReferenceListNode)iter.next()).get(); } public void remove() { throw new UnsupportedOperationException(); } }; }
| 3,231,210
|
public boolean hasNext() { return iter.hasNext(); }
|
public boolean hasNext() { return iter.hasNext(); }
| 3,231,211
|
public Object next() { return ((WeakReferenceListNode)iter.next()).get(); }
|
public Object next() { return ((WeakReferenceListNode)iter.next()).get(); }
| 3,231,212
|
void initStrategies(QuantumDef qd, PixelsStats stats) { QuantumStrategy stg; PixelsGlobalStatsEntry wGlobal; Comparable gMin, gMax; for (int w = 0; w < sizeW; ++w) { stg = QuantumFactory.getStrategy(qd); wGlobal = stats.getGlobalEntry(w); gMin = wGlobal.getGlobalMin(); gMax = wGlobal.getGlobalMax(); stg.setExtent(gMin, gMax); if (wavesStg[w] == null) stg.setWindow(gMin, gMax); else stg.setWindow(wavesStg[w].getWindowStart(), wavesStg[w].getWindowEnd()); wavesStg[w] = stg; } }
|
void initStrategies(QuantumDef qd, PixelsStats stats) { QuantumStrategy stg; PixelsGlobalStatsEntry wGlobal; Comparable gMin, gMax; for (int w = 0; w < sizeW; ++w) { stg = QuantumFactory.getStrategy(qd); wGlobal = stats.getGlobalEntry(w); gMin = wGlobal.getGlobalMin(); gMax = wGlobal.getGlobalMax(); stg.setExtent(gMin, gMax); if (wavesStg[w] == null) stg.setWindow(gMin, gMax); else stg.setWindow(wavesStg[w].getWindowStart(), wavesStg[w].getWindowEnd()); wavesStg[w] = stg; } }
| 3,231,213
|
void initStrategies(QuantumDef qd, PixelsStats stats) { QuantumStrategy stg; PixelsGlobalStatsEntry wGlobal; Comparable gMin, gMax; for (int w = 0; w < sizeW; ++w) { stg = QuantumFactory.getStrategy(qd); wGlobal = stats.getGlobalEntry(w); gMin = wGlobal.getGlobalMin(); gMax = wGlobal.getGlobalMax(); stg.setExtent(gMin, gMax); if (wavesStg[w] == null) stg.setWindow(gMin, gMax); else stg.setWindow(wavesStg[w].getWindowStart(), wavesStg[w].getWindowEnd()); wavesStg[w] = stg; } }
|
void initStrategies(QuantumDef qd, PixelsStats stats) { QuantumStrategy stg; PixelsGlobalStatsEntry wGlobal; Comparable gMin, gMax; for (int w = 0; w < sizeW; ++w) { stg = QuantumFactory.getStrategy(qd); wGlobal = stats.getGlobalEntry(w); gMin = wGlobal.getGlobalMin(); gMax = wGlobal.getGlobalMax(); stg.setExtent(gMin, gMax); if (wavesStg[w] == null) stg.setWindow(gMin, gMax); else stg.setWindow(wavesStg[w].getWindowStart(), wavesStg[w].getWindowEnd()); wavesStg[w] = stg; } }
| 3,231,214
|
private void buildButtonsPanel() { buttonsPanel = new JPanel(); //remove button removeButton = new JButton("Select All"); removeButton.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); removeButton.setToolTipText( UIUtilities.formatToolTipText("Remove all datasets.")); //cancel button resetButton = new JButton("Reset"); resetButton.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); resetButton.setToolTipText( UIUtilities.formatToolTipText("Cancel selection.")); buttonsPanel.setLayout(new BoxLayout(buttonsPanel, BoxLayout.X_AXIS)); buttonsPanel.add(resetButton); buttonsPanel.add(Box.createRigidArea(DataManagerUIF.HBOX)); buttonsPanel.add(removeButton); buttonsPanel.setOpaque(false); //make panel transparent if (manager.getImages() == null || manager.getImages().size() == 0) { removeButton.setEnabled(false); resetButton.setEnabled(false); } }
|
private void buildButtonsPanel() { buttonsPanel = new JPanel(); //remove button removeButton = new JButton("Select All"); removeButton.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); removeButton.setToolTipText( UIUtilities.formatToolTipText("Remove all datasets.")); //cancel button resetButton = new JButton("Reset"); resetButton.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); resetButton.setToolTipText( UIUtilities.formatToolTipText("Cancel selection.")); buttonsPanel.setLayout(new BoxLayout(buttonsPanel, BoxLayout.X_AXIS)); buttonsPanel.add(resetButton); buttonsPanel.add(Box.createRigidArea(DataManagerUIF.HBOX)); buttonsPanel.add(removeButton); buttonsPanel.setOpaque(false); //make panel transparent if (manager.getImages() == null || manager.getImages().size() == 0) { removeButton.setEnabled(false); resetButton.setEnabled(false); } }
| 3,231,215
|
private void buildButtonsPanel() { buttonsPanel = new JPanel(); //remove button removeButton = new JButton("Select All"); removeButton.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); removeButton.setToolTipText( UIUtilities.formatToolTipText("Remove all datasets.")); //cancel button resetButton = new JButton("Reset"); resetButton.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); resetButton.setToolTipText( UIUtilities.formatToolTipText("Cancel selection.")); buttonsPanel.setLayout(new BoxLayout(buttonsPanel, BoxLayout.X_AXIS)); buttonsPanel.add(resetButton); buttonsPanel.add(Box.createRigidArea(DataManagerUIF.HBOX)); buttonsPanel.add(removeButton); buttonsPanel.setOpaque(false); //make panel transparent if (manager.getImages() == null || manager.getImages().size() == 0) { removeButton.setEnabled(false); resetButton.setEnabled(false); } }
|
private void buildButtonsPanel() { buttonsPanel = new JPanel(); //remove button removeButton = new JButton("Select All"); removeButton.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); removeButton.setToolTipText( UIUtilities.formatToolTipText("Remove all datasets.")); //cancel button resetButton = new JButton("Reset"); resetButton.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); resetButton.setToolTipText( UIUtilities.formatToolTipText("Cancel selection.")); buttonsPanel.setLayout(new BoxLayout(buttonsPanel, BoxLayout.X_AXIS)); buttonsPanel.add(resetButton); buttonsPanel.add(Box.createRigidArea(DataManagerUIF.HBOX)); buttonsPanel.add(removeButton); buttonsPanel.setOpaque(false); //make panel transparent if (manager.getImages() == null || manager.getImages().size() == 0) { removeButton.setEnabled(false); resetButton.setEnabled(false); } }
| 3,231,216
|
public void newAnnotation(String annotation) { ImageAnnotation ia = annotator.createImageAnnotation(annotation); annotationList.add(ia); }
|
public void newAnnotation(String annotation) { ImageAnnotation ia = annotator.createImageAnnotation(annotation); annotationList.add(ia); }
| 3,231,217
|
public boolean save() { annotator.updateImageAnnotations(annotationList); ImageAnnotated annotated = new ImageAnnotated(requestEvent); // TODO support multiple if(annotationList.size() > 0) { annotated.setAnnotation((ImageAnnotation)annotationList.get(0)); } annotator.respondWithEvent(annotated); setSaved(true); return true; }
|
public boolean save() { annotator.commitNewAnnotations(newAnnotationList); annotator.updateAnnotations(annotationList); for(Iterator iter = newAnnotationList.iterator(); iter.hasNext();) { annotationList.add(0,iter.next()); } newAnnotationList.clear(); ImageAnnotated annotated = new ImageAnnotated(requestEvent); // TODO support multiple if(annotationList.size() > 0) { annotated.setAnnotation((ImageAnnotation)annotationList.get(0)); } annotator.respondWithEvent(annotated); setSaved(true); return true; }
| 3,231,218
|
public Object lookup(String name) { Entry entry = (Entry) entriesMap.get(name); return entry.getValue(); }
|
public Object lookup(String name) { Entry entry = (Entry) entriesMap.get(name); Object ret = null; if (entry != null) ret = entry.getValue(); return ret; }
| 3,231,219
|
protected void defineParameters() { defs = new QueryParameterDef[] { new QueryParameterDef(QP.IDS, Collection.class, false), new QueryParameterDef(OWNER_ID, Long.class, true), new QueryParameterDef(QP.OPTIONS, Map.class, true) }; }
|
protected void defineParameters() { defs = new QueryParameterDef[] { new QueryParameterDef(QP.IDS, Collection.class, false), new QueryParameterDef(QP.OPTIONS, Map.class, true) }; }
| 3,231,220
|
protected Object runQuery(Session session) throws HibernateException, SQLException { Criteria c = session.createCriteria(Image.class); fetchParents(c,Project.class,2); return c.list(); }
|
protected Object runQuery(Session session) throws HibernateException, SQLException { Criteria c = session.createCriteria(Image.class); c.setResultTransformer(Criteria.DISTINCT_ROOT_ENTITY); c.add(Restrictions.in("id",(Collection) value(QP.IDS))); Hierarchy.fetchParents(c,(Class) value(QP.CLASS),Integer.MAX_VALUE); return c.list(); }
| 3,231,221
|
public int registerLocal(String name) { if (localNames == null) { localNames = new ArrayList(); localNames.add("_"); localNames.add("~"); if (name.equals("_")) { return 0; } else if (name.equals("~")) { return 1; } } localNames.add(name); return localNames.size() - 1; }
|
public int registerLocal(String name) { if (localNames == null) { localNames = new ArrayList(); localNames.add("_"); localNames.add("~"); if (name.equals("_")) { return 0; } else if (name.equals("~")) { return 1; } } localNames.add(name); return localNames.size() - 1; }
| 3,231,222
|
public SearchArticleBean() { _searchPublishedFrom = new Date(); _searchText = "searchtext"; }
|
public SearchArticleBean() { _searchPublishedFrom = new Date(); _searchText = "searchtext"; }
| 3,231,223
|
public int getNumberOfColumns() { return 4; }
|
public int getNumberOfColumns() { return 4; }
| 3,231,224
|
public SearchRequest getSearchRequest(String scope, Locale locale) throws SearchException { SearchRequest s = new SearchRequest(); s.addSelection(IWSlideConstants.PROPERTY_CREATION_DATE); s.addSelection(IWSlideConstants.PROPERTY_CATEGORY); s.addScope(new SearchScope(scope)); SearchExpression whereExpression = null; String localeString = ""; //((locale!=null)?locale.getLanguage():""); SearchExpression namePatternExpression = s.compare(CompareOperator.LIKE, IWSlideConstants.PROPERTY_DISPLAY_NAME,"%"+localeString+".article"); SearchExpression creationDateFromExpression = null; if(getSearchPublishedFrom() != null){ creationDateFromExpression = s.compare(CompareOperator.GTE, IWSlideConstants.PROPERTY_CREATION_DATE,getSearchPublishedFrom()); whereExpression = s.and(namePatternExpression,creationDateFromExpression); } SearchExpression creationDateToExpression = null; if(getSearchPublishedTo() != null){ creationDateToExpression = s.compare(CompareOperator.LTE, IWSlideConstants.PROPERTY_CREATION_DATE,getSearchPublishedTo()); whereExpression = s.and(whereExpression,creationDateToExpression); } // List categoryExpressions = new ArrayList(); if(!getSearchCategoryId().equals("-1")){ SearchExpression categoryExpression = s.compare(CompareOperator.LIKE,IWSlideConstants.PROPERTY_CATEGORY,"%"+getSearchCategoryId()+"%"); whereExpression = s.and(whereExpression,categoryExpression); } if(getSearchAuthor()!=null){ SearchExpression authorExpression = s.compare(CompareOperator.LIKE,IWSlideConstants.PROPERTY_CREATOR_DISPLAY_NAME,"%"+getSearchAuthor()+"%"); whereExpression = s.and(whereExpression,authorExpression); } // }// whereExpression = s.and(whereExpression,categoryExpression);// for (Iterator iter = categoryList.iterator(); iter.hasNext();) {// String categoryName = (String) iter.next();// categoryExpressions.add(s.compare(CompareOperator.LIKE,IWSlideConstants.PROPERTY_CATEGORY,"%"+categoryName+"%"));// }// Iterator expr = categoryExpressions.iterator();// if(expr.hasNext()){// SearchExpression categoryExpression = (SearchExpression)expr.next();// while(expr.hasNext()){// categoryExpression = s.or(categoryExpression,(SearchExpression)expr.next());// }// whereExpression = s.and(whereExpression,categoryExpression);// }// } SearchExpression containsExpression = null; if(getSearchText() != null && !"".equals(getSearchText())){ containsExpression = s.contains(getSearchText()); if(whereExpression!=null){ whereExpression = s.and(whereExpression,containsExpression); }else{ whereExpression = containsExpression; } } s.setWhereExpression(whereExpression); System.out.println("------------------------"); System.out.println(s.asString()); System.out.println("------------------------"); return s; }
|
public SearchRequest getSearchRequest(String scope, Locale locale) throws SearchException { SearchRequest s = new SearchRequest(); s.addSelection(IWSlideConstants.PROPERTY_CREATION_DATE); s.addSelection(IWSlideConstants.PROPERTY_CATEGORY); s.addScope(new SearchScope(scope)); SearchExpression whereExpression = null; String localeString = ""; //((locale!=null)?locale.getLanguage():""); SearchExpression namePatternExpression = s.compare(CompareOperator.LIKE, IWSlideConstants.PROPERTY_DISPLAY_NAME,"%"+localeString+".article"); SearchExpression creationDateFromExpression = null; if(getSearchPublishedFrom() != null){ creationDateFromExpression = s.compare(CompareOperator.GTE, IWSlideConstants.PROPERTY_CREATION_DATE,getSearchPublishedFrom()); whereExpression = s.and(namePatternExpression,creationDateFromExpression); } SearchExpression creationDateToExpression = null; if(getSearchPublishedTo() != null){ creationDateToExpression = s.compare(CompareOperator.LTE, IWSlideConstants.PROPERTY_CREATION_DATE,getSearchPublishedTo()); whereExpression = s.and(whereExpression,creationDateToExpression); } // List categoryExpressions = new ArrayList(); if(!getSearchCategoryId().equals("-1")){ SearchExpression categoryExpression = s.compare(CompareOperator.LIKE,IWSlideConstants.PROPERTY_CATEGORY,"%"+getSearchCategoryId()+"%"); whereExpression = s.and(whereExpression,categoryExpression); } if(getSearchAuthor()!=null){ SearchExpression authorExpression = s.compare(CompareOperator.LIKE,IWSlideConstants.PROPERTY_CREATOR_DISPLAY_NAME,"%"+getSearchAuthor()+"%"); whereExpression = s.and(whereExpression,authorExpression); } // }// whereExpression = s.and(whereExpression,categoryExpression);// for (Iterator iter = categoryList.iterator(); iter.hasNext();) {// String categoryName = (String) iter.next();// categoryExpressions.add(s.compare(CompareOperator.LIKE,IWSlideConstants.PROPERTY_CATEGORY,"%"+categoryName+"%"));// }// Iterator expr = categoryExpressions.iterator();// if(expr.hasNext()){// SearchExpression categoryExpression = (SearchExpression)expr.next();// while(expr.hasNext()){// categoryExpression = s.or(categoryExpression,(SearchExpression)expr.next());// }// whereExpression = s.and(whereExpression,categoryExpression);// }// } SearchExpression containsExpression = null; if(getSearchText() != null && !"".equals(getSearchText())){ containsExpression = s.contains(getSearchText()); if(whereExpression!=null){ whereExpression = s.and(whereExpression,containsExpression); }else{ whereExpression = containsExpression; } } s.setWhereExpression(whereExpression); System.out.println("------------------------"); System.out.println(s.asString()); System.out.println("------------------------"); return s; }
| 3,231,225
|
public SearchRequest getSearchRequest(String scope, Locale locale) throws SearchException { SearchRequest s = new SearchRequest(); s.addSelection(IWSlideConstants.PROPERTY_CREATION_DATE); s.addSelection(IWSlideConstants.PROPERTY_CATEGORY); s.addScope(new SearchScope(scope)); SearchExpression whereExpression = null; String localeString = ""; //((locale!=null)?locale.getLanguage():""); SearchExpression namePatternExpression = s.compare(CompareOperator.LIKE, IWSlideConstants.PROPERTY_DISPLAY_NAME,"%"+localeString+".article"); SearchExpression creationDateFromExpression = null; if(getSearchPublishedFrom() != null){ creationDateFromExpression = s.compare(CompareOperator.GTE, IWSlideConstants.PROPERTY_CREATION_DATE,getSearchPublishedFrom()); whereExpression = s.and(namePatternExpression,creationDateFromExpression); } SearchExpression creationDateToExpression = null; if(getSearchPublishedTo() != null){ creationDateToExpression = s.compare(CompareOperator.LTE, IWSlideConstants.PROPERTY_CREATION_DATE,getSearchPublishedTo()); whereExpression = s.and(whereExpression,creationDateToExpression); } // List categoryExpressions = new ArrayList(); if(!getSearchCategoryId().equals("-1")){ SearchExpression categoryExpression = s.compare(CompareOperator.LIKE,IWSlideConstants.PROPERTY_CATEGORY,"%"+getSearchCategoryId()+"%"); whereExpression = s.and(whereExpression,categoryExpression); } if(getSearchAuthor()!=null){ SearchExpression authorExpression = s.compare(CompareOperator.LIKE,IWSlideConstants.PROPERTY_CREATOR_DISPLAY_NAME,"%"+getSearchAuthor()+"%"); whereExpression = s.and(whereExpression,authorExpression); } // }// whereExpression = s.and(whereExpression,categoryExpression);// for (Iterator iter = categoryList.iterator(); iter.hasNext();) {// String categoryName = (String) iter.next();// categoryExpressions.add(s.compare(CompareOperator.LIKE,IWSlideConstants.PROPERTY_CATEGORY,"%"+categoryName+"%"));// }// Iterator expr = categoryExpressions.iterator();// if(expr.hasNext()){// SearchExpression categoryExpression = (SearchExpression)expr.next();// while(expr.hasNext()){// categoryExpression = s.or(categoryExpression,(SearchExpression)expr.next());// }// whereExpression = s.and(whereExpression,categoryExpression);// }// } SearchExpression containsExpression = null; if(getSearchText() != null && !"".equals(getSearchText())){ containsExpression = s.contains(getSearchText()); if(whereExpression!=null){ whereExpression = s.and(whereExpression,containsExpression); }else{ whereExpression = containsExpression; } } s.setWhereExpression(whereExpression); System.out.println("------------------------"); System.out.println(s.asString()); System.out.println("------------------------"); return s; }
|
public SearchRequest getSearchRequest(String scope, Locale locale) throws SearchException { SearchRequest s = new SearchRequest(); s.addSelection(IWSlideConstants.PROPERTY_CREATION_DATE); s.addSelection(IWSlideConstants.PROPERTY_CATEGORY); s.addScope(new SearchScope(scope)); SearchExpression whereExpression = null; String localeString = ""; //((locale!=null)?locale.getLanguage():""); SearchExpression namePatternExpression = s.compare(CompareOperator.LIKE, IWSlideConstants.PROPERTY_DISPLAY_NAME,"%"+localeString+".article"); SearchExpression creationDateFromExpression = null; if(getSearchPublishedFrom() != null){ creationDateFromExpression = s.compare(CompareOperator.GTE, IWSlideConstants.PROPERTY_CREATION_DATE,getSearchPublishedFrom()); whereExpression = s.and(namePatternExpression,creationDateFromExpression); } SearchExpression creationDateToExpression = null; if(getSearchPublishedTo() != null){ creationDateToExpression = s.compare(CompareOperator.LTE, IWSlideConstants.PROPERTY_CREATION_DATE,getSearchPublishedTo()); whereExpression = s.and(whereExpression,creationDateToExpression); } // List categoryExpressions = new ArrayList(); if(!getSearchCategoryId().equals("-1")){ SearchExpression categoryExpression = s.compare(CompareOperator.LIKE,IWSlideConstants.PROPERTY_CATEGORY,"%"+getSearchCategoryId()+"%"); whereExpression = s.and(whereExpression,categoryExpression); } if(getSearchAuthor()!=null){ SearchExpression authorExpression = s.compare(CompareOperator.LIKE,IWSlideConstants.PROPERTY_CREATOR_DISPLAY_NAME,"%"+getSearchAuthor()+"%"); whereExpression = s.and(whereExpression,authorExpression); } // }// whereExpression = s.and(whereExpression,categoryExpression);// for (Iterator iter = categoryList.iterator(); iter.hasNext();) {// String categoryName = (String) iter.next();// categoryExpressions.add(s.compare(CompareOperator.LIKE,IWSlideConstants.PROPERTY_CATEGORY,"%"+categoryName+"%"));// }// Iterator expr = categoryExpressions.iterator();// if(expr.hasNext()){// SearchExpression categoryExpression = (SearchExpression)expr.next();// while(expr.hasNext()){// categoryExpression = s.or(categoryExpression,(SearchExpression)expr.next());// }// whereExpression = s.and(whereExpression,categoryExpression);// }// } SearchExpression containsExpression = null; if(getSearchText() != null && !"".equals(getSearchText())){ containsExpression = s.contains(getSearchText()); if(whereExpression!=null){ whereExpression = s.and(whereExpression,containsExpression); }else{ whereExpression = containsExpression; } } s.setWhereExpression(whereExpression); System.out.println("------------------------"); System.out.println(s.asString()); System.out.println("------------------------"); return s; }
| 3,231,226
|
public SearchRequest getSearchRequest(String scope, Locale locale) throws SearchException { SearchRequest s = new SearchRequest(); s.addSelection(IWSlideConstants.PROPERTY_CREATION_DATE); s.addSelection(IWSlideConstants.PROPERTY_CATEGORY); s.addScope(new SearchScope(scope)); SearchExpression whereExpression = null; String localeString = ""; //((locale!=null)?locale.getLanguage():""); SearchExpression namePatternExpression = s.compare(CompareOperator.LIKE, IWSlideConstants.PROPERTY_DISPLAY_NAME,"%"+localeString+".article"); SearchExpression creationDateFromExpression = null; if(getSearchPublishedFrom() != null){ creationDateFromExpression = s.compare(CompareOperator.GTE, IWSlideConstants.PROPERTY_CREATION_DATE,getSearchPublishedFrom()); whereExpression = s.and(namePatternExpression,creationDateFromExpression); } SearchExpression creationDateToExpression = null; if(getSearchPublishedTo() != null){ creationDateToExpression = s.compare(CompareOperator.LTE, IWSlideConstants.PROPERTY_CREATION_DATE,getSearchPublishedTo()); whereExpression = s.and(whereExpression,creationDateToExpression); } // List categoryExpressions = new ArrayList(); if(!getSearchCategoryId().equals("-1")){ SearchExpression categoryExpression = s.compare(CompareOperator.LIKE,IWSlideConstants.PROPERTY_CATEGORY,"%"+getSearchCategoryId()+"%"); whereExpression = s.and(whereExpression,categoryExpression); } if(getSearchAuthor()!=null){ SearchExpression authorExpression = s.compare(CompareOperator.LIKE,IWSlideConstants.PROPERTY_CREATOR_DISPLAY_NAME,"%"+getSearchAuthor()+"%"); whereExpression = s.and(whereExpression,authorExpression); } // }// whereExpression = s.and(whereExpression,categoryExpression);// for (Iterator iter = categoryList.iterator(); iter.hasNext();) {// String categoryName = (String) iter.next();// categoryExpressions.add(s.compare(CompareOperator.LIKE,IWSlideConstants.PROPERTY_CATEGORY,"%"+categoryName+"%"));// }// Iterator expr = categoryExpressions.iterator();// if(expr.hasNext()){// SearchExpression categoryExpression = (SearchExpression)expr.next();// while(expr.hasNext()){// categoryExpression = s.or(categoryExpression,(SearchExpression)expr.next());// }// whereExpression = s.and(whereExpression,categoryExpression);// }// } SearchExpression containsExpression = null; if(getSearchText() != null && !"".equals(getSearchText())){ containsExpression = s.contains(getSearchText()); if(whereExpression!=null){ whereExpression = s.and(whereExpression,containsExpression); }else{ whereExpression = containsExpression; } } s.setWhereExpression(whereExpression); System.out.println("------------------------"); System.out.println(s.asString()); System.out.println("------------------------"); return s; }
|
public SearchRequest getSearchRequest(String scope, Locale locale) throws SearchException { SearchRequest s = new SearchRequest(); s.addSelection(IWSlideConstants.PROPERTY_CREATION_DATE); s.addSelection(IWSlideConstants.PROPERTY_CATEGORY); s.addScope(new SearchScope(scope)); SearchExpression whereExpression = null; String localeString = ""; //((locale!=null)?locale.getLanguage():""); SearchExpression namePatternExpression = s.compare(CompareOperator.LIKE, IWSlideConstants.PROPERTY_DISPLAY_NAME,"%"+localeString+".article"); SearchExpression creationDateFromExpression = null; if(getSearchPublishedFrom() != null){ creationDateFromExpression = s.compare(CompareOperator.GTE, IWSlideConstants.PROPERTY_CREATION_DATE,getSearchPublishedFrom()); whereExpression = s.and(namePatternExpression,creationDateFromExpression); } SearchExpression creationDateToExpression = null; if(getSearchPublishedTo() != null){ creationDateToExpression = s.compare(CompareOperator.LTE, IWSlideConstants.PROPERTY_CREATION_DATE,getSearchPublishedTo()); whereExpression = s.and(whereExpression,creationDateToExpression); } // List categoryExpressions = new ArrayList(); if(!getSearchCategoryId().equals("-1")){ SearchExpression categoryExpression = s.compare(CompareOperator.LIKE,IWSlideConstants.PROPERTY_CATEGORY,"%"+getSearchCategoryId()+"%"); whereExpression = s.and(whereExpression,categoryExpression); } if(getSearchAuthor()!=null){ SearchExpression authorExpression = s.compare(CompareOperator.LIKE,IWSlideConstants.PROPERTY_CREATOR_DISPLAY_NAME,"%"+getSearchAuthor()+"%"); whereExpression = s.and(whereExpression,authorExpression); } // }// whereExpression = s.and(whereExpression,categoryExpression);// for (Iterator iter = categoryList.iterator(); iter.hasNext();) {// String categoryName = (String) iter.next();// categoryExpressions.add(s.compare(CompareOperator.LIKE,IWSlideConstants.PROPERTY_CATEGORY,"%"+categoryName+"%"));// }// Iterator expr = categoryExpressions.iterator();// if(expr.hasNext()){// SearchExpression categoryExpression = (SearchExpression)expr.next();// while(expr.hasNext()){// categoryExpression = s.or(categoryExpression,(SearchExpression)expr.next());// }// whereExpression = s.and(whereExpression,categoryExpression);// }// } SearchExpression containsExpression = null; if(getSearchText() != null && !"".equals(getSearchText())){ containsExpression = s.contains(getSearchText()); if(whereExpression!=null){ whereExpression = s.and(whereExpression,containsExpression); }else{ whereExpression = containsExpression; } } s.setWhereExpression(whereExpression); System.out.println("------------------------"); System.out.println(s.asString()); System.out.println("------------------------"); return s; }
| 3,231,227
|
public SearchRequest getSearchRequest(String scope, Locale locale) throws SearchException { SearchRequest s = new SearchRequest(); s.addSelection(IWSlideConstants.PROPERTY_CREATION_DATE); s.addSelection(IWSlideConstants.PROPERTY_CATEGORY); s.addScope(new SearchScope(scope)); SearchExpression whereExpression = null; String localeString = ""; //((locale!=null)?locale.getLanguage():""); SearchExpression namePatternExpression = s.compare(CompareOperator.LIKE, IWSlideConstants.PROPERTY_DISPLAY_NAME,"%"+localeString+".article"); SearchExpression creationDateFromExpression = null; if(getSearchPublishedFrom() != null){ creationDateFromExpression = s.compare(CompareOperator.GTE, IWSlideConstants.PROPERTY_CREATION_DATE,getSearchPublishedFrom()); whereExpression = s.and(namePatternExpression,creationDateFromExpression); } SearchExpression creationDateToExpression = null; if(getSearchPublishedTo() != null){ creationDateToExpression = s.compare(CompareOperator.LTE, IWSlideConstants.PROPERTY_CREATION_DATE,getSearchPublishedTo()); whereExpression = s.and(whereExpression,creationDateToExpression); } // List categoryExpressions = new ArrayList(); if(!getSearchCategoryId().equals("-1")){ SearchExpression categoryExpression = s.compare(CompareOperator.LIKE,IWSlideConstants.PROPERTY_CATEGORY,"%"+getSearchCategoryId()+"%"); whereExpression = s.and(whereExpression,categoryExpression); } if(getSearchAuthor()!=null){ SearchExpression authorExpression = s.compare(CompareOperator.LIKE,IWSlideConstants.PROPERTY_CREATOR_DISPLAY_NAME,"%"+getSearchAuthor()+"%"); whereExpression = s.and(whereExpression,authorExpression); } // }// whereExpression = s.and(whereExpression,categoryExpression);// for (Iterator iter = categoryList.iterator(); iter.hasNext();) {// String categoryName = (String) iter.next();// categoryExpressions.add(s.compare(CompareOperator.LIKE,IWSlideConstants.PROPERTY_CATEGORY,"%"+categoryName+"%"));// }// Iterator expr = categoryExpressions.iterator();// if(expr.hasNext()){// SearchExpression categoryExpression = (SearchExpression)expr.next();// while(expr.hasNext()){// categoryExpression = s.or(categoryExpression,(SearchExpression)expr.next());// }// whereExpression = s.and(whereExpression,categoryExpression);// }// } SearchExpression containsExpression = null; if(getSearchText() != null && !"".equals(getSearchText())){ containsExpression = s.contains(getSearchText()); if(whereExpression!=null){ whereExpression = s.and(whereExpression,containsExpression); }else{ whereExpression = containsExpression; } } s.setWhereExpression(whereExpression); System.out.println("------------------------"); System.out.println(s.asString()); System.out.println("------------------------"); return s; }
|
public SearchRequest getSearchRequest(String scope, Locale locale) throws SearchException { SearchRequest s = new SearchRequest(); s.addSelection(IWSlideConstants.PROPERTY_CREATION_DATE); s.addSelection(IWSlideConstants.PROPERTY_CATEGORY); s.addScope(new SearchScope(scope)); SearchExpression whereExpression = null; String localeString = ""; //((locale!=null)?locale.getLanguage():""); SearchExpression namePatternExpression = s.compare(CompareOperator.LIKE, IWSlideConstants.PROPERTY_DISPLAY_NAME,"%"+localeString+".article"); SearchExpression creationDateFromExpression = null; if(getSearchPublishedFrom() != null){ creationDateFromExpression = s.compare(CompareOperator.GTE, IWSlideConstants.PROPERTY_CREATION_DATE,getSearchPublishedFrom()); whereExpression = s.and(namePatternExpression,creationDateFromExpression); } SearchExpression creationDateToExpression = null; if(getSearchPublishedTo() != null){ creationDateToExpression = s.compare(CompareOperator.LTE, IWSlideConstants.PROPERTY_CREATION_DATE,getSearchPublishedTo()); whereExpression = s.and(whereExpression,creationDateToExpression); } // List categoryExpressions = new ArrayList(); if(!getSearchCategoryId().equals("-1")){ SearchExpression categoryExpression = s.compare(CompareOperator.LIKE,IWSlideConstants.PROPERTY_CATEGORY,"%"+getSearchCategoryId()+"%"); whereExpression = s.and(whereExpression,categoryExpression); } if(getSearchAuthor()!=null){ SearchExpression authorExpression = s.compare(CompareOperator.LIKE,IWSlideConstants.PROPERTY_CREATOR_DISPLAY_NAME,"%"+getSearchAuthor()+"%"); whereExpression = s.and(whereExpression,authorExpression); } // }// whereExpression = s.and(whereExpression,categoryExpression);// for (Iterator iter = categoryList.iterator(); iter.hasNext();) {// String categoryName = (String) iter.next();// categoryExpressions.add(s.compare(CompareOperator.LIKE,IWSlideConstants.PROPERTY_CATEGORY,"%"+categoryName+"%"));// }// Iterator expr = categoryExpressions.iterator();// if(expr.hasNext()){// SearchExpression categoryExpression = (SearchExpression)expr.next();// while(expr.hasNext()){// categoryExpression = s.or(categoryExpression,(SearchExpression)expr.next());// }// whereExpression = s.and(whereExpression,categoryExpression);// }// } SearchExpression containsExpression = null; if(getSearchText() != null && !"".equals(getSearchText())){ containsExpression = s.contains(getSearchText()); if(whereExpression!=null){ whereExpression = s.and(whereExpression,containsExpression); }else{ whereExpression = containsExpression; } } s.setWhereExpression(whereExpression); System.out.println("------------------------"); System.out.println(s.asString()); System.out.println("------------------------"); return s; }
| 3,231,228
|
public ProjectSelectionCanvas(MainWindow panel) { super(); this.panel = panel; layer = getLayer(); setMinimumSize(new Dimension(PConstants.BROWSER_SIDE,HEIGHT)); setPreferredSize(new Dimension(PConstants.BROWSER_SIDE,HEIGHT)); setMaximumSize(new Dimension(MAXWIDTH,MAXHEIGHT)); removeInputEventListener(getPanEventHandler()); removeInputEventListener(getZoomEventHandler()); }
|
public ProjectSelectionCanvas(MainWindow panel) { super(); this.panel = panel; layer = getLayer(); setMinimumSize(new Dimension(PConstants.BROWSER_SIDE,HEIGHT)); setPreferredSize(new Dimension(PConstants.BROWSER_SIDE,HEIGHT)); setMaximumSize(new Dimension(MAXWIDTH,MAXHEIGHT)); removeInputEventListener(getPanEventHandler()); removeInputEventListener(getZoomEventHandler()); }
| 3,231,230
|
public void completeInitialization() { System.err.println("completing initialization of project selection canvas"); addInputEventListener(new GenericEventHandler()); }
|
public void completeInitialization() { System.err.println("completing initialization of project selection canvas"); addInputEventListener(new GenericEventHandler()); }
| 3,231,231
|
public void doLayout() { if (reentrant == true) return; reentrant = true; double x=0; double y =VSEP; ProjectLabel pl; int width = getWidth(); System.err.println("displaying project list. width of window is "+width); System.err.println("height is "+getHeight()); Rectangle bounds = getBounds(); Vector rows = new Vector(); Vector row = new Vector(); Vector widths = new Vector(); PBounds b; double rowWidth; Iterator iter = layer.getChildrenIterator(); while (iter.hasNext()) { Object obj = iter.next(); if (obj instanceof ProjectLabel) { pl = (ProjectLabel) obj; double labelWidth = pl.getScaledMaxWidth(); if (x+labelWidth > width) { rows.add(row); widths.add(new Double(x)); x =0; row = new Vector(); } row.add(pl); x += labelWidth; } } rows.add(row); widths.add(new Double(x)); double rowHeight = 0; double spacing = 0; Iterator iter2; for (int i = 0; i < rows.size(); i++) { row = (Vector) rows.elementAt(i); Double rowW = (Double) widths.elementAt(i); rowWidth = rowW.doubleValue(); iter = row.iterator(); // calculate space between items. // leftover is width - rowWidth double remainder = width-rowWidth; // divide that by n-1 if (row.size() >1) spacing = remainder/(row.size()+1); else spacing = 0; x = 0; rowHeight = 0; while (iter.hasNext()) { pl = (ProjectLabel) iter.next(); // place this pl.setOffset(x,y); b = pl.getGlobalFullBounds(); x += pl.getScaledMaxWidth()+spacing; if (pl.getScaledMaxHeight() > rowHeight) rowHeight= pl.getScaledMaxHeight(); } y+= rowHeight; } int height = (int) (y+VSEP); //if (height > lastHeight) { Dimension d= new Dimension(width,height); setMinimumSize(d); setPreferredSize(d); panel.setDividerLocation(height); lastHeight = height; //} reentrant = false; }
|
public void doLayout() { if (reentrant == true) return; reentrant = true; double x=0; double y =VSEP; ProjectLabel pl; int width = getWidth(); System.err.println("displaying project list. width of window is "+width); System.err.println("height is "+getHeight()); Rectangle bounds = getBounds(); Vector rows = new Vector(); Vector row = new Vector(); Vector widths = new Vector(); PBounds b; double rowWidth; Iterator iter = layer.getChildrenIterator(); while (iter.hasNext()) { Object obj = iter.next(); if (obj instanceof ProjectLabel) { pl = (ProjectLabel) obj; double labelWidth = pl.getScaledMaxWidth(); if (x+labelWidth > width) { rows.add(row); widths.add(new Double(x)); x =0; row = new Vector(); } row.add(pl); x += labelWidth; } } rows.add(row); widths.add(new Double(x)); double rowHeight = 0; double spacing = 0; Iterator iter2; for (int i = 0; i < rows.size(); i++) { row = (Vector) rows.elementAt(i); Double rowW = (Double) widths.elementAt(i); rowWidth = rowW.doubleValue(); iter = row.iterator(); // calculate space between items. // leftover is width - rowWidth double remainder = width-rowWidth; // divide that by n-1 if (row.size() >1) spacing = remainder/(row.size()+1); else spacing = 0; x = 0; rowHeight = 0; while (iter.hasNext()) { pl = (ProjectLabel) iter.next(); // place this pl.setOffset(x,y); b = pl.getGlobalFullBounds(); x += pl.getScaledMaxWidth()+spacing; if (pl.getScaledMaxHeight() > rowHeight) rowHeight= pl.getScaledMaxHeight(); } y+= rowHeight; } int height = (int) (y+VSEP); //if (height > lastHeight) { Dimension d= new Dimension(width,height); setMinimumSize(d); setPreferredSize(d); panel.setDividerLocation(height); lastHeight = height; //} reentrant = false; }
| 3,231,232
|
public void doLayout() { if (reentrant == true) return; reentrant = true; double x=0; double y =VSEP; ProjectLabel pl; int width = getWidth(); System.err.println("displaying project list. width of window is "+width); System.err.println("height is "+getHeight()); Rectangle bounds = getBounds(); Vector rows = new Vector(); Vector row = new Vector(); Vector widths = new Vector(); PBounds b; double rowWidth; Iterator iter = layer.getChildrenIterator(); while (iter.hasNext()) { Object obj = iter.next(); if (obj instanceof ProjectLabel) { pl = (ProjectLabel) obj; double labelWidth = pl.getScaledMaxWidth(); if (x+labelWidth > width) { rows.add(row); widths.add(new Double(x)); x =0; row = new Vector(); } row.add(pl); x += labelWidth; } } rows.add(row); widths.add(new Double(x)); double rowHeight = 0; double spacing = 0; Iterator iter2; for (int i = 0; i < rows.size(); i++) { row = (Vector) rows.elementAt(i); Double rowW = (Double) widths.elementAt(i); rowWidth = rowW.doubleValue(); iter = row.iterator(); // calculate space between items. // leftover is width - rowWidth double remainder = width-rowWidth; // divide that by n-1 if (row.size() >1) spacing = remainder/(row.size()+1); else spacing = 0; x = 0; rowHeight = 0; while (iter.hasNext()) { pl = (ProjectLabel) iter.next(); // place this pl.setOffset(x,y); b = pl.getGlobalFullBounds(); x += pl.getScaledMaxWidth()+spacing; if (pl.getScaledMaxHeight() > rowHeight) rowHeight= pl.getScaledMaxHeight(); } y+= rowHeight; } int height = (int) (y+VSEP); //if (height > lastHeight) { Dimension d= new Dimension(width,height); setMinimumSize(d); setPreferredSize(d); panel.setDividerLocation(height); lastHeight = height; //} reentrant = false; }
|
public void doLayout() { if (reentrant == true) return; reentrant = true; double x=0; double y =VSEP; ProjectLabel pl; int width = getWidth(); System.err.println("displaying project list. width of window is "+width); System.err.println("height is "+getHeight()); Rectangle bounds = getBounds(); Vector rows = new Vector(); Vector row = new Vector(); Vector widths = new Vector(); PBounds b; double rowWidth; Iterator iter = layer.getChildrenIterator(); while (iter.hasNext()) { Object obj = iter.next(); if (obj instanceof ProjectLabel) { pl = (ProjectLabel) obj; double labelWidth = pl.getScaledMaxWidth(); if (x+labelWidth > width) { rows.add(row); widths.add(new Double(x)); x =0; row = new Vector(); } row.add(pl); x += labelWidth; } } rows.add(row); widths.add(new Double(x)); double rowHeight = 0; double spacing = 0; Iterator iter2; for (int i = 0; i < rows.size(); i++) { row = (Vector) rows.elementAt(i); Double rowW = (Double) widths.elementAt(i); rowWidth = rowW.doubleValue(); iter = row.iterator(); // calculate space between items. // leftover is width - rowWidth double remainder = width-rowWidth; // divide that by n-1 if (row.size() >1) spacing = remainder/(row.size()+1); else spacing = 0; x = 0; rowHeight = 0; while (iter.hasNext()) { pl = (ProjectLabel) iter.next(); // place this pl.setOffset(x,y); b = pl.getGlobalFullBounds(); x += pl.getScaledMaxWidth()+spacing; if (pl.getScaledMaxHeight() > rowHeight) rowHeight= pl.getScaledMaxHeight(); } y+= rowHeight; } int height = (int) (y+VSEP); //if (height > lastHeight) { Dimension d= new Dimension(width,height); setMinimumSize(d); setPreferredSize(d); panel.setDividerLocation(height); lastHeight = height; //} reentrant = false; }
| 3,231,233
|
public void doLayout() { if (reentrant == true) return; reentrant = true; double x=0; double y =VSEP; ProjectLabel pl; int width = getWidth(); System.err.println("displaying project list. width of window is "+width); System.err.println("height is "+getHeight()); Rectangle bounds = getBounds(); Vector rows = new Vector(); Vector row = new Vector(); Vector widths = new Vector(); PBounds b; double rowWidth; Iterator iter = layer.getChildrenIterator(); while (iter.hasNext()) { Object obj = iter.next(); if (obj instanceof ProjectLabel) { pl = (ProjectLabel) obj; double labelWidth = pl.getScaledMaxWidth(); if (x+labelWidth > width) { rows.add(row); widths.add(new Double(x)); x =0; row = new Vector(); } row.add(pl); x += labelWidth; } } rows.add(row); widths.add(new Double(x)); double rowHeight = 0; double spacing = 0; Iterator iter2; for (int i = 0; i < rows.size(); i++) { row = (Vector) rows.elementAt(i); Double rowW = (Double) widths.elementAt(i); rowWidth = rowW.doubleValue(); iter = row.iterator(); // calculate space between items. // leftover is width - rowWidth double remainder = width-rowWidth; // divide that by n-1 if (row.size() >1) spacing = remainder/(row.size()+1); else spacing = 0; x = 0; rowHeight = 0; while (iter.hasNext()) { pl = (ProjectLabel) iter.next(); // place this pl.setOffset(x,y); b = pl.getGlobalFullBounds(); x += pl.getScaledMaxWidth()+spacing; if (pl.getScaledMaxHeight() > rowHeight) rowHeight= pl.getScaledMaxHeight(); } y+= rowHeight; } int height = (int) (y+VSEP); //if (height > lastHeight) { Dimension d= new Dimension(width,height); setMinimumSize(d); setPreferredSize(d); panel.setDividerLocation(height); lastHeight = height; //} reentrant = false; }
|
publicvoiddoLayout(){ if(reentrant==true) return; reentrant=true; doublex=0; doubley=VSEP; ProjectLabelpl; intwidth=getWidth(); System.err.println("displayingprojectlist.widthofwindowis"+width); System.err.println("heightis"+getHeight()); Rectanglebounds=getBounds(); Vectorrows=newVector(); Vectorrow=newVector(); Vectorwidths=newVector(); PBoundsb; doublerowWidth; Iteratoriter=layer.getChildrenIterator(); while(iter.hasNext()){ Objectobj=iter.next(); if(objinstanceofProjectLabel){ pl=(ProjectLabel)obj; doublelabelWidth=pl.getScaledMaxWidth(); if(x+labelWidth>width){ rows.add(row); widths.add(newDouble(x)); x=0; row=newVector(); } row.add(pl); x+=labelWidth; } } rows.add(row); widths.add(newDouble(x)); doublerowHeight=0; doublespacing=0; Iteratoriter2; for(inti=0;i<rows.size();i++){ row=(Vector)rows.elementAt(i); DoublerowW=(Double)widths.elementAt(i); rowWidth= rowW.doubleValue(); iter=row.iterator(); //calculatespacebetweenitems. //leftoveriswidth-rowWidth doubleremainder=width-rowWidth; //dividethatbyn-1 if(row.size()>1) spacing=remainder/(row.size()+1); else spacing=0; x=0; rowHeight=0; while(iter.hasNext()){ pl=(ProjectLabel)iter.next(); //placethis pl.setOffset(x,y); b=pl.getGlobalFullBounds(); x+=pl.getScaledMaxWidth()+spacing; if(pl.getScaledMaxHeight()>rowHeight) rowHeight=pl.getScaledMaxHeight(); } y+=rowHeight; } intheight=(int)(y+VSEP); //if(height>lastHeight){ Dimensiond=newDimension(width,height); setMinimumSize(d); setPreferredSize(d); panel.setDividerLocation(height); lastHeight=height; //} reentrant=false; }
| 3,231,234
|
public void doLayout() { if (reentrant == true) return; reentrant = true; double x=0; double y =VSEP; ProjectLabel pl; int width = getWidth(); System.err.println("displaying project list. width of window is "+width); System.err.println("height is "+getHeight()); Rectangle bounds = getBounds(); Vector rows = new Vector(); Vector row = new Vector(); Vector widths = new Vector(); PBounds b; double rowWidth; Iterator iter = layer.getChildrenIterator(); while (iter.hasNext()) { Object obj = iter.next(); if (obj instanceof ProjectLabel) { pl = (ProjectLabel) obj; double labelWidth = pl.getScaledMaxWidth(); if (x+labelWidth > width) { rows.add(row); widths.add(new Double(x)); x =0; row = new Vector(); } row.add(pl); x += labelWidth; } } rows.add(row); widths.add(new Double(x)); double rowHeight = 0; double spacing = 0; Iterator iter2; for (int i = 0; i < rows.size(); i++) { row = (Vector) rows.elementAt(i); Double rowW = (Double) widths.elementAt(i); rowWidth = rowW.doubleValue(); iter = row.iterator(); // calculate space between items. // leftover is width - rowWidth double remainder = width-rowWidth; // divide that by n-1 if (row.size() >1) spacing = remainder/(row.size()+1); else spacing = 0; x = 0; rowHeight = 0; while (iter.hasNext()) { pl = (ProjectLabel) iter.next(); // place this pl.setOffset(x,y); b = pl.getGlobalFullBounds(); x += pl.getScaledMaxWidth()+spacing; if (pl.getScaledMaxHeight() > rowHeight) rowHeight= pl.getScaledMaxHeight(); } y+= rowHeight; } int height = (int) (y+VSEP); //if (height > lastHeight) { Dimension d= new Dimension(width,height); setMinimumSize(d); setPreferredSize(d); panel.setDividerLocation(height); lastHeight = height; //} reentrant = false; }
|
public void doLayout() { if (reentrant == true) return; reentrant = true; double x=0; double y =VSEP; ProjectLabel pl; int width = getWidth(); System.err.println("displaying project list. width of window is "+width); System.err.println("height is "+getHeight()); Rectangle bounds = getBounds(); Vector rows = new Vector(); Vector row = new Vector(); Vector widths = new Vector(); PBounds b; double rowWidth; Iterator iter = layer.getChildrenIterator(); while (iter.hasNext()) { Object obj = iter.next(); if (obj instanceof ProjectLabel) { pl = (ProjectLabel) obj; double labelWidth = pl.getScaledMaxWidth(); if (x+labelWidth > width) { rows.add(row); widths.add(new Double(x)); x =0; row = new Vector(); } row.add(pl); x += labelWidth; } } rows.add(row); widths.add(new Double(x)); double rowHeight = 0; double spacing = 0; Iterator iter2; for (int i = 0; i < rows.size(); i++) { row = (Vector) rows.elementAt(i); Double rowW = (Double) widths.elementAt(i); rowWidth = rowW.doubleValue(); iter = row.iterator(); // calculate space between items. // leftover is width - rowWidth double remainder = width-rowWidth; // divide that by n-1 if (row.size() >1) spacing = remainder/(row.size()+1); else spacing = 0; x = 0; rowHeight = 0; while (iter.hasNext()) { pl = (ProjectLabel) iter.next(); // place this pl.setOffset(x,y); b = pl.getGlobalFullBounds(); x += pl.getScaledMaxWidth()+spacing; if (pl.getScaledMaxHeight() > rowHeight) rowHeight= pl.getScaledMaxHeight(); } y+= rowHeight; } int height = (int) (y+VSEP); //if (height > lastHeight) { Dimension d= new Dimension(width,height); setMinimumSize(d); setPreferredSize(d); panel.setDividerLocation(height); lastHeight = height; //} reentrant = false; }
| 3,231,235
|
public void layoutContents() { System.err.println("laying out contents of project selection canvas"); setMinimumSize(new Dimension(PConstants.BROWSER_SIDE,HEIGHT)); setPreferredSize(new Dimension(PConstants.BROWSER_SIDE,HEIGHT)); setMaximumSize(new Dimension(MAXWIDTH,MAXHEIGHT)); doLayout(); }
|
public void layoutContents() { System.err.println("laying out contents of project selection canvas"); setMinimumSize(new Dimension(PConstants.BROWSER_SIDE,HEIGHT)); setPreferredSize(new Dimension(PConstants.BROWSER_SIDE,HEIGHT)); setMaximumSize(new Dimension(MAXWIDTH,MAXHEIGHT)); doLayout(); }
| 3,231,236
|
public void setRolloverProject(BrowserProjectSummary proj) { System.err.println("\n\n\nsetting rollover project.."); if (proj != null) System.err.println("to .."+proj.getName()); if (selectedProject != null) System.err.println("selected is ..."+selectedProject.getName()); setLabelPainting(null,proj); panel.setRolloverProject(proj); doLayout(); }
|
public void setRolloverProject(BrowserProjectSummary proj) { System.err.println("\n\n\nsetting rollover project.."); if (proj != null) System.err.println("to .."+proj.getName()); if (selectedProject != null) System.err.println("selected is ..."+selectedProject.getName()); setLabelPainting(null,proj); panel.setRolloverProject(proj); doLayout(); }
| 3,231,237
|
public void setSelectedDataset(BrowserDatasetSummary dataset) { System.err.println("project canvas got selection of dataset .."+ dataset); if (dataset == selectedDataset) //no change return; selectedDataset = dataset; setLabelPainting(null,null); }
|
public void setSelectedDataset(BrowserDatasetSummary dataset) { System.err.println("project canvas got selection of dataset .."+ dataset); if (dataset == selectedDataset) //no change return; selectedDataset = dataset; setLabelPainting(null,null); }
| 3,231,238
|
public void setSelectedProject(BrowserProjectSummary selected) { if (selected == selectedProject) // no change return; if (selected != null) System.err.println("\nset selected project to ..."+selected.getName()); else System.err.println("\nset selected project to null"); selectedProject = selected; if (selected != null && !selected.hasDataset(selectedDataset)) selectedDataset = null; setLabelPainting(null,null); panel.setSelectedProject(selected); doLayout(); }
|
public void setSelectedProject(BrowserProjectSummary selected) { if (selected == selectedProject) // no change return; if (selected != null) System.err.println("\nset selected project to ..."+selected.getName()); else System.err.println("\nset selected project to null"); selectedProject = selected; if (selected != null && !selected.hasDataset(selectedDataset)) selectedDataset = null; setLabelPainting(null,null); panel.setSelectedProject(selected); doLayout(); }
| 3,231,239
|
public void updateDataModel(Integer start, Integer rows) { if (_dataModel == null) { _dataModel = new WFDataModel(); } ArticleItemBean[] articleItemBean; try { articleItemBean = (ArticleItemBean[]) ArticleListBean.loadAllArticlesInFolder(ContentUtil.ARTICLE_PATH).toArray(new ArticleItemBean[0]); int availableRows = articleItemBean.length; int nrOfRows = rows.intValue(); if (nrOfRows == 0) { nrOfRows = availableRows; } int maxRow = Math.min(start.intValue() + nrOfRows,availableRows); for (int i = start.intValue(); i < maxRow; i++) { String id = articleItemBean[i].getFolderLocation()+"/"+articleItemBean[i].getHeadline()+".xml"; ArticleListBean bean = new ArticleListBean(id, articleItemBean[i].getHeadline(), "", articleItemBean[i].getAuthor(), articleItemBean[i].getStatus()); _dataModel.set(bean, i); } _dataModel.setRowCount(availableRows); } catch (XmlException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } }
|
public void updateDataModel(Integer start, Integer rows) { if (_dataModel == null) { _dataModel = new WFDataModel(); } ArticleItemBean[] articleItemBean; try { articleItemBean = (ArticleItemBean[]) ArticleListBean.loadAllArticlesInFolder(ContentUtil.ARTICLE_PATH).toArray(new ArticleItemBean[0]); int availableRows = articleItemBean.length; int nrOfRows = rows.intValue(); if (nrOfRows == 0) { nrOfRows = availableRows; } int maxRow = Math.min(start.intValue() + nrOfRows,availableRows); for (int i = start.intValue(); i < maxRow; i++) { String id = articleItemBean[i].getFolderLocation()+"/"+articleItemBean[i].getHeadline()+".xml"; ArticleListBean bean = new ArticleListBean(id, articleItemBean[i].getHeadline(), "", articleItemBean[i].getAuthor(), articleItemBean[i].getStatus()); _dataModel.set(bean, i); } _dataModel.setRowCount(availableRows); } catch (XmlException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } }
| 3,231,241
|
public ArticleListBean(String id, String headline, String published, String author, String status) { _id = id; _headline = headline; _published = published; _author = author; _status = status; _testStyle = ""; }
|
public ArticleListBean(String id, String headline, String published, String author, String status) { _id = id; _headline = headline; _published = published; _author = author; _status = status; _testStyle = ""; }
| 3,231,242
|
public static List loadAllArticlesInFolder(String folder) throws XmlException, IOException{ List list = new ArrayList(); // File[] articleFile = folder.listFiles(); IWUserContext iwuc = IWContext.getInstance(); IWApplicationContext iwac = iwuc.getApplicationContext(); IWSlideSession session = (IWSlideSession)IBOLookup.getSessionInstance(iwuc,IWSlideSession.class); IWSlideService service = (IWSlideService)IBOLookup.getServiceInstance(iwac,IWSlideService.class); WebdavRootResource rootResource = session.getWebdavRootResource(); String[] file = rootResource.list(); for(int i=0;i<file.length;i++){// System.out.println("Attempting to load "+articleFile[i].toString()); System.out.println("Attempting to load "+file[i].toString()); ArticleItemBean article = new ArticleItemBean();// article.load(articleFile[i].toString()); article.load(folder+"/"+file[i]); list.add(article); } return list; }
|
public static List loadAllArticlesInFolder(String folder) throws XmlException, IOException{ List list = new ArrayList(); // File[] articleFile = folder.listFiles(); IWUserContext iwuc = IWContext.getInstance(); IWApplicationContext iwac = iwuc.getApplicationContext(); IWSlideSession session = (IWSlideSession)IBOLookup.getSessionInstance(iwuc,IWSlideSession.class); IWSlideService service = (IWSlideService)IBOLookup.getServiceInstance(iwac,IWSlideService.class); WebdavRootResource rootResource = session.getWebdavRootResource(); String[] file = rootResource.list(); for(int i=0;i<file.length;i++){// System.out.println("Attempting to load "+articleFile[i].toString()); System.out.println("Attempting to load "+file[i].toString()); ArticleItemBean article = new ArticleItemBean();// article.load(articleFile[i].toString()); article.load(folder+"/"+file[i]); list.add(article); } return list; }
| 3,231,243
|
public static List loadAllArticlesInFolder(String folder) throws XmlException, IOException{ List list = new ArrayList(); // File[] articleFile = folder.listFiles(); IWUserContext iwuc = IWContext.getInstance(); IWApplicationContext iwac = iwuc.getApplicationContext(); IWSlideSession session = (IWSlideSession)IBOLookup.getSessionInstance(iwuc,IWSlideSession.class); IWSlideService service = (IWSlideService)IBOLookup.getServiceInstance(iwac,IWSlideService.class); WebdavRootResource rootResource = session.getWebdavRootResource(); String[] file = rootResource.list(); for(int i=0;i<file.length;i++){// System.out.println("Attempting to load "+articleFile[i].toString()); System.out.println("Attempting to load "+file[i].toString()); ArticleItemBean article = new ArticleItemBean();// article.load(articleFile[i].toString()); article.load(folder+"/"+file[i]); list.add(article); } return list; }
|
public static List loadAllArticlesInFolder(String folder) throws XmlException, IOException{ List list = new ArrayList(); // File[] articleFile = folder.listFiles(); IWUserContext iwuc = IWContext.getInstance(); IWApplicationContext iwac = iwuc.getApplicationContext(); IWSlideSession session = (IWSlideSession)IBOLookup.getSessionInstance(iwuc,IWSlideSession.class); IWSlideService service = (IWSlideService)IBOLookup.getServiceInstance(iwac,IWSlideService.class); WebdavRootResource rootResource = session.getWebdavRootResource(); String[] file = rootResource.list(); for(int i=0;i<file.length;i++){// System.out.println("Attempting to load "+articleFile[i].toString()); System.out.println("Attempting to load "+file[i].toString()); ArticleItemBean article = new ArticleItemBean();// article.load(articleFile[i].toString()); article.load(folder+"/"+file[i]); list.add(article); } return list; }
| 3,231,244
|
public static List loadAllArticlesInFolder(String folder) throws XmlException, IOException{ List list = new ArrayList(); // File[] articleFile = folder.listFiles(); IWUserContext iwuc = IWContext.getInstance(); IWApplicationContext iwac = iwuc.getApplicationContext(); IWSlideSession session = (IWSlideSession)IBOLookup.getSessionInstance(iwuc,IWSlideSession.class); IWSlideService service = (IWSlideService)IBOLookup.getServiceInstance(iwac,IWSlideService.class); WebdavRootResource rootResource = session.getWebdavRootResource(); String[] file = rootResource.list(); for(int i=0;i<file.length;i++){// System.out.println("Attempting to load "+articleFile[i].toString()); System.out.println("Attempting to load "+file[i].toString()); ArticleItemBean article = new ArticleItemBean();// article.load(articleFile[i].toString()); article.load(folder+"/"+file[i]); list.add(article); } return list; }
|
public static List loadAllArticlesInFolder(String folder) throws XmlException, IOException{ List list = new ArrayList(); // File[] articleFile = folder.listFiles(); IWUserContext iwuc = IWContext.getInstance(); IWApplicationContext iwac = iwuc.getApplicationContext(); IWSlideSession session = (IWSlideSession)IBOLookup.getSessionInstance(iwuc,IWSlideSession.class); IWSlideService service = (IWSlideService)IBOLookup.getServiceInstance(iwac,IWSlideService.class); WebdavRootResource rootResource = session.getWebdavRootResource(); String[] file = rootResource.list(); for(int i=0;i<file.length;i++){// System.out.println("Attempting to load "+articleFile[i].toString()); System.out.println("Attempting to load "+file[i].toString()); ArticleItemBean article = new ArticleItemBean();// article.load(articleFile[i].toString()); article.load(folder+"/"+file[i]); list.add(article); } return list; }
| 3,231,245
|
public void load(String path) throws XmlException, IOException{ IWUserContext iwuc = IWContext.getInstance(); IWApplicationContext iwac = iwuc.getApplicationContext(); IWSlideSession session = (IWSlideSession)IBOLookup.getSessionInstance(iwuc,IWSlideSession.class); IWSlideService service = (IWSlideService)IBOLookup.getServiceInstance(iwac,IWSlideService.class); //TODO have to find the host machine url to load the resource.// WebdavResource webdavResource = session.getWebdavResource(getWebdavServletURL(iwuc)+path);// WebdavFile webdavFile = session.getWebdavFile(); HttpURL root = new HttpURL(service.getWebdavServerURL()+path, "root", "root");// root.setUserinfo("root","root"); WebdavResource webdavResource = new WebdavResource(root); ArticleDocument articleDoc; articleDoc = ArticleDocument.Factory.parse(webdavResource.getMethodDataAsString()); ArticleDocument.Article article = articleDoc.getArticle();// ArticleItemBean articleBean = new ArticleItemBean(); setHeadline(article.getHeadline()); setBody(article.getBody()); setTeaser(article.getTeaser()); setAuthor(article.getAuthor()); setSource(article.getSource()); setComment(article.getComment()); String category = ""; int lastSlash = path.lastIndexOf('/'); if(lastSlash>0) { category = path.substring(0,lastSlash); } setMainCategory(category); // System.out.println("loaded "+getBody()); }
|
public void load(String path) throws XmlException, IOException{ IWUserContext iwuc = IWContext.getInstance(); IWApplicationContext iwac = iwuc.getApplicationContext(); IWSlideSession session = (IWSlideSession)IBOLookup.getSessionInstance(iwuc,IWSlideSession.class); IWSlideService service = (IWSlideService)IBOLookup.getServiceInstance(iwac,IWSlideService.class); //TODO have to find the host machine url to load the resource.// WebdavResource webdavResource = session.getWebdavResource(getWebdavServletURL(iwuc)+path);// WebdavFile webdavFile = session.getWebdavFile(); HttpURL root = new HttpURL(service.getWebdavServerURL()+path, "root", "root");// root.setUserinfo("root","root"); WebdavResource webdavResource = new WebdavResource(root); ArticleDocument articleDoc; articleDoc = ArticleDocument.Factory.parse(webdavResource.getMethodDataAsString()); ArticleDocument.Article article = articleDoc.getArticle();// ArticleItemBean articleBean = new ArticleItemBean(); setHeadline(article.getHeadline()); setBody(article.getBody()); setTeaser(article.getTeaser()); setAuthor(article.getAuthor()); setSource(article.getSource()); setComment(article.getComment()); String category = ""; int lastSlash = path.lastIndexOf('/'); if(lastSlash>0) { category = path.substring(0,lastSlash); } setMainCategory(category); // System.out.println("loaded "+getBody()); }
| 3,231,246
|
public void load(String path) throws XmlException, IOException{ IWUserContext iwuc = IWContext.getInstance(); IWApplicationContext iwac = iwuc.getApplicationContext(); IWSlideSession session = (IWSlideSession)IBOLookup.getSessionInstance(iwuc,IWSlideSession.class); IWSlideService service = (IWSlideService)IBOLookup.getServiceInstance(iwac,IWSlideService.class); //TODO have to find the host machine url to load the resource.// WebdavResource webdavResource = session.getWebdavResource(getWebdavServletURL(iwuc)+path);// WebdavFile webdavFile = session.getWebdavFile(); HttpURL root = new HttpURL(service.getWebdavServerURL()+path, "root", "root");// root.setUserinfo("root","root"); WebdavResource webdavResource = new WebdavResource(root); ArticleDocument articleDoc; articleDoc = ArticleDocument.Factory.parse(webdavResource.getMethodDataAsString()); ArticleDocument.Article article = articleDoc.getArticle();// ArticleItemBean articleBean = new ArticleItemBean(); setHeadline(article.getHeadline()); setBody(article.getBody()); setTeaser(article.getTeaser()); setAuthor(article.getAuthor()); setSource(article.getSource()); setComment(article.getComment()); String category = ""; int lastSlash = path.lastIndexOf('/'); if(lastSlash>0) { category = path.substring(0,lastSlash); } setMainCategory(category); // System.out.println("loaded "+getBody()); }
|
public void load(String path) throws XmlException, IOException{ IWUserContext iwuc = IWContext.getInstance(); IWApplicationContext iwac = iwuc.getApplicationContext(); IWSlideSession session = (IWSlideSession)IBOLookup.getSessionInstance(iwuc,IWSlideSession.class); IWSlideService service = (IWSlideService)IBOLookup.getServiceInstance(iwac,IWSlideService.class); //TODO have to find the host machine url to load the resource.// WebdavResource webdavResource = session.getWebdavResource(getWebdavServletURL(iwuc)+path);// WebdavFile webdavFile = session.getWebdavFile(); HttpURL root = new HttpURL(service.getWebdavServerURL()+path, "root", "root");// root.setUserinfo("root","root"); WebdavResource webdavResource = new WebdavResource(root); ArticleDocument articleDoc; articleDoc = ArticleDocument.Factory.parse(webdavResource.getMethodDataAsString()); ArticleDocument.Article article = articleDoc.getArticle();// ArticleItemBean articleBean = new ArticleItemBean(); setHeadline(article.getHeadline()); setBody(article.getBody()); setTeaser(article.getTeaser()); setAuthor(article.getAuthor()); setSource(article.getSource()); setComment(article.getComment()); String category = ""; int lastSlash = path.lastIndexOf('/'); if(lastSlash>0) { category = path.substring(0,lastSlash); } setMainCategory(category); // System.out.println("loaded "+getBody()); }
| 3,231,247
|
private String generateTableRowForClass(Clazz clazz) { StringBuffer ret = new StringBuffer(); double lineCoverage = clazz.getLineCoverageRate(); double branchCoverage = clazz.getBranchCoverageRate(); double ccn = Util.getCCN( new File(sourceDir, clazz.getLongFileName()), false); ret.append(" <tr>"); ret.append("<td class=\"text\"><a href=\"" + clazz.getLongName() + ".html\">" + clazz.getName() + "</a></td>"); ret.append(generateTableColumnsFromData(lineCoverage, branchCoverage, ccn)); ret.append("</tr>"); return ret.toString(); }
|
private String generateTableRowForClass(Clazz clazz) { StringBuffer ret = new StringBuffer(); double lineCoverage = clazz.getLineCoverageRate(); double branchCoverage = clazz.getBranchCoverageRate(); double ccn = Util.getCCN( new File(sourceDir, clazz.getLongFileName()), false); ret.append(" <tr>"); ret.append("<td class=\"text\"><a href=\"" + clazz.getLongName() + ".html\">" + clazz.getName() + "</a></td>"); ret.append(generateTableColumnsFromData(lineCoverage, branchCoverage, ccn)); ret.append("</tr>"); return ret.toString(); }
| 3,231,250
|
private UIComponent getSearchPanel() { String ref = LIST_ARTICLES_BEAN_ID + "."; String bref = WFPage.CONTENT_BUNDLE + "."; WFContainer mainContainer = new WFContainer(); WFErrorMessages em = new WFErrorMessages(); em.addErrorMessage(SEARCH_PUBLISHED_FROM_ID); em.addErrorMessage(SEARCH_PUBLISHED_TO_ID); mainContainer.add(em); HtmlPanelGrid p = WFPanelUtil.getFormPanel(3); p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "published_from"), WFUtil.getText(":"))); p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "published_to"), WFUtil.getText(":"))); p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "category"), WFUtil.getText(":"))); HtmlInputText searchPublishedFromInput = WFUtil.getInputText(SEARCH_PUBLISHED_FROM_ID, ref + "searchPublishedFrom"); searchPublishedFromInput.setSize(20); searchPublishedFromInput.setConverter(new WFDateConverter()); p.getChildren().add(searchPublishedFromInput); HtmlInputText searchPublishedToInput = WFUtil.getInputText(SEARCH_PUBLISHED_TO_ID, ref + "searchPublishedTo"); searchPublishedToInput.setSize(20); searchPublishedToInput.setConverter(new WFDateConverter()); p.getChildren().add(searchPublishedToInput); //HtmlSelectOneMenu searchCategoryMenu = WFUtil.getSelectOneMenu(SEARCH_CATEGORY_ID, ref + "categories", ref + "searchCategoryId"); //searchCategoryMenu.setConverter(new IntegerConverter()); //p.getChildren().add(searchCategoryMenu); mainContainer.add(p); mainContainer.add(WFUtil.getText(" ")); p = WFPanelUtil.getPlainFormPanel(1); p.getChildren().add(WFUtil.getButtonVB(LIST_BUTTON_ID, bref + "list", this)); mainContainer.add(p); return mainContainer; }
|
private UIComponent getSearchPanel() { String ref = LIST_ARTICLES_BEAN_ID + "."; String bref = WFPage.CONTENT_BUNDLE + "."; WFContainer mainContainer = new WFContainer(); WFErrorMessages em = new WFErrorMessages(); em.addErrorMessage(SEARCH_PUBLISHED_FROM_ID); em.addErrorMessage(SEARCH_PUBLISHED_TO_ID); mainContainer.add(em); HtmlPanelGrid p = WFPanelUtil.getFormPanel(3); p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "published_from"), WFUtil.getText(":"))); p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "published_to"), WFUtil.getText(":"))); p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "category"), WFUtil.getText(":"))); HtmlInputText searchPublishedFromInput = WFUtil.getInputText(SEARCH_PUBLISHED_FROM_ID, ref + "searchPublishedFrom"); searchPublishedFromInput.setSize(20); searchPublishedFromInput.setConverter(new WFDateConverter()); p.getChildren().add(searchPublishedFromInput); HtmlInputText searchPublishedToInput = WFUtil.getInputText(SEARCH_PUBLISHED_TO_ID, ref + "searchPublishedTo"); searchPublishedToInput.setSize(20); searchPublishedToInput.setConverter(new WFDateConverter()); p.getChildren().add(searchPublishedToInput); //HtmlSelectOneMenu searchCategoryMenu = WFUtil.getSelectOneMenu(SEARCH_CATEGORY_ID, ref + "categories", ref + "searchCategoryId"); //searchCategoryMenu.setConverter(new IntegerConverter()); //p.getChildren().add(searchCategoryMenu); mainContainer.add(p); mainContainer.add(WFUtil.getText(" ")); p = WFPanelUtil.getPlainFormPanel(1); p.getChildren().add(WFUtil.getButtonVB(LIST_BUTTON_ID, bref + "list", this)); mainContainer.add(p); return mainContainer; }
| 3,231,251
|
public void activate() {}
|
public void activate() {}
| 3,231,255
|
public void setContext(Registry ctx) { registry = ctx; EventBus bus = registry.getEventBus(); bus.register(this, ShowProperties.class); //TODO need to review that code. TreeViewer viewer = TreeViewerFactory.getViewer(); if (viewer != null) viewer.activate(); }
|
public void setContext(Registry ctx) { registry = ctx; EventBus bus = registry.getEventBus(); bus.register(this, ShowProperties.class); //TODO need to review that code. TreeViewer viewer = TreeViewerFactory.getViewer(); if (viewer != null) viewer.activate(); }
| 3,231,256
|
public void postExecuteUnder() { popFrame(); popRubyClass(); unsetCRef(); }
|
public void postExecuteUnder() { popFrame(); popRubyClass(); popCRef(); }
| 3,231,259
|
public void preExecuteUnder(RubyModule executeUnderClass) { Frame frame = getCurrentFrame(); pushRubyClass(executeUnderClass); setCRef(executeUnderClass.getCRef()); pushFrame(null, frame.getArgs(), frame.getLastFunc(), frame.getLastClass()); getCurrentFrame().setScope(getPreviousFrame().getScope()); }
|
public void preExecuteUnder(RubyModule executeUnderClass) { Frame frame = getCurrentFrame(); pushRubyClass(executeUnderClass); pushCRef(executeUnderClass); pushFrame(null, frame.getArgs(), frame.getLastFunc(), frame.getLastClass()); getCurrentFrame().setScope(getPreviousFrame().getScope()); }
| 3,231,260
|
public RubyFixnum hash() { return getRuntime().newFixnum(hashCode()); }
|
public RubyFixnum hash() { return getRuntime().newFixnum(symbol.hashCode()); }
| 3,231,261
|
public void store() throws IDOStoreException{ boolean storeOk = true; clearErrorKeys(); if (getHeadline().trim().equals("")) { addErrorKey(KEY_ERROR_HEADLINE_EMPTY); storeOk = false; } if (getBody().trim().equals("")) { addErrorKey(KEY_ERROR_BODY_EMPTY); storeOk = false; } // if (getRequestedStatus() != null && getRequestedStatus().equals(ContentItemCase.STATUS_PUBLISHED)) {// if (getCase().getPublishedFromDate() == null) {// addErrorKey(KEY_ERROR_PUBLISHED_FROM_DATE_EMPTY);// storeOk = false;// }// } //Need to create article.setCategory(getCategory()); // String filename = getHeadline();// if(null==filename || filename.length()==0) {// filename = "empty";// }/* File path = new File(getFolder()); if(!path.exists()) { path.mkdirs(); }*/ try { IWUserContext iwuc = IWContext.getInstance(); IWApplicationContext iwac = iwuc.getApplicationContext(); IWSlideSession session = (IWSlideSession)IBOLookup.getSessionInstance(iwuc,IWSlideSession.class); IWSlideService service = (IWSlideService)IBOLookup.getServiceInstance(iwac,IWSlideService.class); WebdavRootResource rootResource = session.getWebdavRootResource(); String uri = service.getWebdavServerURI(); String folderLoaction = getFolderLocation();// String filePath = service.getWebdavServerURI()+getFolderLocation();// boolean success = rootResource.mkcolMethod(filePath);// createPath(getFolderLocation()); IWSlideService slideService = (IWSlideService)IBOLookup.getServiceInstance(iwac,IWSlideService.class); String path = getArticlePath(service); File file = new File(path); slideService.createAllFoldersInPath(file.getParent()); System.out.println("URI = "+uri); System.out.println("Folder location = "+folderLoaction); String article = getAsXML();// System.out.println("success "+success);// success = // String filename = createFileName(service); System.out.println("Stored language "+getLanguage()); rootResource.putMethod(session.getURI(path),article); try { load(getArticlePath(service)); } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); }// System.out.println("success "+success);// String webdavServletURL = getWebdavServletURL(iwuc)+"/"+getFolder();// System.out.println("webdavServletURL = "+webdavServletURL);// System.out.println("webdavServerURL = "+service.getWebdavServerURL());// WebdavResource webdavResource = session.getWebdavResource(session.getWebdavServerURL().toString());// WebdavResource webdavResource = session.getWebdavResource("http://localhost:8080/servlet/webdav");// WebdavResource webdavResource = new WebdavResource("http://localhost:8080/servlet/webdav/"); // WebdavFile webdavFile = session.getWebdavFile();// WebdavFile path = new WebdavFile(webdavFile, getFolder());// path.mkdirs();// webdavResource = session.getWebdavResource(getWebdavServletURL(iwuc)+getFolder()+"/"+filename+ARTICLE_SUFFIX);// WebdavResource webdavResource = session.getWebdavResource("http://localhost:8080/servlet/webdav/"+filename+ARTICLE_SUFFIX);// IWSlideService iwss = new IWSlideService();// HttpURL root = new HttpURL("http://localhost:8080/servlet/webdav/files/");// WebdavResource webdavResource = new WebdavResource("http://localhost:8080/servlet/webdav/files/"+filename+ARTICLE_SUFFIX);// WebdavFile webdavFile = session.getWebdavFile();// webdavResource.putMethod(new File(filename+ARTICLE_SUFFIX)); /* HttpURL root = new HttpURL("http://localhost:8080/servlet/webdav/files/"+filename+ARTICLE_SUFFIX); root.setUserinfo("root","root"); WebdavFile webdavFile = new WebdavFile(webdavResource.getHttpURL()); webdavResource.close(); */// HttpURL root = new HttpURL("http://localhost:8080/servlet/webdav/files/"+filename+ARTICLE_SUFFIX, "root", "root");// root.setUserinfo("root","root"); // WebdavFile webdavFile = new WebdavFile("http://localhost:8080/servlet/webdav/files/"+filename+ARTICLE_SUFFIX, "root", "root");// webdavFile.createNewFile();// if(!webdavFile.exists()) {// } // articleDoc.save(new File(getFolder()+"/"+filename+ARTICLE_SUFFIX));// articleDoc.save(webdavFile);// webdavFile.close(); } catch (IOException e1) { storeOk = false; // TODO Auto-generated catch block e1.printStackTrace(); } if (storeOk) { if (getRequestedStatus() != null) { setStatus(getRequestedStatus()); setRequestedStatus(null); } }else { throw new ArticleStoreException(); } }
|
public void store() throws IDOStoreException{ boolean storeOk = true; clearErrorKeys(); if (getHeadline().trim().equals("")) { addErrorKey(KEY_ERROR_HEADLINE_EMPTY); storeOk = false; } if (getBody().trim().equals("")) { addErrorKey(KEY_ERROR_BODY_EMPTY); storeOk = false; } // if (getRequestedStatus() != null && getRequestedStatus().equals(ContentItemCase.STATUS_PUBLISHED)) {// if (getCase().getPublishedFromDate() == null) {// addErrorKey(KEY_ERROR_PUBLISHED_FROM_DATE_EMPTY);// storeOk = false;// }// } //Need to create article.setCategory(getCategory()); // String filename = getHeadline();// if(null==filename || filename.length()==0) {// filename = "empty";// }/* File path = new File(getFolder()); if(!path.exists()) { path.mkdirs(); }*/ try { IWUserContext iwuc = IWContext.getInstance(); IWApplicationContext iwac = iwuc.getApplicationContext(); IWSlideSession session = (IWSlideSession)IBOLookup.getSessionInstance(iwuc,IWSlideSession.class); IWSlideService service = (IWSlideService)IBOLookup.getServiceInstance(iwac,IWSlideService.class); WebdavRootResource rootResource = session.getWebdavRootResource(); String uri = service.getWebdavServerURI(); String folderLoaction = getFolderLocation();// String filePath = service.getWebdavServerURI()+getFolderLocation();// boolean success = rootResource.mkcolMethod(filePath);// createPath(getFolderLocation()); IWSlideService slideService = (IWSlideService)IBOLookup.getServiceInstance(iwac,IWSlideService.class); String path = getArticlePath(service); File file = new File(path); slideService.createAllFoldersInPath(file.getParent()); System.out.println("URI = "+uri); System.out.println("Folder location = "+folderLoaction); String article = getAsXML();// System.out.println("success "+success);// success = // String filename = createFileName(service); System.out.println("Stored language "+getLanguage()); rootResource.putMethod(session.getURI(path),article); try { load(getArticlePath(service)); } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); }// System.out.println("success "+success);// String webdavServletURL = getWebdavServletURL(iwuc)+"/"+getFolder();// System.out.println("webdavServletURL = "+webdavServletURL);// System.out.println("webdavServerURL = "+service.getWebdavServerURL());// WebdavResource webdavResource = session.getWebdavResource(session.getWebdavServerURL().toString());// WebdavResource webdavResource = session.getWebdavResource("http://localhost:8080/servlet/webdav");// WebdavResource webdavResource = new WebdavResource("http://localhost:8080/servlet/webdav/"); // WebdavFile webdavFile = session.getWebdavFile();// WebdavFile path = new WebdavFile(webdavFile, getFolder());// path.mkdirs();// webdavResource = session.getWebdavResource(getWebdavServletURL(iwuc)+getFolder()+"/"+filename+ARTICLE_SUFFIX);// WebdavResource webdavResource = session.getWebdavResource("http://localhost:8080/servlet/webdav/"+filename+ARTICLE_SUFFIX);// IWSlideService iwss = new IWSlideService();// HttpURL root = new HttpURL("http://localhost:8080/servlet/webdav/files/");// WebdavResource webdavResource = new WebdavResource("http://localhost:8080/servlet/webdav/files/"+filename+ARTICLE_SUFFIX);// WebdavFile webdavFile = session.getWebdavFile();// webdavResource.putMethod(new File(filename+ARTICLE_SUFFIX)); /* HttpURL root = new HttpURL("http://localhost:8080/servlet/webdav/files/"+filename+ARTICLE_SUFFIX); root.setUserinfo("root","root"); WebdavFile webdavFile = new WebdavFile(webdavResource.getHttpURL()); webdavResource.close(); */// HttpURL root = new HttpURL("http://localhost:8080/servlet/webdav/files/"+filename+ARTICLE_SUFFIX, "root", "root");// root.setUserinfo("root","root"); // WebdavFile webdavFile = new WebdavFile("http://localhost:8080/servlet/webdav/files/"+filename+ARTICLE_SUFFIX, "root", "root");// webdavFile.createNewFile();// if(!webdavFile.exists()) {// } // articleDoc.save(new File(getFolder()+"/"+filename+ARTICLE_SUFFIX));// articleDoc.save(webdavFile);// webdavFile.close(); } catch (IOException e1) { storeOk = false; // TODO Auto-generated catch block e1.printStackTrace(); } if (storeOk) { if (getRequestedStatus() != null) { setStatus(getRequestedStatus()); setRequestedStatus(null); } }else { throw new ArticleStoreException(); } }
| 3,231,262
|
public void store() throws IDOStoreException{ boolean storeOk = true; clearErrorKeys(); if (getHeadline().trim().equals("")) { addErrorKey(KEY_ERROR_HEADLINE_EMPTY); storeOk = false; } if (getBody().trim().equals("")) { addErrorKey(KEY_ERROR_BODY_EMPTY); storeOk = false; } // if (getRequestedStatus() != null && getRequestedStatus().equals(ContentItemCase.STATUS_PUBLISHED)) {// if (getCase().getPublishedFromDate() == null) {// addErrorKey(KEY_ERROR_PUBLISHED_FROM_DATE_EMPTY);// storeOk = false;// }// } //Need to create article.setCategory(getCategory()); // String filename = getHeadline();// if(null==filename || filename.length()==0) {// filename = "empty";// }/* File path = new File(getFolder()); if(!path.exists()) { path.mkdirs(); }*/ try { IWUserContext iwuc = IWContext.getInstance(); IWApplicationContext iwac = iwuc.getApplicationContext(); IWSlideSession session = (IWSlideSession)IBOLookup.getSessionInstance(iwuc,IWSlideSession.class); IWSlideService service = (IWSlideService)IBOLookup.getServiceInstance(iwac,IWSlideService.class); WebdavRootResource rootResource = session.getWebdavRootResource(); String uri = service.getWebdavServerURI(); String folderLoaction = getFolderLocation();// String filePath = service.getWebdavServerURI()+getFolderLocation();// boolean success = rootResource.mkcolMethod(filePath);// createPath(getFolderLocation()); IWSlideService slideService = (IWSlideService)IBOLookup.getServiceInstance(iwac,IWSlideService.class); String path = getArticlePath(service); File file = new File(path); slideService.createAllFoldersInPath(file.getParent()); System.out.println("URI = "+uri); System.out.println("Folder location = "+folderLoaction); String article = getAsXML();// System.out.println("success "+success);// success = // String filename = createFileName(service); System.out.println("Stored language "+getLanguage()); rootResource.putMethod(session.getURI(path),article); try { load(getArticlePath(service)); } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); }// System.out.println("success "+success);// String webdavServletURL = getWebdavServletURL(iwuc)+"/"+getFolder();// System.out.println("webdavServletURL = "+webdavServletURL);// System.out.println("webdavServerURL = "+service.getWebdavServerURL());// WebdavResource webdavResource = session.getWebdavResource(session.getWebdavServerURL().toString());// WebdavResource webdavResource = session.getWebdavResource("http://localhost:8080/servlet/webdav");// WebdavResource webdavResource = new WebdavResource("http://localhost:8080/servlet/webdav/"); // WebdavFile webdavFile = session.getWebdavFile();// WebdavFile path = new WebdavFile(webdavFile, getFolder());// path.mkdirs();// webdavResource = session.getWebdavResource(getWebdavServletURL(iwuc)+getFolder()+"/"+filename+ARTICLE_SUFFIX);// WebdavResource webdavResource = session.getWebdavResource("http://localhost:8080/servlet/webdav/"+filename+ARTICLE_SUFFIX);// IWSlideService iwss = new IWSlideService();// HttpURL root = new HttpURL("http://localhost:8080/servlet/webdav/files/");// WebdavResource webdavResource = new WebdavResource("http://localhost:8080/servlet/webdav/files/"+filename+ARTICLE_SUFFIX);// WebdavFile webdavFile = session.getWebdavFile();// webdavResource.putMethod(new File(filename+ARTICLE_SUFFIX)); /* HttpURL root = new HttpURL("http://localhost:8080/servlet/webdav/files/"+filename+ARTICLE_SUFFIX); root.setUserinfo("root","root"); WebdavFile webdavFile = new WebdavFile(webdavResource.getHttpURL()); webdavResource.close(); */// HttpURL root = new HttpURL("http://localhost:8080/servlet/webdav/files/"+filename+ARTICLE_SUFFIX, "root", "root");// root.setUserinfo("root","root"); // WebdavFile webdavFile = new WebdavFile("http://localhost:8080/servlet/webdav/files/"+filename+ARTICLE_SUFFIX, "root", "root");// webdavFile.createNewFile();// if(!webdavFile.exists()) {// } // articleDoc.save(new File(getFolder()+"/"+filename+ARTICLE_SUFFIX));// articleDoc.save(webdavFile);// webdavFile.close(); } catch (IOException e1) { storeOk = false; // TODO Auto-generated catch block e1.printStackTrace(); } if (storeOk) { if (getRequestedStatus() != null) { setStatus(getRequestedStatus()); setRequestedStatus(null); } }else { throw new ArticleStoreException(); } }
|
public void store() throws IDOStoreException{ boolean storeOk = true; clearErrorKeys(); if (getHeadline().trim().equals("")) { addErrorKey(KEY_ERROR_HEADLINE_EMPTY); storeOk = false; } if (getBody().trim().equals("")) { addErrorKey(KEY_ERROR_BODY_EMPTY); storeOk = false; } // if (getRequestedStatus() != null && getRequestedStatus().equals(ContentItemCase.STATUS_PUBLISHED)) {// if (getCase().getPublishedFromDate() == null) {// addErrorKey(KEY_ERROR_PUBLISHED_FROM_DATE_EMPTY);// storeOk = false;// }// } //Need to create article.setCategory(getCategory()); // String filename = getHeadline();// if(null==filename || filename.length()==0) {// filename = "empty";// }/* File path = new File(getFolder()); if(!path.exists()) { path.mkdirs(); }*/ try { IWUserContext iwuc = IWContext.getInstance(); IWApplicationContext iwac = iwuc.getApplicationContext(); IWSlideSession session = (IWSlideSession)IBOLookup.getSessionInstance(iwuc,IWSlideSession.class); IWSlideService service = (IWSlideService)IBOLookup.getServiceInstance(iwac,IWSlideService.class); WebdavRootResource rootResource = session.getWebdavRootResource(); String uri = service.getWebdavServerURI(); String folderLoaction = getFolderLocation();// String filePath = service.getWebdavServerURI()+getFolderLocation();// boolean success = rootResource.mkcolMethod(filePath);// createPath(getFolderLocation()); IWSlideService slideService = (IWSlideService)IBOLookup.getServiceInstance(iwac,IWSlideService.class); String path = getArticlePath(service); File file = new File(path); slideService.createAllFoldersInPath(file.getParent()); System.out.println("URI = "+uri); System.out.println("Folder location = "+folderLoaction); String article = getAsXML();// System.out.println("success "+success);// success = // String filename = createFileName(service); System.out.println("Stored language "+getLanguage()); rootResource.putMethod(session.getURI(path),article); try { load(getArticlePath(service)); } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); }// System.out.println("success "+success);// String webdavServletURL = getWebdavServletURL(iwuc)+"/"+getFolder();// System.out.println("webdavServletURL = "+webdavServletURL);// System.out.println("webdavServerURL = "+service.getWebdavServerURL());// WebdavResource webdavResource = session.getWebdavResource(session.getWebdavServerURL().toString());// WebdavResource webdavResource = session.getWebdavResource("http://localhost:8080/servlet/webdav");// WebdavResource webdavResource = new WebdavResource("http://localhost:8080/servlet/webdav/"); // WebdavFile webdavFile = session.getWebdavFile();// WebdavFile path = new WebdavFile(webdavFile, getFolder());// path.mkdirs();// webdavResource = session.getWebdavResource(getWebdavServletURL(iwuc)+getFolder()+"/"+filename+ARTICLE_SUFFIX);// WebdavResource webdavResource = session.getWebdavResource("http://localhost:8080/servlet/webdav/"+filename+ARTICLE_SUFFIX);// IWSlideService iwss = new IWSlideService();// HttpURL root = new HttpURL("http://localhost:8080/servlet/webdav/files/");// WebdavResource webdavResource = new WebdavResource("http://localhost:8080/servlet/webdav/files/"+filename+ARTICLE_SUFFIX);// WebdavFile webdavFile = session.getWebdavFile();// webdavResource.putMethod(new File(filename+ARTICLE_SUFFIX)); /* HttpURL root = new HttpURL("http://localhost:8080/servlet/webdav/files/"+filename+ARTICLE_SUFFIX); root.setUserinfo("root","root"); WebdavFile webdavFile = new WebdavFile(webdavResource.getHttpURL()); webdavResource.close(); */// HttpURL root = new HttpURL("http://localhost:8080/servlet/webdav/files/"+filename+ARTICLE_SUFFIX, "root", "root");// root.setUserinfo("root","root"); // WebdavFile webdavFile = new WebdavFile("http://localhost:8080/servlet/webdav/files/"+filename+ARTICLE_SUFFIX, "root", "root");// webdavFile.createNewFile();// if(!webdavFile.exists()) {// } // articleDoc.save(new File(getFolder()+"/"+filename+ARTICLE_SUFFIX));// articleDoc.save(webdavFile);// webdavFile.close(); } catch (IOException e1) { storeOk = false; // TODO Auto-generated catch block e1.printStackTrace(); } if (storeOk) { if (getRequestedStatus() != null) { setStatus(getRequestedStatus()); setRequestedStatus(null); } }else { throw new ArticleStoreException(); } }
| 3,231,263
|
public void store() throws IDOStoreException{ boolean storeOk = true; clearErrorKeys(); if (getHeadline().trim().equals("")) { addErrorKey(KEY_ERROR_HEADLINE_EMPTY); storeOk = false; } if (getBody().trim().equals("")) { addErrorKey(KEY_ERROR_BODY_EMPTY); storeOk = false; } // if (getRequestedStatus() != null && getRequestedStatus().equals(ContentItemCase.STATUS_PUBLISHED)) {// if (getCase().getPublishedFromDate() == null) {// addErrorKey(KEY_ERROR_PUBLISHED_FROM_DATE_EMPTY);// storeOk = false;// }// } //Need to create article.setCategory(getCategory()); // String filename = getHeadline();// if(null==filename || filename.length()==0) {// filename = "empty";// }/* File path = new File(getFolder()); if(!path.exists()) { path.mkdirs(); }*/ try { IWUserContext iwuc = IWContext.getInstance(); IWApplicationContext iwac = iwuc.getApplicationContext(); IWSlideSession session = (IWSlideSession)IBOLookup.getSessionInstance(iwuc,IWSlideSession.class); IWSlideService service = (IWSlideService)IBOLookup.getServiceInstance(iwac,IWSlideService.class); WebdavRootResource rootResource = session.getWebdavRootResource(); String uri = service.getWebdavServerURI(); String folderLoaction = getFolderLocation();// String filePath = service.getWebdavServerURI()+getFolderLocation();// boolean success = rootResource.mkcolMethod(filePath);// createPath(getFolderLocation()); IWSlideService slideService = (IWSlideService)IBOLookup.getServiceInstance(iwac,IWSlideService.class); String path = getArticlePath(service); File file = new File(path); slideService.createAllFoldersInPath(file.getParent()); System.out.println("URI = "+uri); System.out.println("Folder location = "+folderLoaction); String article = getAsXML();// System.out.println("success "+success);// success = // String filename = createFileName(service); System.out.println("Stored language "+getLanguage()); rootResource.putMethod(session.getURI(path),article); try { load(getArticlePath(service)); } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); }// System.out.println("success "+success);// String webdavServletURL = getWebdavServletURL(iwuc)+"/"+getFolder();// System.out.println("webdavServletURL = "+webdavServletURL);// System.out.println("webdavServerURL = "+service.getWebdavServerURL());// WebdavResource webdavResource = session.getWebdavResource(session.getWebdavServerURL().toString());// WebdavResource webdavResource = session.getWebdavResource("http://localhost:8080/servlet/webdav");// WebdavResource webdavResource = new WebdavResource("http://localhost:8080/servlet/webdav/"); // WebdavFile webdavFile = session.getWebdavFile();// WebdavFile path = new WebdavFile(webdavFile, getFolder());// path.mkdirs();// webdavResource = session.getWebdavResource(getWebdavServletURL(iwuc)+getFolder()+"/"+filename+ARTICLE_SUFFIX);// WebdavResource webdavResource = session.getWebdavResource("http://localhost:8080/servlet/webdav/"+filename+ARTICLE_SUFFIX);// IWSlideService iwss = new IWSlideService();// HttpURL root = new HttpURL("http://localhost:8080/servlet/webdav/files/");// WebdavResource webdavResource = new WebdavResource("http://localhost:8080/servlet/webdav/files/"+filename+ARTICLE_SUFFIX);// WebdavFile webdavFile = session.getWebdavFile();// webdavResource.putMethod(new File(filename+ARTICLE_SUFFIX)); /* HttpURL root = new HttpURL("http://localhost:8080/servlet/webdav/files/"+filename+ARTICLE_SUFFIX); root.setUserinfo("root","root"); WebdavFile webdavFile = new WebdavFile(webdavResource.getHttpURL()); webdavResource.close(); */// HttpURL root = new HttpURL("http://localhost:8080/servlet/webdav/files/"+filename+ARTICLE_SUFFIX, "root", "root");// root.setUserinfo("root","root"); // WebdavFile webdavFile = new WebdavFile("http://localhost:8080/servlet/webdav/files/"+filename+ARTICLE_SUFFIX, "root", "root");// webdavFile.createNewFile();// if(!webdavFile.exists()) {// } // articleDoc.save(new File(getFolder()+"/"+filename+ARTICLE_SUFFIX));// articleDoc.save(webdavFile);// webdavFile.close(); } catch (IOException e1) { storeOk = false; // TODO Auto-generated catch block e1.printStackTrace(); } if (storeOk) { if (getRequestedStatus() != null) { setStatus(getRequestedStatus()); setRequestedStatus(null); } }else { throw new ArticleStoreException(); } }
|
public void store() throws IDOStoreException{ boolean storeOk = true; clearErrorKeys(); if (getHeadline().trim().equals("")) { addErrorKey(KEY_ERROR_HEADLINE_EMPTY); storeOk = false; } if (getBody().trim().equals("")) { addErrorKey(KEY_ERROR_BODY_EMPTY); storeOk = false; } // if (getRequestedStatus() != null && getRequestedStatus().equals(ContentItemCase.STATUS_PUBLISHED)) {// if (getCase().getPublishedFromDate() == null) {// addErrorKey(KEY_ERROR_PUBLISHED_FROM_DATE_EMPTY);// storeOk = false;// }// } //Need to create article.setCategory(getCategory()); // String filename = getHeadline();// if(null==filename || filename.length()==0) {// filename = "empty";// }/* File path = new File(getFolder()); if(!path.exists()) { path.mkdirs(); }*/ try { IWUserContext iwuc = IWContext.getInstance(); IWApplicationContext iwac = iwuc.getApplicationContext(); IWSlideSession session = (IWSlideSession)IBOLookup.getSessionInstance(iwuc,IWSlideSession.class); IWSlideService service = (IWSlideService)IBOLookup.getServiceInstance(iwac,IWSlideService.class); WebdavRootResource rootResource = session.getWebdavRootResource(); String uri = service.getWebdavServerURI(); String folderLoaction = getFolderLocation();// String filePath = service.getWebdavServerURI()+getFolderLocation();// boolean success = rootResource.mkcolMethod(filePath);// createPath(getFolderLocation()); IWSlideService slideService = (IWSlideService)IBOLookup.getServiceInstance(iwac,IWSlideService.class); String path = getArticlePath(service); File file = new File(path); slideService.createAllFoldersInPath(file.getParent()); System.out.println("URI = "+uri); System.out.println("Folder location = "+folderLoaction); String article = getAsXML();// System.out.println("success "+success);// success = // String filename = createFileName(service); System.out.println("Stored language "+getLanguage()); rootResource.putMethod(session.getURI(path),article); try { load(getArticlePath(service)); } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); }// System.out.println("success "+success);// String webdavServletURL = getWebdavServletURL(iwuc)+"/"+getFolder();// System.out.println("webdavServletURL = "+webdavServletURL);// System.out.println("webdavServerURL = "+service.getWebdavServerURL());// WebdavResource webdavResource = session.getWebdavResource(session.getWebdavServerURL().toString());// WebdavResource webdavResource = session.getWebdavResource("http://localhost:8080/servlet/webdav");// WebdavResource webdavResource = new WebdavResource("http://localhost:8080/servlet/webdav/"); // WebdavFile webdavFile = session.getWebdavFile();// WebdavFile path = new WebdavFile(webdavFile, getFolder());// path.mkdirs();// webdavResource = session.getWebdavResource(getWebdavServletURL(iwuc)+getFolder()+"/"+filename+ARTICLE_SUFFIX);// WebdavResource webdavResource = session.getWebdavResource("http://localhost:8080/servlet/webdav/"+filename+ARTICLE_SUFFIX);// IWSlideService iwss = new IWSlideService();// HttpURL root = new HttpURL("http://localhost:8080/servlet/webdav/files/");// WebdavResource webdavResource = new WebdavResource("http://localhost:8080/servlet/webdav/files/"+filename+ARTICLE_SUFFIX);// WebdavFile webdavFile = session.getWebdavFile();// webdavResource.putMethod(new File(filename+ARTICLE_SUFFIX)); /* HttpURL root = new HttpURL("http://localhost:8080/servlet/webdav/files/"+filename+ARTICLE_SUFFIX); root.setUserinfo("root","root"); WebdavFile webdavFile = new WebdavFile(webdavResource.getHttpURL()); webdavResource.close(); */// HttpURL root = new HttpURL("http://localhost:8080/servlet/webdav/files/"+filename+ARTICLE_SUFFIX, "root", "root");// root.setUserinfo("root","root"); // WebdavFile webdavFile = new WebdavFile("http://localhost:8080/servlet/webdav/files/"+filename+ARTICLE_SUFFIX, "root", "root");// webdavFile.createNewFile();// if(!webdavFile.exists()) {// } // articleDoc.save(new File(getFolder()+"/"+filename+ARTICLE_SUFFIX));// articleDoc.save(webdavFile);// webdavFile.close(); } catch (IOException e1) { storeOk = false; // TODO Auto-generated catch block e1.printStackTrace(); } if (storeOk) { if (getRequestedStatus() != null) { setStatus(getRequestedStatus()); setRequestedStatus(null); } }else { throw new ArticleStoreException(); } }
| 3,231,264
|
public void store() throws IDOStoreException{ boolean storeOk = true; clearErrorKeys(); if (getHeadline().trim().equals("")) { addErrorKey(KEY_ERROR_HEADLINE_EMPTY); storeOk = false; } if (getBody().trim().equals("")) { addErrorKey(KEY_ERROR_BODY_EMPTY); storeOk = false; } // if (getRequestedStatus() != null && getRequestedStatus().equals(ContentItemCase.STATUS_PUBLISHED)) {// if (getCase().getPublishedFromDate() == null) {// addErrorKey(KEY_ERROR_PUBLISHED_FROM_DATE_EMPTY);// storeOk = false;// }// } //Need to create article.setCategory(getCategory()); // String filename = getHeadline();// if(null==filename || filename.length()==0) {// filename = "empty";// }/* File path = new File(getFolder()); if(!path.exists()) { path.mkdirs(); }*/ try { IWUserContext iwuc = IWContext.getInstance(); IWApplicationContext iwac = iwuc.getApplicationContext(); IWSlideSession session = (IWSlideSession)IBOLookup.getSessionInstance(iwuc,IWSlideSession.class); IWSlideService service = (IWSlideService)IBOLookup.getServiceInstance(iwac,IWSlideService.class); WebdavRootResource rootResource = session.getWebdavRootResource(); String uri = service.getWebdavServerURI(); String folderLoaction = getFolderLocation();// String filePath = service.getWebdavServerURI()+getFolderLocation();// boolean success = rootResource.mkcolMethod(filePath);// createPath(getFolderLocation()); IWSlideService slideService = (IWSlideService)IBOLookup.getServiceInstance(iwac,IWSlideService.class); String path = getArticlePath(service); File file = new File(path); slideService.createAllFoldersInPath(file.getParent()); System.out.println("URI = "+uri); System.out.println("Folder location = "+folderLoaction); String article = getAsXML();// System.out.println("success "+success);// success = // String filename = createFileName(service); System.out.println("Stored language "+getLanguage()); rootResource.putMethod(session.getURI(path),article); try { load(getArticlePath(service)); } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); }// System.out.println("success "+success);// String webdavServletURL = getWebdavServletURL(iwuc)+"/"+getFolder();// System.out.println("webdavServletURL = "+webdavServletURL);// System.out.println("webdavServerURL = "+service.getWebdavServerURL());// WebdavResource webdavResource = session.getWebdavResource(session.getWebdavServerURL().toString());// WebdavResource webdavResource = session.getWebdavResource("http://localhost:8080/servlet/webdav");// WebdavResource webdavResource = new WebdavResource("http://localhost:8080/servlet/webdav/"); // WebdavFile webdavFile = session.getWebdavFile();// WebdavFile path = new WebdavFile(webdavFile, getFolder());// path.mkdirs();// webdavResource = session.getWebdavResource(getWebdavServletURL(iwuc)+getFolder()+"/"+filename+ARTICLE_SUFFIX);// WebdavResource webdavResource = session.getWebdavResource("http://localhost:8080/servlet/webdav/"+filename+ARTICLE_SUFFIX);// IWSlideService iwss = new IWSlideService();// HttpURL root = new HttpURL("http://localhost:8080/servlet/webdav/files/");// WebdavResource webdavResource = new WebdavResource("http://localhost:8080/servlet/webdav/files/"+filename+ARTICLE_SUFFIX);// WebdavFile webdavFile = session.getWebdavFile();// webdavResource.putMethod(new File(filename+ARTICLE_SUFFIX)); /* HttpURL root = new HttpURL("http://localhost:8080/servlet/webdav/files/"+filename+ARTICLE_SUFFIX); root.setUserinfo("root","root"); WebdavFile webdavFile = new WebdavFile(webdavResource.getHttpURL()); webdavResource.close(); */// HttpURL root = new HttpURL("http://localhost:8080/servlet/webdav/files/"+filename+ARTICLE_SUFFIX, "root", "root");// root.setUserinfo("root","root"); // WebdavFile webdavFile = new WebdavFile("http://localhost:8080/servlet/webdav/files/"+filename+ARTICLE_SUFFIX, "root", "root");// webdavFile.createNewFile();// if(!webdavFile.exists()) {// } // articleDoc.save(new File(getFolder()+"/"+filename+ARTICLE_SUFFIX));// articleDoc.save(webdavFile);// webdavFile.close(); } catch (IOException e1) { storeOk = false; // TODO Auto-generated catch block e1.printStackTrace(); } if (storeOk) { if (getRequestedStatus() != null) { setStatus(getRequestedStatus()); setRequestedStatus(null); } }else { throw new ArticleStoreException(); } }
|
public void store() throws IDOStoreException{ boolean storeOk = true; clearErrorKeys(); if (getHeadline().trim().equals("")) { addErrorKey(KEY_ERROR_HEADLINE_EMPTY); storeOk = false; } if (getBody().trim().equals("")) { addErrorKey(KEY_ERROR_BODY_EMPTY); storeOk = false; } // if (getRequestedStatus() != null && getRequestedStatus().equals(ContentItemCase.STATUS_PUBLISHED)) {// if (getCase().getPublishedFromDate() == null) {// addErrorKey(KEY_ERROR_PUBLISHED_FROM_DATE_EMPTY);// storeOk = false;// }// } //Need to create article.setCategory(getCategory()); // String filename = getHeadline();// if(null==filename || filename.length()==0) {// filename = "empty";// }/* File path = new File(getFolder()); if(!path.exists()) { path.mkdirs(); }*/ try { IWUserContext iwuc = IWContext.getInstance(); IWApplicationContext iwac = iwuc.getApplicationContext(); IWSlideSession session = (IWSlideSession)IBOLookup.getSessionInstance(iwuc,IWSlideSession.class); IWSlideService service = (IWSlideService)IBOLookup.getServiceInstance(iwac,IWSlideService.class); WebdavRootResource rootResource = session.getWebdavRootResource(); String uri = service.getWebdavServerURI(); String folderLoaction = getFolderLocation();// String filePath = service.getWebdavServerURI()+getFolderLocation();// boolean success = rootResource.mkcolMethod(filePath);// createPath(getFolderLocation()); IWSlideService slideService = (IWSlideService)IBOLookup.getServiceInstance(iwac,IWSlideService.class); String path = getArticlePath(service); File file = new File(path); slideService.createAllFoldersInPath(file.getParent()); System.out.println("URI = "+uri); System.out.println("Folder location = "+folderLoaction); String article = getAsXML();// System.out.println("success "+success);// success = // String filename = createFileName(service); System.out.println("Stored language "+getLanguage()); rootResource.putMethod(session.getURI(path),article); try { load(getArticlePath(service)); } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); }// System.out.println("success "+success);// String webdavServletURL = getWebdavServletURL(iwuc)+"/"+getFolder();// System.out.println("webdavServletURL = "+webdavServletURL);// System.out.println("webdavServerURL = "+service.getWebdavServerURL());// WebdavResource webdavResource = session.getWebdavResource(session.getWebdavServerURL().toString());// WebdavResource webdavResource = session.getWebdavResource("http://localhost:8080/servlet/webdav");// WebdavResource webdavResource = new WebdavResource("http://localhost:8080/servlet/webdav/"); // WebdavFile webdavFile = session.getWebdavFile();// WebdavFile path = new WebdavFile(webdavFile, getFolder());// path.mkdirs();// webdavResource = session.getWebdavResource(getWebdavServletURL(iwuc)+getFolder()+"/"+filename+ARTICLE_SUFFIX);// WebdavResource webdavResource = session.getWebdavResource("http://localhost:8080/servlet/webdav/"+filename+ARTICLE_SUFFIX);// IWSlideService iwss = new IWSlideService();// HttpURL root = new HttpURL("http://localhost:8080/servlet/webdav/files/");// WebdavResource webdavResource = new WebdavResource("http://localhost:8080/servlet/webdav/files/"+filename+ARTICLE_SUFFIX);// WebdavFile webdavFile = session.getWebdavFile();// webdavResource.putMethod(new File(filename+ARTICLE_SUFFIX)); /* HttpURL root = new HttpURL("http://localhost:8080/servlet/webdav/files/"+filename+ARTICLE_SUFFIX); root.setUserinfo("root","root"); WebdavFile webdavFile = new WebdavFile(webdavResource.getHttpURL()); webdavResource.close(); */// HttpURL root = new HttpURL("http://localhost:8080/servlet/webdav/files/"+filename+ARTICLE_SUFFIX, "root", "root");// root.setUserinfo("root","root"); // WebdavFile webdavFile = new WebdavFile("http://localhost:8080/servlet/webdav/files/"+filename+ARTICLE_SUFFIX, "root", "root");// webdavFile.createNewFile();// if(!webdavFile.exists()) {// } // articleDoc.save(new File(getFolder()+"/"+filename+ARTICLE_SUFFIX));// articleDoc.save(webdavFile);// webdavFile.close(); } catch (IOException e1) { storeOk = false; // TODO Auto-generated catch block e1.printStackTrace(); } if (storeOk) { if (getRequestedStatus() != null) { setStatus(getRequestedStatus()); setRequestedStatus(null); } }else { throw new ArticleStoreException(); } }
| 3,231,265
|
public void store() throws IDOStoreException{ boolean storeOk = true; clearErrorKeys(); if (getHeadline().trim().equals("")) { addErrorKey(KEY_ERROR_HEADLINE_EMPTY); storeOk = false; } if (getBody().trim().equals("")) { addErrorKey(KEY_ERROR_BODY_EMPTY); storeOk = false; } // if (getRequestedStatus() != null && getRequestedStatus().equals(ContentItemCase.STATUS_PUBLISHED)) {// if (getCase().getPublishedFromDate() == null) {// addErrorKey(KEY_ERROR_PUBLISHED_FROM_DATE_EMPTY);// storeOk = false;// }// } //Need to create article.setCategory(getCategory()); // String filename = getHeadline();// if(null==filename || filename.length()==0) {// filename = "empty";// }/* File path = new File(getFolder()); if(!path.exists()) { path.mkdirs(); }*/ try { IWUserContext iwuc = IWContext.getInstance(); IWApplicationContext iwac = iwuc.getApplicationContext(); IWSlideSession session = (IWSlideSession)IBOLookup.getSessionInstance(iwuc,IWSlideSession.class); IWSlideService service = (IWSlideService)IBOLookup.getServiceInstance(iwac,IWSlideService.class); WebdavRootResource rootResource = session.getWebdavRootResource(); String uri = service.getWebdavServerURI(); String folderLoaction = getFolderLocation();// String filePath = service.getWebdavServerURI()+getFolderLocation();// boolean success = rootResource.mkcolMethod(filePath);// createPath(getFolderLocation()); IWSlideService slideService = (IWSlideService)IBOLookup.getServiceInstance(iwac,IWSlideService.class); String path = getArticlePath(service); File file = new File(path); slideService.createAllFoldersInPath(file.getParent()); System.out.println("URI = "+uri); System.out.println("Folder location = "+folderLoaction); String article = getAsXML();// System.out.println("success "+success);// success = // String filename = createFileName(service); System.out.println("Stored language "+getLanguage()); rootResource.putMethod(session.getURI(path),article); try { load(getArticlePath(service)); } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); }// System.out.println("success "+success);// String webdavServletURL = getWebdavServletURL(iwuc)+"/"+getFolder();// System.out.println("webdavServletURL = "+webdavServletURL);// System.out.println("webdavServerURL = "+service.getWebdavServerURL());// WebdavResource webdavResource = session.getWebdavResource(session.getWebdavServerURL().toString());// WebdavResource webdavResource = session.getWebdavResource("http://localhost:8080/servlet/webdav");// WebdavResource webdavResource = new WebdavResource("http://localhost:8080/servlet/webdav/"); // WebdavFile webdavFile = session.getWebdavFile();// WebdavFile path = new WebdavFile(webdavFile, getFolder());// path.mkdirs();// webdavResource = session.getWebdavResource(getWebdavServletURL(iwuc)+getFolder()+"/"+filename+ARTICLE_SUFFIX);// WebdavResource webdavResource = session.getWebdavResource("http://localhost:8080/servlet/webdav/"+filename+ARTICLE_SUFFIX);// IWSlideService iwss = new IWSlideService();// HttpURL root = new HttpURL("http://localhost:8080/servlet/webdav/files/");// WebdavResource webdavResource = new WebdavResource("http://localhost:8080/servlet/webdav/files/"+filename+ARTICLE_SUFFIX);// WebdavFile webdavFile = session.getWebdavFile();// webdavResource.putMethod(new File(filename+ARTICLE_SUFFIX)); /* HttpURL root = new HttpURL("http://localhost:8080/servlet/webdav/files/"+filename+ARTICLE_SUFFIX); root.setUserinfo("root","root"); WebdavFile webdavFile = new WebdavFile(webdavResource.getHttpURL()); webdavResource.close(); */// HttpURL root = new HttpURL("http://localhost:8080/servlet/webdav/files/"+filename+ARTICLE_SUFFIX, "root", "root");// root.setUserinfo("root","root"); // WebdavFile webdavFile = new WebdavFile("http://localhost:8080/servlet/webdav/files/"+filename+ARTICLE_SUFFIX, "root", "root");// webdavFile.createNewFile();// if(!webdavFile.exists()) {// } // articleDoc.save(new File(getFolder()+"/"+filename+ARTICLE_SUFFIX));// articleDoc.save(webdavFile);// webdavFile.close(); } catch (IOException e1) { storeOk = false; // TODO Auto-generated catch block e1.printStackTrace(); } if (storeOk) { if (getRequestedStatus() != null) { setStatus(getRequestedStatus()); setRequestedStatus(null); } }else { throw new ArticleStoreException(); } }
|
public void store() throws IDOStoreException{ boolean storeOk = true; clearErrorKeys(); if (getHeadline().trim().equals("")) { addErrorKey(KEY_ERROR_HEADLINE_EMPTY); storeOk = false; } if (getBody().trim().equals("")) { addErrorKey(KEY_ERROR_BODY_EMPTY); storeOk = false; } // if (getRequestedStatus() != null && getRequestedStatus().equals(ContentItemCase.STATUS_PUBLISHED)) {// if (getCase().getPublishedFromDate() == null) {// addErrorKey(KEY_ERROR_PUBLISHED_FROM_DATE_EMPTY);// storeOk = false;// }// } //Need to create article.setCategory(getCategory()); // String filename = getHeadline();// if(null==filename || filename.length()==0) {// filename = "empty";// }/* File path = new File(getFolder()); if(!path.exists()) { path.mkdirs(); }*/ try { IWUserContext iwuc = IWContext.getInstance(); IWApplicationContext iwac = iwuc.getApplicationContext(); IWSlideSession session = (IWSlideSession)IBOLookup.getSessionInstance(iwuc,IWSlideSession.class); IWSlideService service = (IWSlideService)IBOLookup.getServiceInstance(iwac,IWSlideService.class); WebdavRootResource rootResource = session.getWebdavRootResource(); String uri = service.getWebdavServerURI(); String folderLoaction = getFolderLocation();// String filePath = service.getWebdavServerURI()+getFolderLocation();// boolean success = rootResource.mkcolMethod(filePath);// createPath(getFolderLocation()); IWSlideService slideService = (IWSlideService)IBOLookup.getServiceInstance(iwac,IWSlideService.class); String path = getArticlePath(service); File file = new File(path); slideService.createAllFoldersInPath(file.getParent()); System.out.println("URI = "+uri); System.out.println("Folder location = "+folderLoaction); String article = getAsXML();// System.out.println("success "+success);// success = // String filename = createFileName(service); System.out.println("Stored language "+getLanguage()); rootResource.putMethod(session.getURI(path),article); try { load(getArticlePath(service)); } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); }// System.out.println("success "+success);// String webdavServletURL = getWebdavServletURL(iwuc)+"/"+getFolder();// System.out.println("webdavServletURL = "+webdavServletURL);// System.out.println("webdavServerURL = "+service.getWebdavServerURL());// WebdavResource webdavResource = session.getWebdavResource(session.getWebdavServerURL().toString());// WebdavResource webdavResource = session.getWebdavResource("http://localhost:8080/servlet/webdav");// WebdavResource webdavResource = new WebdavResource("http://localhost:8080/servlet/webdav/"); // WebdavFile webdavFile = session.getWebdavFile();// WebdavFile path = new WebdavFile(webdavFile, getFolder());// path.mkdirs();// webdavResource = session.getWebdavResource(getWebdavServletURL(iwuc)+getFolder()+"/"+filename+ARTICLE_SUFFIX);// WebdavResource webdavResource = session.getWebdavResource("http://localhost:8080/servlet/webdav/"+filename+ARTICLE_SUFFIX);// IWSlideService iwss = new IWSlideService();// HttpURL root = new HttpURL("http://localhost:8080/servlet/webdav/files/");// WebdavResource webdavResource = new WebdavResource("http://localhost:8080/servlet/webdav/files/"+filename+ARTICLE_SUFFIX);// WebdavFile webdavFile = session.getWebdavFile();// webdavResource.putMethod(new File(filename+ARTICLE_SUFFIX)); /* HttpURL root = new HttpURL("http://localhost:8080/servlet/webdav/files/"+filename+ARTICLE_SUFFIX); root.setUserinfo("root","root"); WebdavFile webdavFile = new WebdavFile(webdavResource.getHttpURL()); webdavResource.close(); */// HttpURL root = new HttpURL("http://localhost:8080/servlet/webdav/files/"+filename+ARTICLE_SUFFIX, "root", "root");// root.setUserinfo("root","root"); // WebdavFile webdavFile = new WebdavFile("http://localhost:8080/servlet/webdav/files/"+filename+ARTICLE_SUFFIX, "root", "root");// webdavFile.createNewFile();// if(!webdavFile.exists()) {// } // articleDoc.save(new File(getFolder()+"/"+filename+ARTICLE_SUFFIX));// articleDoc.save(webdavFile);// webdavFile.close(); } catch (IOException e1) { storeOk = false; // TODO Auto-generated catch block e1.printStackTrace(); } if (storeOk) { if (getRequestedStatus() != null) { setStatus(getRequestedStatus()); setRequestedStatus(null); } }else { throw new ArticleStoreException(); } }
| 3,231,266
|
public void onEndPlane(int z, int w, int t, int pointsCount) { Integer index = linearize(z, w, t); ROIPlaneStats ps = (ROIPlaneStats) arrayMap.get(index); //planeStats can't be null, see onStartPlane(). if (0 < pointsCount) { ps.mean = ps.sum/pointsCount; if (0 < pointsCount-1) ps.standardDeviation = Math.sqrt( (ps.sumOfSquares - ps.sum*ps.sum/pointsCount) /(pointsCount-1)); } }
|
public void onEndPlane(int z, int w, int t, int pointsCount) { Integer index = linearize(z, w, t); ROIPlaneStats ps = (ROIPlaneStats) arrayMap.get(index); //planeStats can't be null, see onStartPlane(). if (0 < pointsCount) { ps.mean = ps.sum/pointsCount; if (0 < pointsCount-1) ps.standardDeviation = Math.sqrt( (ps.sumOfSquares - ps.sum*ps.sum/pointsCount) /(pointsCount-1)); } }
| 3,231,267
|
public void update(double pixelValue, int z, int w, int t) { Integer index = linearize(z, w, t); ROIPlaneStats planeStats = (ROIPlaneStats) arrayMap.get(index); //planeStats can't be null, see onStartPlane(). if (pixelValue < planeStats.min) planeStats.min = pixelValue; if (planeStats.max < pixelValue) planeStats.max = pixelValue; planeStats.sum += pixelValue; planeStats.sumOfSquares = pixelValue*pixelValue; }
|
public void update(double pixelValue, int z, int w, int t) { Integer index = linearize(z, w, t); ROIPlaneStats planeStats = (ROIPlaneStats) arrayMap.get(index); //planeStats can't be null, see onStartPlane(). if (pixelValue < planeStats.min) planeStats.min = pixelValue; if (planeStats.max < pixelValue) planeStats.max = pixelValue; planeStats.sum += pixelValue; planeStats.sumOfSquares += pixelValue*pixelValue; }
| 3,231,268
|
private String processLine(final String line) { if (line == null) throw new IllegalArgumentException("\"line\" can not be null."); if ((line.indexOf('\n') != -1) || (line.indexOf('\r') != -1)) throw new IllegalArgumentException( "\"line\" can not contain newline or carriage return characters."); StringBuffer ret = new StringBuffer(); int currentIndex = 0; while (currentIndex != line.length()) { if (state == State.DEFAULT) { if ((currentIndex + 2 < line.length()) && line.substring(currentIndex, currentIndex + 3) .equals("/**")) { state = State.COMMENT_JAVADOC; } else if ((currentIndex + 1 < line.length()) && line.substring(currentIndex, currentIndex + 2) .equals("/*")) { state = State.COMMENT_MULTI; } else if ((currentIndex + 1 < line.length()) && (line.substring(currentIndex, currentIndex + 2) .equals("//"))) { state = State.COMMENT_SINGLE; } else if (Character.isJavaIdentifierStart(line .charAt(currentIndex))) { state = State.KEYWORD; } else if (line.charAt(currentIndex) == '\'') { state = State.QUOTE_SINGLE; } else if (line.charAt(currentIndex) == '"') { state = State.QUOTE_DOUBLE; } else { // Default: No highlighting. ret.append(escapeEntity(line.charAt(currentIndex++))); } } // End of State.DEFAULT else if ((state == State.COMMENT_MULTI) || (state == State.COMMENT_JAVADOC)) { // Print everything from the current character until the // closing */ No exceptions. ret.append("<span class=\"comment\">"); while ((currentIndex != line.length()) && !((currentIndex + 1 < line.length()) && (line .substring(currentIndex, currentIndex + 2) .equals("*/")))) { ret.append(escapeEntity(line.charAt(currentIndex++))); } if (currentIndex == line.length()) { ret.append("</span>"); } else { ret.append("*/</span>"); state = State.DEFAULT; currentIndex += 2; } } // End of State.COMMENT_MULTI else if (state == State.COMMENT_SINGLE) { // Print everything from the current character until the // end of the line ret.append("<span class=\"comment\">"); while (currentIndex != line.length()) { ret.append(escapeEntity(line.charAt(currentIndex++))); } ret.append("</span>"); state = State.DEFAULT; } // End of State.COMMENT_SINGLE else if (state == State.KEYWORD) { StringBuffer tmp = new StringBuffer(); do { tmp.append(line.charAt(currentIndex++)); } while ((currentIndex != line.length()) && (Character.isJavaIdentifierPart(line .charAt(currentIndex)))); if (javaKeywords.contains(tmp.toString())) ret.append("<span class=\"keyword\">" + tmp + "</span>"); else if (javaPrimitiveLiterals.contains(tmp.toString())) ret.append("<span class=\"keyword\">" + tmp + "</span>"); else if (javaPrimitiveTypes.contains(tmp.toString())) ret.append("<span class=\"keyword\">" + tmp + "</span>"); else ret.append(tmp); if (tmp.toString().equals("import")) state = State.IMPORT_NAME; else if (tmp.toString().equals("package")) state = State.PACKAGE_NAME; else state = State.DEFAULT; } // End of State.KEYWORD else if (state == State.IMPORT_NAME) { ret.append(escapeEntity(line.charAt(currentIndex++))); state = State.DEFAULT; } // End of State.IMPORT_NAME else if (state == State.PACKAGE_NAME) { ret.append(escapeEntity(line.charAt(currentIndex++))); state = State.DEFAULT; } // End of State.PACKAGE_NAME else if (state == State.QUOTE_DOUBLE) { // Print everything from the current character until the // closing ", checking for \" ret.append("<span class=\"string\">"); do { ret.append(escapeEntity(line.charAt(currentIndex++))); } while ((currentIndex != line.length()) && (!(line.charAt(currentIndex) == '"') || (line .charAt(currentIndex - 1) == '\\'))); if (currentIndex == line.length()) { ret.append("</span>"); } else { ret.append("\"</span>"); state = State.DEFAULT; currentIndex++; } } // End of State.QUOTE_DOUBLE else if (state == State.QUOTE_SINGLE) { // Print everything from the current character until the // closing ', checking for \' ret.append("<span class=\"string\">"); do { ret.append(escapeEntity(line.charAt(currentIndex++))); } while ((currentIndex != line.length()) && (!(line.charAt(currentIndex) == '\'') || (line .charAt(currentIndex - 1) == '\\'))); if (currentIndex == line.length()) { ret.append("</span>"); } else { ret.append("\"</span>"); state = State.DEFAULT; currentIndex++; } } // End of State.QUOTE_SINGLE else { // Default: No highlighting. ret.append(escapeEntity(line.charAt(currentIndex++))); } // End of unknown state } return ret.toString(); }
|
private String processLine(final String line) { if (line == null) throw new IllegalArgumentException("\"line\" can not be null."); if ((line.indexOf('\n') != -1) || (line.indexOf('\r') != -1)) throw new IllegalArgumentException( "\"line\" can not contain newline or carriage return characters."); StringBuffer ret = new StringBuffer(); int currentIndex = 0; while (currentIndex != line.length()) { if (state == State.DEFAULT) { if ((currentIndex + 2 < line.length()) && line.substring(currentIndex, currentIndex + 3) .equals("/**")) { state = State.COMMENT_JAVADOC; } else if ((currentIndex + 1 < line.length()) && line.substring(currentIndex, currentIndex + 2) .equals("/*")) { state = State.COMMENT_MULTI; } else if ((currentIndex + 1 < line.length()) && (line.substring(currentIndex, currentIndex + 2) .equals("//"))) { state = State.COMMENT_SINGLE; } else if (Character.isJavaIdentifierStart(line .charAt(currentIndex))) { state = State.KEYWORD; } else if (line.charAt(currentIndex) == '\'') { state = State.QUOTE_SINGLE; } else if (line.charAt(currentIndex) == '"') { state = State.QUOTE_DOUBLE; } else { // Default: No highlighting. ret.append(escapeEntity(line.charAt(currentIndex++))); } } // End of State.DEFAULT else if ((state == State.COMMENT_MULTI) || (state == State.COMMENT_JAVADOC)) { // Print everything from the current character until the // closing */ No exceptions. ret.append("<span class=\"comment\">"); while ((currentIndex != line.length()) && !((currentIndex + 1 < line.length()) && (line .substring(currentIndex, currentIndex + 2) .equals("*/")))) { ret.append(escapeEntity(line.charAt(currentIndex++))); } if (currentIndex == line.length()) { ret.append("</span>"); } else { ret.append("*/</span>"); state = State.DEFAULT; currentIndex += 2; } } // End of State.COMMENT_MULTI else if (state == State.COMMENT_SINGLE) { // Print everything from the current character until the // end of the line ret.append("<span class=\"comment\">"); while (currentIndex != line.length()) { ret.append(escapeEntity(line.charAt(currentIndex++))); } ret.append("</span>"); state = State.DEFAULT; } // End of State.COMMENT_SINGLE else if (state == State.KEYWORD) { StringBuffer tmp = new StringBuffer(); do { tmp.append(line.charAt(currentIndex++)); } while ((currentIndex != line.length()) && (Character.isJavaIdentifierPart(line .charAt(currentIndex)))); if (javaKeywords.contains(tmp.toString())) ret.append("<span class=\"keyword\">" + tmp + "</span>"); else if (javaPrimitiveLiterals.contains(tmp.toString())) ret.append("<span class=\"keyword\">" + tmp + "</span>"); else if (javaPrimitiveTypes.contains(tmp.toString())) ret.append("<span class=\"keyword\">" + tmp + "</span>"); else ret.append(tmp); if (tmp.toString().equals("import")) state = State.IMPORT_NAME; else if (tmp.toString().equals("package")) state = State.PACKAGE_NAME; else state = State.DEFAULT; } // End of State.KEYWORD else if (state == State.IMPORT_NAME) { ret.append(escapeEntity(line.charAt(currentIndex++))); state = State.DEFAULT; } // End of State.IMPORT_NAME else if (state == State.PACKAGE_NAME) { ret.append(escapeEntity(line.charAt(currentIndex++))); state = State.DEFAULT; } // End of State.PACKAGE_NAME else if (state == State.QUOTE_DOUBLE) { // Print everything from the current character until the // closing ", checking for \" ret.append("<span class=\"string\">"); do { ret.append(escapeEntity(line.charAt(currentIndex++))); } while ((currentIndex != line.length()) && (!(line.charAt(currentIndex) == '"') || (line .charAt(currentIndex - 1) == '\\'))); if (currentIndex == line.length()) { ret.append("</span>"); } else { ret.append("\"</span>"); state = State.DEFAULT; currentIndex++; } } // End of State.QUOTE_DOUBLE else if (state == State.QUOTE_SINGLE) { // Print everything from the current character until the // closing ', checking for \' ret.append("<span class=\"string\">"); do { ret.append(escapeEntity(line.charAt(currentIndex++))); } while ((currentIndex != line.length()) && (!(line.charAt(currentIndex) == '\'') || (line .charAt(currentIndex - 1) == '\\'))); if (currentIndex == line.length()) { ret.append("</span>"); } else { ret.append("\"</span>"); state = State.DEFAULT; currentIndex++; } } // End of State.QUOTE_SINGLE else { // Default: No highlighting. ret.append(escapeEntity(line.charAt(currentIndex++))); } // End of unknown state } return ret.toString(); }
| 3,231,269
|
private String processLine(final String line) { if (line == null) throw new IllegalArgumentException("\"line\" can not be null."); if ((line.indexOf('\n') != -1) || (line.indexOf('\r') != -1)) throw new IllegalArgumentException( "\"line\" can not contain newline or carriage return characters."); StringBuffer ret = new StringBuffer(); int currentIndex = 0; while (currentIndex != line.length()) { if (state == State.DEFAULT) { if ((currentIndex + 2 < line.length()) && line.substring(currentIndex, currentIndex + 3) .equals("/**")) { state = State.COMMENT_JAVADOC; } else if ((currentIndex + 1 < line.length()) && line.substring(currentIndex, currentIndex + 2) .equals("/*")) { state = State.COMMENT_MULTI; } else if ((currentIndex + 1 < line.length()) && (line.substring(currentIndex, currentIndex + 2) .equals("//"))) { state = State.COMMENT_SINGLE; } else if (Character.isJavaIdentifierStart(line .charAt(currentIndex))) { state = State.KEYWORD; } else if (line.charAt(currentIndex) == '\'') { state = State.QUOTE_SINGLE; } else if (line.charAt(currentIndex) == '"') { state = State.QUOTE_DOUBLE; } else { // Default: No highlighting. ret.append(escapeEntity(line.charAt(currentIndex++))); } } // End of State.DEFAULT else if ((state == State.COMMENT_MULTI) || (state == State.COMMENT_JAVADOC)) { // Print everything from the current character until the // closing */ No exceptions. ret.append("<span class=\"comment\">"); while ((currentIndex != line.length()) && !((currentIndex + 1 < line.length()) && (line .substring(currentIndex, currentIndex + 2) .equals("*/")))) { ret.append(escapeEntity(line.charAt(currentIndex++))); } if (currentIndex == line.length()) { ret.append("</span>"); } else { ret.append("*/</span>"); state = State.DEFAULT; currentIndex += 2; } } // End of State.COMMENT_MULTI else if (state == State.COMMENT_SINGLE) { // Print everything from the current character until the // end of the line ret.append("<span class=\"comment\">"); while (currentIndex != line.length()) { ret.append(escapeEntity(line.charAt(currentIndex++))); } ret.append("</span>"); state = State.DEFAULT; } // End of State.COMMENT_SINGLE else if (state == State.KEYWORD) { StringBuffer tmp = new StringBuffer(); do { tmp.append(line.charAt(currentIndex++)); } while ((currentIndex != line.length()) && (Character.isJavaIdentifierPart(line .charAt(currentIndex)))); if (javaKeywords.contains(tmp.toString())) ret.append("<span class=\"keyword\">" + tmp + "</span>"); else if (javaPrimitiveLiterals.contains(tmp.toString())) ret.append("<span class=\"keyword\">" + tmp + "</span>"); else if (javaPrimitiveTypes.contains(tmp.toString())) ret.append("<span class=\"keyword\">" + tmp + "</span>"); else ret.append(tmp); if (tmp.toString().equals("import")) state = State.IMPORT_NAME; else if (tmp.toString().equals("package")) state = State.PACKAGE_NAME; else state = State.DEFAULT; } // End of State.KEYWORD else if (state == State.IMPORT_NAME) { ret.append(escapeEntity(line.charAt(currentIndex++))); state = State.DEFAULT; } // End of State.IMPORT_NAME else if (state == State.PACKAGE_NAME) { ret.append(escapeEntity(line.charAt(currentIndex++))); state = State.DEFAULT; } // End of State.PACKAGE_NAME else if (state == State.QUOTE_DOUBLE) { // Print everything from the current character until the // closing ", checking for \" ret.append("<span class=\"string\">"); do { ret.append(escapeEntity(line.charAt(currentIndex++))); } while ((currentIndex != line.length()) && (!(line.charAt(currentIndex) == '"') || (line .charAt(currentIndex - 1) == '\\'))); if (currentIndex == line.length()) { ret.append("</span>"); } else { ret.append("\"</span>"); state = State.DEFAULT; currentIndex++; } } // End of State.QUOTE_DOUBLE else if (state == State.QUOTE_SINGLE) { // Print everything from the current character until the // closing ', checking for \' ret.append("<span class=\"string\">"); do { ret.append(escapeEntity(line.charAt(currentIndex++))); } while ((currentIndex != line.length()) && (!(line.charAt(currentIndex) == '\'') || (line .charAt(currentIndex - 1) == '\\'))); if (currentIndex == line.length()) { ret.append("</span>"); } else { ret.append("\"</span>"); state = State.DEFAULT; currentIndex++; } } // End of State.QUOTE_SINGLE else { // Default: No highlighting. ret.append(escapeEntity(line.charAt(currentIndex++))); } // End of unknown state } return ret.toString(); }
|
private String processLine(final String line) { if (line == null) throw new IllegalArgumentException("\"line\" can not be null."); if ((line.indexOf('\n') != -1) || (line.indexOf('\r') != -1)) throw new IllegalArgumentException( "\"line\" can not contain newline or carriage return characters."); StringBuffer ret = new StringBuffer(); int currentIndex = 0; while (currentIndex != line.length()) { if (state == State.DEFAULT) { if ((currentIndex + 2 < line.length()) && line.substring(currentIndex, currentIndex + 3) .equals("/**")) { state = State.COMMENT_JAVADOC; } else if ((currentIndex + 1 < line.length()) && line.substring(currentIndex, currentIndex + 2) .equals("/*")) { state = State.COMMENT_MULTI; } else if ((currentIndex + 1 < line.length()) && (line.substring(currentIndex, currentIndex + 2) .equals("//"))) { state = State.COMMENT_SINGLE; } else if (Character.isJavaIdentifierStart(line .charAt(currentIndex))) { state = State.KEYWORD; } else if (line.charAt(currentIndex) == '\'') { state = State.QUOTE_SINGLE; } else if (line.charAt(currentIndex) == '"') { state = State.QUOTE_DOUBLE; } else { // Default: No highlighting. ret.append(escapeEntity(line.charAt(currentIndex++))); } } // End of State.DEFAULT else if ((state == State.COMMENT_MULTI) || (state == State.COMMENT_JAVADOC)) { // Print everything from the current character until the // closing */ No exceptions. ret.append("<span class=\"comment\">"); while ((currentIndex != line.length()) && !((currentIndex + 1 < line.length()) && (line .substring(currentIndex, currentIndex + 2) .equals("*/")))) { ret.append(escapeEntity(line.charAt(currentIndex++))); } if (currentIndex == line.length()) { ret.append("</span>"); } else { ret.append("*/</span>"); state = State.DEFAULT; currentIndex += 2; } } // End of State.COMMENT_MULTI else if (state == State.COMMENT_SINGLE) { // Print everything from the current character until the // end of the line ret.append("<span class=\"comment\">"); while (currentIndex != line.length()) { ret.append(escapeEntity(line.charAt(currentIndex++))); } ret.append("</span>"); state = State.DEFAULT; } // End of State.COMMENT_SINGLE else if (state == State.KEYWORD) { StringBuffer tmp = new StringBuffer(); do { tmp.append(line.charAt(currentIndex++)); } while ((currentIndex != line.length()) && (Character.isJavaIdentifierPart(line .charAt(currentIndex)))); if (javaKeywords.contains(tmp.toString())) ret.append("<span class=\"keyword\">" + tmp + "</span>"); else if (javaPrimitiveLiterals.contains(tmp.toString())) ret.append("<span class=\"keyword\">" + tmp + "</span>"); else if (javaPrimitiveTypes.contains(tmp.toString())) ret.append("<span class=\"keyword\">" + tmp + "</span>"); else ret.append(tmp); if (tmp.toString().equals("import")) state = State.IMPORT_NAME; else if (tmp.toString().equals("package")) state = State.PACKAGE_NAME; else state = State.DEFAULT; } // End of State.KEYWORD else if (state == State.IMPORT_NAME) { ret.append(escapeEntity(line.charAt(currentIndex++))); state = State.DEFAULT; } // End of State.IMPORT_NAME else if (state == State.PACKAGE_NAME) { ret.append(escapeEntity(line.charAt(currentIndex++))); state = State.DEFAULT; } // End of State.PACKAGE_NAME else if (state == State.QUOTE_DOUBLE) { // Print everything from the current character until the // closing ", checking for \" ret.append("<span class=\"string\">"); do { ret.append(escapeEntity(line.charAt(currentIndex++))); } while ((currentIndex != line.length()) && (!(line.charAt(currentIndex) == '"') || (line .charAt(currentIndex - 1) == '\\'))); if (currentIndex == line.length()) { ret.append("</span>"); } else { ret.append("\"</span>"); state = State.DEFAULT; currentIndex++; } } // End of State.QUOTE_DOUBLE else if (state == State.QUOTE_SINGLE) { // Print everything from the current character until the // closing ', checking for \' ret.append("<span class=\"string\">"); do { ret.append(escapeEntity(line.charAt(currentIndex++))); } while ((currentIndex != line.length()) && (!(line.charAt(currentIndex) == '\'') || (line .charAt(currentIndex - 1) == '\\'))); if (currentIndex == line.length()) { ret.append("</span>"); } else { ret.append("\"</span>"); state = State.DEFAULT; currentIndex++; } } // End of State.QUOTE_SINGLE else { // Default: No highlighting. ret.append(escapeEntity(line.charAt(currentIndex++))); } // End of unknown state } return ret.toString(); }
| 3,231,270
|
private String processLine(final String line) { if (line == null) throw new IllegalArgumentException("\"line\" can not be null."); if ((line.indexOf('\n') != -1) || (line.indexOf('\r') != -1)) throw new IllegalArgumentException( "\"line\" can not contain newline or carriage return characters."); StringBuffer ret = new StringBuffer(); int currentIndex = 0; while (currentIndex != line.length()) { if (state == State.DEFAULT) { if ((currentIndex + 2 < line.length()) && line.substring(currentIndex, currentIndex + 3) .equals("/**")) { state = State.COMMENT_JAVADOC; } else if ((currentIndex + 1 < line.length()) && line.substring(currentIndex, currentIndex + 2) .equals("/*")) { state = State.COMMENT_MULTI; } else if ((currentIndex + 1 < line.length()) && (line.substring(currentIndex, currentIndex + 2) .equals("//"))) { state = State.COMMENT_SINGLE; } else if (Character.isJavaIdentifierStart(line .charAt(currentIndex))) { state = State.KEYWORD; } else if (line.charAt(currentIndex) == '\'') { state = State.QUOTE_SINGLE; } else if (line.charAt(currentIndex) == '"') { state = State.QUOTE_DOUBLE; } else { // Default: No highlighting. ret.append(escapeEntity(line.charAt(currentIndex++))); } } // End of State.DEFAULT else if ((state == State.COMMENT_MULTI) || (state == State.COMMENT_JAVADOC)) { // Print everything from the current character until the // closing */ No exceptions. ret.append("<span class=\"comment\">"); while ((currentIndex != line.length()) && !((currentIndex + 1 < line.length()) && (line .substring(currentIndex, currentIndex + 2) .equals("*/")))) { ret.append(escapeEntity(line.charAt(currentIndex++))); } if (currentIndex == line.length()) { ret.append("</span>"); } else { ret.append("*/</span>"); state = State.DEFAULT; currentIndex += 2; } } // End of State.COMMENT_MULTI else if (state == State.COMMENT_SINGLE) { // Print everything from the current character until the // end of the line ret.append("<span class=\"comment\">"); while (currentIndex != line.length()) { ret.append(escapeEntity(line.charAt(currentIndex++))); } ret.append("</span>"); state = State.DEFAULT; } // End of State.COMMENT_SINGLE else if (state == State.KEYWORD) { StringBuffer tmp = new StringBuffer(); do { tmp.append(line.charAt(currentIndex++)); } while ((currentIndex != line.length()) && (Character.isJavaIdentifierPart(line .charAt(currentIndex)))); if (javaKeywords.contains(tmp.toString())) ret.append("<span class=\"keyword\">" + tmp + "</span>"); else if (javaPrimitiveLiterals.contains(tmp.toString())) ret.append("<span class=\"keyword\">" + tmp + "</span>"); else if (javaPrimitiveTypes.contains(tmp.toString())) ret.append("<span class=\"keyword\">" + tmp + "</span>"); else ret.append(tmp); if (tmp.toString().equals("import")) state = State.IMPORT_NAME; else if (tmp.toString().equals("package")) state = State.PACKAGE_NAME; else state = State.DEFAULT; } // End of State.KEYWORD else if (state == State.IMPORT_NAME) { ret.append(escapeEntity(line.charAt(currentIndex++))); state = State.DEFAULT; } // End of State.IMPORT_NAME else if (state == State.PACKAGE_NAME) { ret.append(escapeEntity(line.charAt(currentIndex++))); state = State.DEFAULT; } // End of State.PACKAGE_NAME else if (state == State.QUOTE_DOUBLE) { // Print everything from the current character until the // closing ", checking for \" ret.append("<span class=\"string\">"); do { ret.append(escapeEntity(line.charAt(currentIndex++))); } while ((currentIndex != line.length()) && (!(line.charAt(currentIndex) == '"') || (line .charAt(currentIndex - 1) == '\\'))); if (currentIndex == line.length()) { ret.append("</span>"); } else { ret.append("\"</span>"); state = State.DEFAULT; currentIndex++; } } // End of State.QUOTE_DOUBLE else if (state == State.QUOTE_SINGLE) { // Print everything from the current character until the // closing ', checking for \' ret.append("<span class=\"string\">"); do { ret.append(escapeEntity(line.charAt(currentIndex++))); } while ((currentIndex != line.length()) && (!(line.charAt(currentIndex) == '\'') || (line .charAt(currentIndex - 1) == '\\'))); if (currentIndex == line.length()) { ret.append("</span>"); } else { ret.append("\"</span>"); state = State.DEFAULT; currentIndex++; } } // End of State.QUOTE_SINGLE else { // Default: No highlighting. ret.append(escapeEntity(line.charAt(currentIndex++))); } // End of unknown state } return ret.toString(); }
|
private String processLine(final String line) { if (line == null) throw new IllegalArgumentException("\"line\" can not be null."); if ((line.indexOf('\n') != -1) || (line.indexOf('\r') != -1)) throw new IllegalArgumentException( "\"line\" can not contain newline or carriage return characters."); StringBuffer ret = new StringBuffer(); int currentIndex = 0; while (currentIndex != line.length()) { if (state == State.DEFAULT) { if ((currentIndex + 2 < line.length()) && line.substring(currentIndex, currentIndex + 3) .equals("/**")) { state = State.COMMENT_JAVADOC; } else if ((currentIndex + 1 < line.length()) && line.substring(currentIndex, currentIndex + 2) .equals("/*")) { state = State.COMMENT_MULTI; } else if ((currentIndex + 1 < line.length()) && (line.substring(currentIndex, currentIndex + 2) .equals("//"))) { state = State.COMMENT_SINGLE; } else if (Character.isJavaIdentifierStart(line .charAt(currentIndex))) { state = State.KEYWORD; } else if (line.charAt(currentIndex) == '\'') { state = State.QUOTE_SINGLE; } else if (line.charAt(currentIndex) == '"') { state = State.QUOTE_DOUBLE; } else { // Default: No highlighting. ret.append(escapeEntity(line.charAt(currentIndex++))); } } // End of State.DEFAULT else if ((state == State.COMMENT_MULTI) || (state == State.COMMENT_JAVADOC)) { // Print everything from the current character until the // closing */ No exceptions. ret.append("<span class=\"comment\">"); while ((currentIndex != line.length()) && !((currentIndex + 1 < line.length()) && (line .substring(currentIndex, currentIndex + 2) .equals("*/")))) { ret.append(escapeEntity(line.charAt(currentIndex++))); } if (currentIndex == line.length()) { ret.append("</span>"); } else { ret.append("*/</span>"); state = State.DEFAULT; currentIndex += 2; } } // End of State.COMMENT_MULTI else if (state == State.COMMENT_SINGLE) { // Print everything from the current character until the // end of the line ret.append("<span class=\"comment\">"); while (currentIndex != line.length()) { ret.append(escapeEntity(line.charAt(currentIndex++))); } ret.append("</span>"); state = State.DEFAULT; } // End of State.COMMENT_SINGLE else if (state == State.KEYWORD) { StringBuffer tmp = new StringBuffer(); do { tmp.append(line.charAt(currentIndex++)); } while ((currentIndex != line.length()) && (Character.isJavaIdentifierPart(line .charAt(currentIndex)))); if (javaKeywords.contains(tmp.toString())) ret.append("<span class=\"keyword\">" + tmp + "</span>"); else if (javaPrimitiveLiterals.contains(tmp.toString())) ret.append("<span class=\"keyword\">" + tmp + "</span>"); else if (javaPrimitiveTypes.contains(tmp.toString())) ret.append("<span class=\"keyword\">" + tmp + "</span>"); else ret.append(tmp); if (tmp.toString().equals("import")) state = State.IMPORT_NAME; else if (tmp.toString().equals("package")) state = State.PACKAGE_NAME; else state = State.DEFAULT; } // End of State.KEYWORD else if (state == State.IMPORT_NAME) { ret.append(escapeEntity(line.charAt(currentIndex++))); state = State.DEFAULT; } // End of State.IMPORT_NAME else if (state == State.PACKAGE_NAME) { ret.append(escapeEntity(line.charAt(currentIndex++))); state = State.DEFAULT; } // End of State.PACKAGE_NAME else if (state == State.QUOTE_DOUBLE) { // Print everything from the current character until the // closing ", checking for \" ret.append("<span class=\"string\">"); do { ret.append(escapeEntity(line.charAt(currentIndex++))); } while ((currentIndex != line.length()) && (!(line.charAt(currentIndex) == '"') || (line .charAt(currentIndex - 1) == '\\'))); if (currentIndex == line.length()) { ret.append("</span>"); } else { ret.append("\"</span>"); state = State.DEFAULT; currentIndex++; } } // End of State.QUOTE_DOUBLE else if (state == State.QUOTE_SINGLE) { // Print everything from the current character until the // closing ', checking for \' ret.append("<span class=\"string\">"); do { ret.append(escapeEntity(line.charAt(currentIndex++))); } while ((currentIndex != line.length()) && (!(line.charAt(currentIndex) == '\'') || (line .charAt(currentIndex - 1) == '\\'))); if (currentIndex == line.length()) { ret.append("</span>"); } else { ret.append("\"</span>"); state = State.DEFAULT; currentIndex++; } } // End of State.QUOTE_SINGLE else { // Default: No highlighting. ret.append(escapeEntity(line.charAt(currentIndex++))); } // End of unknown state } return ret.toString(); }
| 3,231,271
|
private double computeSizes() { double factor = 0; if (sizeX == -1 && sizeY == -1) { sizeX = THUMB_MAX_WIDTH; sizeY = THUMB_MAX_HEIGHT; double x = sizeX/(double) getMaxX(); double y = sizeY/(double) getMaxY(); if (x > y) factor = x; else factor = y; double ratio = (double) getMaxX()/getMaxY(); if (ratio < 1) sizeX *= ratio; else if (ratio > 1 && ratio != 0) sizeY *= 1/ratio; } return factor; }
|
private void computeSizes() { double factor = 0; if (sizeX == -1 && sizeY == -1) { sizeX = THUMB_MAX_WIDTH; sizeY = THUMB_MAX_HEIGHT; double x = sizeX/(double) getMaxX(); double y = sizeY/(double) getMaxY(); if (x > y) factor = x; else factor = y; double ratio = (double) getMaxX()/getMaxY(); if (ratio < 1) sizeX *= ratio; else if (ratio > 1 && ratio != 0) sizeY *= 1/ratio; } return factor; }
| 3,231,272
|
private double computeSizes() { double factor = 0; if (sizeX == -1 && sizeY == -1) { sizeX = THUMB_MAX_WIDTH; sizeY = THUMB_MAX_HEIGHT; double x = sizeX/(double) getMaxX(); double y = sizeY/(double) getMaxY(); if (x > y) factor = x; else factor = y; double ratio = (double) getMaxX()/getMaxY(); if (ratio < 1) sizeX *= ratio; else if (ratio > 1 && ratio != 0) sizeY *= 1/ratio; } return factor; }
|
private double computeSizes() { if (sizeX == -1 && sizeY == -1) { sizeX = THUMB_MAX_WIDTH; sizeY = THUMB_MAX_HEIGHT; double x = sizeX/(double) getMaxX(); double y = sizeY/(double) getMaxY(); if (x > y) factor = x; else factor = y; double ratio = (double) getMaxX()/getMaxY(); if (ratio < 1) sizeX *= ratio; else if (ratio > 1 && ratio != 0) sizeY *= 1/ratio; } return factor; }
| 3,231,273
|
private double computeSizes() { double factor = 0; if (sizeX == -1 && sizeY == -1) { sizeX = THUMB_MAX_WIDTH; sizeY = THUMB_MAX_HEIGHT; double x = sizeX/(double) getMaxX(); double y = sizeY/(double) getMaxY(); if (x > y) factor = x; else factor = y; double ratio = (double) getMaxX()/getMaxY(); if (ratio < 1) sizeX *= ratio; else if (ratio > 1 && ratio != 0) sizeY *= 1/ratio; } return factor; }
|
private double computeSizes() { double factor = 0; if (sizeX == -1 && sizeY == -1) { sizeX = THUMB_MAX_WIDTH; sizeY = THUMB_MAX_HEIGHT; double x = sizeX/(double) getMaxX(); double y = sizeY/(double) getMaxY(); if (x > y) factor = x; else factor = y; double ratio = (double) getMaxX()/getMaxY(); if (ratio < 1) sizeX *= ratio; else if (ratio > 1 && ratio != 0) sizeY *= 1/ratio; } }
| 3,231,274
|
void fireImageRetrieval() { PlaneDef pDef = new PlaneDef(PlaneDef.XY, getDefaultT()); pDef.setZ(getDefaultZ()); state = ImViewer.LOADING_IMAGE; try { component.setImage(rndControl.render(pDef)); } catch (Exception e) { // TODO: handle exception } //currentLoader = new ImageLoader(component, pixelsID, pDef); //currentLoader.load(); }
|
void fireImageRetrieval() { PlaneDef pDef = new PlaneDef(PlaneDef.XY, getDefaultT()); pDef.setZ(getDefaultZ()); state = ImViewer.LOADING_IMAGE; try { component.setImage(os.renderImage(pixelsID, pDef)); } catch (Exception e) { // TODO: handle exception } //currentLoader = new ImageLoader(component, pixelsID, pDef); //currentLoader.load(); }
| 3,231,275
|
void fireImageRetrieval() { PlaneDef pDef = new PlaneDef(PlaneDef.XY, getDefaultT()); pDef.setZ(getDefaultZ()); state = ImViewer.LOADING_IMAGE; try { component.setImage(rndControl.render(pDef)); } catch (Exception e) { // TODO: handle exception } //currentLoader = new ImageLoader(component, pixelsID, pDef); //currentLoader.load(); }
|
e.printStackTrace(); e.printStackTrace(); e.printStackTrace(); e.printStackTrace(); voide.printStackTrace(); fireImageRetrieval()e.printStackTrace(); e.printStackTrace(); e.printStackTrace(); e.printStackTrace(); {e.printStackTrace(); e.printStackTrace(); e.printStackTrace(); e.printStackTrace(); e.printStackTrace(); e.printStackTrace(); e.printStackTrace(); e.printStackTrace(); PlaneDefe.printStackTrace(); pDefe.printStackTrace(); =e.printStackTrace(); newe.printStackTrace(); PlaneDef(PlaneDef.XY,e.printStackTrace(); getDefaultT());e.printStackTrace(); e.printStackTrace(); e.printStackTrace(); e.printStackTrace(); e.printStackTrace(); e.printStackTrace(); e.printStackTrace(); e.printStackTrace(); pDef.setZ(getDefaultZ());e.printStackTrace(); e.printStackTrace(); e.printStackTrace(); e.printStackTrace(); e.printStackTrace(); e.printStackTrace(); e.printStackTrace(); e.printStackTrace(); statee.printStackTrace(); =e.printStackTrace(); ImViewer.LOADING_IMAGE;e.printStackTrace(); e.printStackTrace(); e.printStackTrace(); e.printStackTrace(); e.printStackTrace(); e.printStackTrace(); e.printStackTrace(); e.printStackTrace(); trye.printStackTrace(); {e.printStackTrace(); e.printStackTrace(); e.printStackTrace(); e.printStackTrace(); e.printStackTrace(); e.printStackTrace(); e.printStackTrace(); e.printStackTrace(); e.printStackTrace(); e.printStackTrace(); e.printStackTrace(); e.printStackTrace(); component.setImage(rndControl.render(pDef));e.printStackTrace(); e.printStackTrace(); e.printStackTrace(); e.printStackTrace(); e.printStackTrace(); e.printStackTrace(); e.printStackTrace(); e.printStackTrace(); }e.printStackTrace(); catche.printStackTrace(); (Exceptione.printStackTrace(); e)e.printStackTrace(); {e.printStackTrace(); e.printStackTrace(); e.printStackTrace(); e.printStackTrace(); e.printStackTrace(); e.printStackTrace(); e.printStackTrace(); e.printStackTrace(); e.printStackTrace(); e.printStackTrace(); e.printStackTrace(); e.printStackTrace(); //e.printStackTrace(); TODO:e.printStackTrace(); handlee.printStackTrace(); exceptione.printStackTrace(); e.printStackTrace(); e.printStackTrace(); e.printStackTrace(); e.printStackTrace(); e.printStackTrace(); e.printStackTrace(); e.printStackTrace(); }e.printStackTrace(); e.printStackTrace(); e.printStackTrace(); e.printStackTrace(); e.printStackTrace(); e.printStackTrace(); e.printStackTrace(); e.printStackTrace(); e.printStackTrace(); e.printStackTrace(); e.printStackTrace(); e.printStackTrace(); e.printStackTrace(); e.printStackTrace(); e.printStackTrace(); e.printStackTrace(); //currentLoadere.printStackTrace(); =e.printStackTrace(); newe.printStackTrace(); ImageLoader(component,e.printStackTrace(); pixelsID,e.printStackTrace(); pDef);e.printStackTrace(); e.printStackTrace(); e.printStackTrace(); e.printStackTrace(); e.printStackTrace(); e.printStackTrace(); e.printStackTrace(); e.printStackTrace(); //currentLoader.load();e.printStackTrace(); e.printStackTrace(); e.printStackTrace(); e.printStackTrace(); e.printStackTrace(); e.printStackTrace(); e.printStackTrace(); e.printStackTrace(); e.printStackTrace(); e.printStackTrace(); e.printStackTrace(); e.printStackTrace(); }
| 3,231,276
|
void setImage(BufferedImage image) { browser.setRenderedImage(image); //update image icon double factor = computeSizes(); imageIcon = magnifyImage(factor, image); state = ImViewer.READY; }
|
void setImage(BufferedImage image) { browser.setRenderedImage(image); //update image icon computeSizes(); imageIcon = magnifyImage(factor, image); state = ImViewer.READY; }
| 3,231,277
|
public MetaClass getSingletonClass() { RubyClass type = getMetaClass(); if (!type.isSingleton()) { type = makeMetaClass(type, getRuntime().getCurrentContext().getRubyClass()); } assert type instanceof MetaClass; if (!isNil()) { type.setTaint(isTaint()); type.setFrozen(isFrozen()); } return (MetaClass)type; }
|
public MetaClass getSingletonClass() { RubyClass type = getMetaClass(); if (!type.isSingleton()) { type = makeMetaClass(type, type.getCRef()); } assert type instanceof MetaClass; if (!isNil()) { type.setTaint(isTaint()); type.setFrozen(isFrozen()); } return (MetaClass)type; }
| 3,231,280
|
public MetaClass makeMetaClass(RubyClass type, RubyModule parentModule) { MetaClass newMetaClass = type.newSingletonClass(parentModule); if (!isNil()) { setMetaClass(newMetaClass); } newMetaClass.attachToObject(this); return newMetaClass; }
|
public MetaClass makeMetaClass(RubyClass type, RubyModule parentModule) { MetaClass newMetaClass = type.newSingletonClass(parentModule); if (!isNil()) { setMetaClass(newMetaClass); } newMetaClass.attachToObject(this); return newMetaClass; }
| 3,231,281
|
public void setHeadline(Object o) { setValue(FIELDNAME_HEADLINE, o.toString()); }
|
public void setHeadline(String s) { setValue(FIELDNAME_HEADLINE, s); }
| 3,231,282
|
private static void linkImageTo(ImageData is, ImageSet parent) { ImageNode node = new ImageNode(is.getName(), is, new ThumbnailProvider(is)); formatToolTipFor(node, getFirstAnnotation(is.getAnnotations())); parent.addChildDisplay(node); }
|
private static void linkImageTo(ImageData is, ImageSet parent) { ImageNode node = new ImageNode(is.getName(), is, new ThumbnailProvider(is)); formatToolTipFor(node, getFirstAnnotation(is.getAnnotations())); parent.addChildDisplay(node); }
| 3,231,283
|
public void actionPerformed(ActionEvent e) { Object src = e.getSource(); if (target != null) { if (src == view.properties) agentCtrl.showProperties(target); else if (src == view.view && target instanceof ImageSummary) agentCtrl.viewImage(((ImageSummary) target)); else if (src == view.browse && target instanceof DatasetSummary) agentCtrl.viewDataset(((DatasetSummary) target)); else if (src == view.annotate && target instanceof DatasetSummary) agentCtrl.annotateDataset(((DatasetSummary) target)); else if (src == view.annotate && target instanceof ImageSummary) agentCtrl.annotateImage(((ImageSummary) target)); else if (src == view.importImg && target instanceof DatasetSummary) agentCtrl.showImagesImporter(((DatasetSummary) target)); else if (src == view.refresh) agentCtrl.refresh(target); } view.setVisible(false); }
|
public void actionPerformed(ActionEvent e) { Object src = e.getSource(); if (target != null) { if (src == view.properties) agentCtrl.showProperties(target); else if (src == view.view && target instanceof ImageSummary) agentCtrl.viewImage(((ImageSummary) target)); else if (src == view.browse && target instanceof DatasetSummary) agentCtrl.viewDataset(((DatasetSummary) target)); else if (src == view.annotate && target instanceof DatasetSummary) agentCtrl.annotateDataset(((DatasetSummary) target)); else if (src == view.annotate && target instanceof ImageSummary) agentCtrl.annotateImage(((ImageSummary) target)); else if (src == view.importImg && target instanceof DatasetSummary) agentCtrl.showImagesImporter(((DatasetSummary) target)); else if (src == view.refresh) agentCtrl.refresh(target); } else if (target == null && src == view.refresh) agentCtrl.refresh(DataManagerCtrl.EXPLORER); view.setVisible(false); }
| 3,231,284
|
public final Object build(BuildContext bc) throws BuildException { Variable var = VariableBuilder.newVariable(_names,bc,_filtered); return var.evaluate(bc); }
|
public final Object build(BuildContext bc) throws BuildException { Variable var = VariableBuilder.newVariable(_names,bc,_filtered); return var.evaluate(bc); }
| 3,231,285
|
private void createUI() { createToolbar(); createActionbar(); createPanels(); JPanel container = new JPanel(); container.setLayout(new BoxLayout(container, BoxLayout.X_AXIS)); container.add(toolbar , BorderLayout.WEST); container.add(Box.createHorizontalBox()); container.add(userActionbar, BorderLayout.EAST); this.setLayout(new GridBagLayout()); GridBagConstraints gbc = new GridBagConstraints(); gbc.gridx = 0; gbc.gridy = 0; gbc.weightx = 40; gbc.weighty = 0; gbc.anchor = GridBagConstraints.NORTH; gbc.fill = GridBagConstraints.HORIZONTAL; gbc.insets = new Insets(0, 5, 0, 5); this.add(container, gbc); gbc.gridx = 0; gbc.gridy = 1; gbc.weightx = 100; gbc.weighty = 190; gbc.anchor = GridBagConstraints.CENTER; gbc.fill = GridBagConstraints.BOTH; gbc.insets = new Insets(5, 5, 0, 5); this.add(paintPotPane, gbc); gbc.gridx = 0; gbc.gridy = 2; gbc.weightx = 100; gbc.weighty = 5; gbc.anchor = GridBagConstraints.CENTER; gbc.fill = GridBagConstraints.BOTH; gbc.insets = new Insets(0, 0, 0, 0); this.add(colourWheelPane, gbc); gbc.gridx = 0; gbc.gridy = 2; gbc.weightx = 100; gbc.weighty = 600; gbc.anchor = GridBagConstraints.CENTER; gbc.fill = GridBagConstraints.BOTH; gbc.insets = new Insets(0, 0, 0, 0); this.add(RGBSliderPane, gbc); gbc.gridx = 0; gbc.gridy = 2; gbc.weightx = 100; gbc.weighty = 2800; gbc.anchor = GridBagConstraints.CENTER; gbc.fill = GridBagConstraints.BOTH; gbc.insets = new Insets(0, 0, 0, 0); this.add(swatchPane, gbc); RGBSliderPane.setVisible(false); swatchPane.setVisible(false); colourWheelButton.setSelected(true); colourWheelPane.setActive(true); this.doLayout(); }
|
private void createUI() { createToolbar(); createActionbar(); createPanels(); JPanel container = new JPanel(); container.setLayout(new BoxLayout(container, BoxLayout.X_AXIS)); container.add(toolbar , BorderLayout.WEST); container.add(Box.createHorizontalBox()); container.add(userActionbar, BorderLayout.EAST); this.setLayout(new GridBagLayout()); GridBagConstraints gbc = new GridBagConstraints(); gbc.gridx = 0; gbc.gridy = 0; gbc.weightx = 40; gbc.weighty = 0; gbc.anchor = GridBagConstraints.NORTH; gbc.fill = GridBagConstraints.HORIZONTAL; gbc.insets = new Insets(0, 5, 0, 5); this.add(container, gbc); gbc.gridx = 0; gbc.gridy = 1; gbc.weightx = 100; gbc.weighty = 190; gbc.anchor = GridBagConstraints.CENTER; gbc.fill = GridBagConstraints.BOTH; gbc.insets = new Insets(5, 5, 0, 5); this.add(paintPotPane, gbc); gbc.gridx = 0; gbc.gridy = 2; gbc.weightx = 100; gbc.weighty = 5; gbc.anchor = GridBagConstraints.CENTER; gbc.fill = GridBagConstraints.BOTH; gbc.insets = new Insets(0, 0, 0, 0); this.add(colourWheelPane, gbc); gbc.gridx = 0; gbc.gridy = 2; gbc.weightx = 100; gbc.weighty = 600; gbc.anchor = GridBagConstraints.CENTER; gbc.fill = GridBagConstraints.BOTH; gbc.insets = new Insets(0, 0, 0, 0); this.add(RGBSliderPane, gbc); gbc.gridx = 0; gbc.gridy = 2; gbc.weightx = 100; gbc.weighty = 2800; gbc.anchor = GridBagConstraints.CENTER; gbc.fill = GridBagConstraints.BOTH; gbc.insets = new Insets(0, 0, 0, 0); this.add(swatchPane, gbc); RGBSliderPane.setVisible(false); swatchPane.setVisible(false); colourWheelButton.setSelected(true); colourWheelPane.setActive(true); this.doLayout(); }
| 3,231,286
|
private void createUI() { createToolbar(); createActionbar(); createPanels(); JPanel container = new JPanel(); container.setLayout(new BoxLayout(container, BoxLayout.X_AXIS)); container.add(toolbar , BorderLayout.WEST); container.add(Box.createHorizontalBox()); container.add(userActionbar, BorderLayout.EAST); this.setLayout(new GridBagLayout()); GridBagConstraints gbc = new GridBagConstraints(); gbc.gridx = 0; gbc.gridy = 0; gbc.weightx = 40; gbc.weighty = 0; gbc.anchor = GridBagConstraints.NORTH; gbc.fill = GridBagConstraints.HORIZONTAL; gbc.insets = new Insets(0, 5, 0, 5); this.add(container, gbc); gbc.gridx = 0; gbc.gridy = 1; gbc.weightx = 100; gbc.weighty = 190; gbc.anchor = GridBagConstraints.CENTER; gbc.fill = GridBagConstraints.BOTH; gbc.insets = new Insets(5, 5, 0, 5); this.add(paintPotPane, gbc); gbc.gridx = 0; gbc.gridy = 2; gbc.weightx = 100; gbc.weighty = 5; gbc.anchor = GridBagConstraints.CENTER; gbc.fill = GridBagConstraints.BOTH; gbc.insets = new Insets(0, 0, 0, 0); this.add(colourWheelPane, gbc); gbc.gridx = 0; gbc.gridy = 2; gbc.weightx = 100; gbc.weighty = 600; gbc.anchor = GridBagConstraints.CENTER; gbc.fill = GridBagConstraints.BOTH; gbc.insets = new Insets(0, 0, 0, 0); this.add(RGBSliderPane, gbc); gbc.gridx = 0; gbc.gridy = 2; gbc.weightx = 100; gbc.weighty = 2800; gbc.anchor = GridBagConstraints.CENTER; gbc.fill = GridBagConstraints.BOTH; gbc.insets = new Insets(0, 0, 0, 0); this.add(swatchPane, gbc); RGBSliderPane.setVisible(false); swatchPane.setVisible(false); colourWheelButton.setSelected(true); colourWheelPane.setActive(true); this.doLayout(); }
|
private void createUI() { createToolbar(); createActionbar(); createPanels(); JPanel container = new JPanel(); container.setLayout(new BoxLayout(container, BoxLayout.X_AXIS)); container.add(toolbar , BorderLayout.WEST); container.add(Box.createHorizontalBox()); container.add(userActionbar, BorderLayout.EAST); this.setLayout(new GridBagLayout()); GridBagConstraints gbc = new GridBagConstraints(); gbc.gridx = 0; gbc.gridy = 0; gbc.weightx = 40; gbc.weighty = 0; gbc.anchor = GridBagConstraints.NORTH; gbc.fill = GridBagConstraints.HORIZONTAL; gbc.insets = new Insets(0, 5, 0, 5); this.add(container, gbc); gbc.gridx = 0; gbc.gridy = 1; gbc.weightx = 100; gbc.weighty = 190; gbc.anchor = GridBagConstraints.CENTER; gbc.fill = GridBagConstraints.BOTH; gbc.insets = new Insets(5, 5, 0, 5); this.add(paintPotPane, gbc); gbc.gridx = 0; gbc.gridy = 2; gbc.weightx = 100; gbc.weighty = 5; gbc.anchor = GridBagConstraints.CENTER; gbc.fill = GridBagConstraints.BOTH; gbc.insets = new Insets(0, 0, 0, 0); this.add(colourWheelPane, gbc); gbc.gridx = 0; gbc.gridy = 2; gbc.weightx = 100; gbc.weighty = 600; gbc.anchor = GridBagConstraints.CENTER; gbc.fill = GridBagConstraints.BOTH; gbc.insets = new Insets(0, 0, 0, 0); this.add(RGBSliderPane, gbc); gbc.gridx = 0; gbc.gridy = 2; gbc.weightx = 100; gbc.weighty = 2800; gbc.anchor = GridBagConstraints.CENTER; gbc.fill = GridBagConstraints.BOTH; gbc.insets = new Insets(0, 0, 0, 0); this.add(swatchPane, gbc); RGBSliderPane.setVisible(false); swatchPane.setVisible(false); colourWheelButton.setSelected(true); colourWheelPane.setActive(true); this.doLayout(); }
| 3,231,287
|
private void createUI() { createToolbar(); createActionbar(); createPanels(); JPanel container = new JPanel(); container.setLayout(new BoxLayout(container, BoxLayout.X_AXIS)); container.add(toolbar , BorderLayout.WEST); container.add(Box.createHorizontalBox()); container.add(userActionbar, BorderLayout.EAST); this.setLayout(new GridBagLayout()); GridBagConstraints gbc = new GridBagConstraints(); gbc.gridx = 0; gbc.gridy = 0; gbc.weightx = 40; gbc.weighty = 0; gbc.anchor = GridBagConstraints.NORTH; gbc.fill = GridBagConstraints.HORIZONTAL; gbc.insets = new Insets(0, 5, 0, 5); this.add(container, gbc); gbc.gridx = 0; gbc.gridy = 1; gbc.weightx = 100; gbc.weighty = 190; gbc.anchor = GridBagConstraints.CENTER; gbc.fill = GridBagConstraints.BOTH; gbc.insets = new Insets(5, 5, 0, 5); this.add(paintPotPane, gbc); gbc.gridx = 0; gbc.gridy = 2; gbc.weightx = 100; gbc.weighty = 5; gbc.anchor = GridBagConstraints.CENTER; gbc.fill = GridBagConstraints.BOTH; gbc.insets = new Insets(0, 0, 0, 0); this.add(colourWheelPane, gbc); gbc.gridx = 0; gbc.gridy = 2; gbc.weightx = 100; gbc.weighty = 600; gbc.anchor = GridBagConstraints.CENTER; gbc.fill = GridBagConstraints.BOTH; gbc.insets = new Insets(0, 0, 0, 0); this.add(RGBSliderPane, gbc); gbc.gridx = 0; gbc.gridy = 2; gbc.weightx = 100; gbc.weighty = 2800; gbc.anchor = GridBagConstraints.CENTER; gbc.fill = GridBagConstraints.BOTH; gbc.insets = new Insets(0, 0, 0, 0); this.add(swatchPane, gbc); RGBSliderPane.setVisible(false); swatchPane.setVisible(false); colourWheelButton.setSelected(true); colourWheelPane.setActive(true); this.doLayout(); }
|
private void createUI() { createToolbar(); createActionbar(); createPanels(); JPanel container = new JPanel(); container.setLayout(new BoxLayout(container, BoxLayout.X_AXIS)); container.add(toolbar , BorderLayout.WEST); container.add(Box.createHorizontalBox()); container.add(userActionbar, BorderLayout.EAST); this.setLayout(new GridBagLayout()); GridBagConstraints gbc = new GridBagConstraints(); gbc.gridx = 0; gbc.gridy = 0; gbc.weightx = 40; gbc.weighty = 0; gbc.anchor = GridBagConstraints.NORTH; gbc.fill = GridBagConstraints.HORIZONTAL; gbc.insets = new Insets(0, 5, 0, 5); this.add(container, gbc); gbc.gridx = 0; gbc.gridy = 1; gbc.weightx = 100; gbc.weighty = 190; gbc.anchor = GridBagConstraints.CENTER; gbc.fill = GridBagConstraints.BOTH; gbc.insets = new Insets(5, 5, 0, 5); this.add(paintPotPane, gbc); gbc.gridx = 0; gbc.gridy = 2; gbc.weightx = 100; gbc.weighty = 5; gbc.anchor = GridBagConstraints.CENTER; gbc.fill = GridBagConstraints.BOTH; gbc.insets = new Insets(0, 0, 0, 0); this.add(colourWheelPane, gbc); gbc.gridx = 0; gbc.gridy = 2; gbc.weightx = 100; gbc.weighty = 600; gbc.anchor = GridBagConstraints.CENTER; gbc.fill = GridBagConstraints.BOTH; gbc.insets = new Insets(0, 0, 0, 0); this.add(RGBSliderPane, gbc); gbc.gridx = 0; gbc.gridy = 2; gbc.weightx = 100; gbc.weighty = 2800; gbc.anchor = GridBagConstraints.CENTER; gbc.fill = GridBagConstraints.BOTH; gbc.insets = new Insets(0, 0, 0, 0); this.add(swatchPane, gbc); RGBSliderPane.setVisible(false); swatchPane.setVisible(false); colourWheelButton.setSelected(true); colourWheelPane.setActive(true); this.doLayout(); }
| 3,231,288
|
private void createUI() { createToolbar(); createActionbar(); createPanels(); JPanel container = new JPanel(); container.setLayout(new BoxLayout(container, BoxLayout.X_AXIS)); container.add(toolbar , BorderLayout.WEST); container.add(Box.createHorizontalBox()); container.add(userActionbar, BorderLayout.EAST); this.setLayout(new GridBagLayout()); GridBagConstraints gbc = new GridBagConstraints(); gbc.gridx = 0; gbc.gridy = 0; gbc.weightx = 40; gbc.weighty = 0; gbc.anchor = GridBagConstraints.NORTH; gbc.fill = GridBagConstraints.HORIZONTAL; gbc.insets = new Insets(0, 5, 0, 5); this.add(container, gbc); gbc.gridx = 0; gbc.gridy = 1; gbc.weightx = 100; gbc.weighty = 190; gbc.anchor = GridBagConstraints.CENTER; gbc.fill = GridBagConstraints.BOTH; gbc.insets = new Insets(5, 5, 0, 5); this.add(paintPotPane, gbc); gbc.gridx = 0; gbc.gridy = 2; gbc.weightx = 100; gbc.weighty = 5; gbc.anchor = GridBagConstraints.CENTER; gbc.fill = GridBagConstraints.BOTH; gbc.insets = new Insets(0, 0, 0, 0); this.add(colourWheelPane, gbc); gbc.gridx = 0; gbc.gridy = 2; gbc.weightx = 100; gbc.weighty = 600; gbc.anchor = GridBagConstraints.CENTER; gbc.fill = GridBagConstraints.BOTH; gbc.insets = new Insets(0, 0, 0, 0); this.add(RGBSliderPane, gbc); gbc.gridx = 0; gbc.gridy = 2; gbc.weightx = 100; gbc.weighty = 2800; gbc.anchor = GridBagConstraints.CENTER; gbc.fill = GridBagConstraints.BOTH; gbc.insets = new Insets(0, 0, 0, 0); this.add(swatchPane, gbc); RGBSliderPane.setVisible(false); swatchPane.setVisible(false); colourWheelButton.setSelected(true); colourWheelPane.setActive(true); this.doLayout(); }
|
private void createUI() { createToolbar(); createActionbar(); createPanels(); JPanel container = new JPanel(); container.setLayout(new BoxLayout(container, BoxLayout.X_AXIS)); container.add(toolbar , BorderLayout.WEST); container.add(Box.createHorizontalBox()); container.add(userActionbar, BorderLayout.EAST); this.setLayout(new GridBagLayout()); GridBagConstraints gbc = new GridBagConstraints(); gbc.gridx = 0; gbc.gridy = 0; gbc.weightx = 40; gbc.weighty = 0; gbc.anchor = GridBagConstraints.NORTH; gbc.fill = GridBagConstraints.HORIZONTAL; gbc.insets = new Insets(0, 5, 0, 5); this.add(container, gbc); gbc.gridx = 0; gbc.gridy = 1; gbc.weightx = 100; gbc.weighty = 190; gbc.anchor = GridBagConstraints.CENTER; gbc.fill = GridBagConstraints.BOTH; gbc.insets = new Insets(5, 5, 0, 5); this.add(paintPotPane, gbc); gbc.gridx = 0; gbc.gridy = 2; gbc.weightx = 100; gbc.weighty = 5; gbc.anchor = GridBagConstraints.CENTER; gbc.fill = GridBagConstraints.BOTH; gbc.insets = new Insets(0, 0, 0, 0); this.add(colourWheelPane, gbc); gbc.gridx = 0; gbc.gridy = 2; gbc.weightx = 100; gbc.weighty = 600; gbc.anchor = GridBagConstraints.CENTER; gbc.fill = GridBagConstraints.BOTH; gbc.insets = new Insets(0, 0, 0, 0); this.add(RGBSliderPane, gbc); gbc.gridx = 0; gbc.gridy = 2; gbc.weightx = 100; gbc.weighty = 2800; gbc.anchor = GridBagConstraints.CENTER; gbc.fill = GridBagConstraints.BOTH; gbc.insets = new Insets(0, 0, 0, 0); this.add(swatchPane, gbc); RGBSliderPane.setVisible(false); swatchPane.setVisible(false); colourWheelButton.setSelected(true); colourWheelPane.setActive(true); this.doLayout(); }
| 3,231,289
|
public ZoomAction(ImViewer model, int zoomingIndex) { super(model); controlsIndex(zoomingIndex); putValue(Action.SHORT_DESCRIPTION, UIUtilities.formatToolTipText(DESCRIPTION)); this.zoomingIndex = zoomingIndex; putValue(Action.NAME, UIUtilities.formatToolTipText(names[zoomingIndex])); setName(names[zoomingIndex]); }
|
public ZoomAction(ImViewer model, int zoomingIndex) { super(model); controlsIndex(zoomingIndex); putValue(Action.SHORT_DESCRIPTION, UIUtilities.formatToolTipText(DESCRIPTION)); this.zoomingIndex = zoomingIndex; putValue(Action.NAME, UIUtilities.formatToolTipText(names[zoomingIndex])); setName(names[zoomingIndex]); }
| 3,231,290
|
void compare(Stats stats, Image i, int z, int c, int t) throws IOException{ stats.g_start(); byte[] g_arr = Gateway.getPlane(i.id, z, c, t); stats.g_stop(); assertFalse(g_arr.length == 0); stats.b_start(); byte[] b_arr = io.getPlane(i.id, z, c, t); stats.b_stop(); assertFalse(b_arr.length == 0); assertTrue(g_arr.length == b_arr.length); stats.update(); System.err.println("Slowdown:"+stats.s_times.get(stats.last()-1)); }
|
void compare(Stats stats, Image i, int z, int c, int t) throws Exception{ stats.g_start(); byte[] g_arr = Gateway.getPlane(i.id, z, c, t); stats.g_stop(); assertFalse(g_arr.length == 0); stats.b_start(); byte[] b_arr = io.getPlane(i.id, z, c, t); stats.b_stop(); assertFalse(b_arr.length == 0); assertTrue(g_arr.length == b_arr.length); stats.update(); System.err.println("Slowdown:"+stats.s_times.get(stats.last()-1)); }
| 3,231,291
|
void compare(Stats stats, Image i, int z, int c, int t) throws IOException{ stats.g_start(); byte[] g_arr = Gateway.getPlane(i.id, z, c, t); stats.g_stop(); assertFalse(g_arr.length == 0); stats.b_start(); byte[] b_arr = io.getPlane(i.id, z, c, t); stats.b_stop(); assertFalse(b_arr.length == 0); assertTrue(g_arr.length == b_arr.length); stats.update(); System.err.println("Slowdown:"+stats.s_times.get(stats.last()-1)); }
|
void compare(Stats stats, Image i, int z, int c, int t) throws IOException{ stats.g_start(); byte[] g_arr = Gateway.getPlane(i.id, z, c, t); stats.g_stop(); assertFalse(g_arr.length == 0); stats.b_start(); byte[] b_arr = io.getPlane(i.id, z, c, t); stats.b_stop(); assertFalse(b_arr.length == 0); PixelsService ps = new PixelsService("/tmp"+PixelsService.ROOT_DEFAULT); PixelBuffer pb = ps.getPixelBuffer(image2pixels(i)); Integer Z = Integer.valueOf(z), C = Integer.valueOf(c), T=Integer.valueOf(t); byte[] result = new byte[b_arr.length]; stats.n_start(); stats.n_stop(); stats.update(); System.err.println("Slowdown:"+stats.s_times.get(stats.last()-1)); }
| 3,231,292
|
void compare(Stats stats, Image i, int z, int c, int t) throws IOException{ stats.g_start(); byte[] g_arr = Gateway.getPlane(i.id, z, c, t); stats.g_stop(); assertFalse(g_arr.length == 0); stats.b_start(); byte[] b_arr = io.getPlane(i.id, z, c, t); stats.b_stop(); assertFalse(b_arr.length == 0); assertTrue(g_arr.length == b_arr.length); stats.update(); System.err.println("Slowdown:"+stats.s_times.get(stats.last()-1)); }
|
void compare(Stats stats, Image i, int z, int c, int t) throws IOException{ stats.g_start(); byte[] g_arr = Gateway.getPlane(i.id, z, c, t); stats.g_stop(); assertFalse(g_arr.length == 0); stats.b_start(); byte[] b_arr = io.getPlane(i.id, z, c, t); stats.b_stop(); assertFalse(b_arr.length == 0); assertTrue(g_arr.length == b_arr.length); stats.update(); System.err.print("B/G:"+stats.s_times.get(stats.last()-1)); System.err.println("\tN/G:"+stats.s2_times.get(stats.last()-1)); }
| 3,231,293
|
public void getAndCopy() throws IOException { for (Iterator it = images.values().iterator(); it.hasNext();) { // TestUtils.list(db,log); // FIXME MEMORY! Image i = (Image) it.next(); i.eachPlane(new PlaneCallback() { void each(Image i, int z, int c, int t, int counter) throws IOException { if (!io.planeExists(i.id, z, c, t)) { byte[] plane = i.getPlane(z, c, t); io.putPlane(plane, i.id, z, c, t); } }; }); } }
|
public void getAndCopy() throws Exception { for (Iterator it = images.values().iterator(); it.hasNext();) { // TestUtils.list(db,log); // FIXME MEMORY! Image i = (Image) it.next(); i.eachPlane(new PlaneCallback() { void each(Image i, int z, int c, int t, int counter) throws IOException { if (!io.planeExists(i.id, z, c, t)) { byte[] plane = i.getPlane(z, c, t); io.putPlane(plane, i.id, z, c, t); } }; }); } }
| 3,231,294
|
public void getAndCopy() throws IOException { for (Iterator it = images.values().iterator(); it.hasNext();) { // TestUtils.list(db,log); // FIXME MEMORY! Image i = (Image) it.next(); i.eachPlane(new PlaneCallback() { void each(Image i, int z, int c, int t, int counter) throws IOException { if (!io.planeExists(i.id, z, c, t)) { byte[] plane = i.getPlane(z, c, t); io.putPlane(plane, i.id, z, c, t); } }; }); } }
|
public void getAndCopy() throws IOException { for (Iterator it = images.values().iterator(); it.hasNext();) { // TestUtils.list(db,log); // FIXME MEMORY! Image i = (Image) it.next(); i.eachPlane(new PlaneCallback() { void each(Image i, int z, int c, int t, int counter) throws Exception { if (!io.planeExists(i.id, z, c, t)) { byte[] plane = i.getPlane(z, c, t); io.putPlane(plane, i.id, z, c, t); } }; }); } }
| 3,231,295
|
void each(Image i, int z, int c, int t, int counter) throws IOException { if (!io.planeExists(i.id, z, c, t)) { byte[] plane = i.getPlane(z, c, t); io.putPlane(plane, i.id, z, c, t); } };
|
void each(Image i, int z, int c, int t, int counter) throws Exception { if (!io.planeExists(i.id, z, c, t)) { byte[] plane = i.getPlane(z, c, t); io.putPlane(plane, i.id, z, c, t); } };
| 3,231,297
|
public void testSpeendCompareRandom() throws IOException { int n = 200; // FIXME 100000 -> memory error Random r = new Random(); Stats stats = new Stats(); List imgs = new ArrayList(images.values()); for (int i = 0; i < n; i++) { Image img = (Image) imgs.get(r.nextInt(imgs.size())); int z = r.nextInt(img.sz); int c = r.nextInt(img.sc); int t = r.nextInt(img.st); compare(stats,img,z,c,t); } System.out.flush(); log.info(stats); db.stats(System.out); }
|
public void testSpeendCompareRandom() throws Exception { int n = 200; // FIXME 100000 -> memory error Random r = new Random(); Stats stats = new Stats(); List imgs = new ArrayList(images.values()); for (int i = 0; i < n; i++) { Image img = (Image) imgs.get(r.nextInt(imgs.size())); int z = r.nextInt(img.sz); int c = r.nextInt(img.sc); int t = r.nextInt(img.st); compare(stats,img,z,c,t); } System.out.flush(); log.info(stats); db.stats(System.out); }
| 3,231,299
|
public void xestSpeedCompareNThrough() throws IOException { final int n = 5; for (Iterator it = images.values().iterator(); it.hasNext();) { final Stats stats = new Stats(); Image i = (Image) it.next(); for (int j = 0; j < n; j++) { i.eachPlane(new PlaneCallback() { void each(Image i, int z, int c, int t, int counter) throws IOException { compare(stats,i,z,c,t); } }); } log.info(stats); } }
|
public void xestSpeedCompareNThrough() throws Exception { final int n = 5; for (Iterator it = images.values().iterator(); it.hasNext();) { final Stats stats = new Stats(); Image i = (Image) it.next(); for (int j = 0; j < n; j++) { i.eachPlane(new PlaneCallback() { void each(Image i, int z, int c, int t, int counter) throws IOException { compare(stats,i,z,c,t); } }); } log.info(stats); } }
| 3,231,300
|
public void xestSpeedCompareNThrough() throws IOException { final int n = 5; for (Iterator it = images.values().iterator(); it.hasNext();) { final Stats stats = new Stats(); Image i = (Image) it.next(); for (int j = 0; j < n; j++) { i.eachPlane(new PlaneCallback() { void each(Image i, int z, int c, int t, int counter) throws IOException { compare(stats,i,z,c,t); } }); } log.info(stats); } }
|
public void xestSpeedCompareNThrough() throws Exception { final int n = 5; for (Iterator it = images.values().iterator(); it.hasNext();) { final Stats stats = new Stats(); Image i = (Image) it.next(); for (int j = 0; j < n; j++) { i.eachPlane(new PlaneCallback() { void each(Image i, int z, int c, int t, int counter) throws Exception { compare(stats,i,z,c,t); } }); } log.info(stats); } }
| 3,231,301
|
void each(Image i, int z, int c, int t, int counter) throws IOException { compare(stats,i,z,c,t); }
|
void each(Image i, int z, int c, int t, int counter) throws Exception { compare(stats,i,z,c,t); }
| 3,231,302
|
public void xtestSpeedCompareOnceThrough() throws IOException { final Stats stats = new Stats(); for (Iterator it = images.values().iterator(); it.hasNext();) { Image i = (Image) it.next(); i.eachPlane(new PlaneCallback() { void each(Image i, int z, int c, int t, int counter) throws IOException { compare(stats,i,z,c,t); } }); } log.info(stats); }
|
public void xtestSpeedCompareOnceThrough() throws Exception { final Stats stats = new Stats(); for (Iterator it = images.values().iterator(); it.hasNext();) { Image i = (Image) it.next(); i.eachPlane(new PlaneCallback() { void each(Image i, int z, int c, int t, int counter) throws IOException { compare(stats,i,z,c,t); } }); } log.info(stats); }
| 3,231,303
|
public void xtestSpeedCompareOnceThrough() throws IOException { final Stats stats = new Stats(); for (Iterator it = images.values().iterator(); it.hasNext();) { Image i = (Image) it.next(); i.eachPlane(new PlaneCallback() { void each(Image i, int z, int c, int t, int counter) throws IOException { compare(stats,i,z,c,t); } }); } log.info(stats); }
|
public void xtestSpeedCompareOnceThrough() throws Exception { final Stats stats = new Stats(); for (Iterator it = images.values().iterator(); it.hasNext();) { Image i = (Image) it.next(); i.eachPlane(new PlaneCallback() { void each(Image i, int z, int c, int t, int counter) throws Exception { compare(stats,i,z,c,t); } }); } log.info(stats); }
| 3,231,304
|
void each(Image i, int z, int c, int t, int counter) throws IOException { compare(stats,i,z,c,t); }
|
void each(Image i, int z, int c, int t, int counter) throws Exception { compare(stats,i,z,c,t); }
| 3,231,305
|
void eachPlane(PlaneCallback action) throws IOException { int counter = 0; for (int z = 0; z < sz; z++) { for (int c = 0; c < sc; c++) { for (int t = 0; t < st; t++) { if (action != null) action.each(this, z, c, t, ++counter); } } } }
|
void eachPlane(PlaneCallback action) throws Exception { int counter = 0; for (int z = 0; z < sz; z++) { for (int c = 0; c < sc; c++) { for (int t = 0; t < st; t++) { if (action != null) action.each(this, z, c, t, ++counter); } } } }
| 3,231,306
|
byte[] getPlane(int z, int c, int t) throws IOException { if (z < 0 || z >= sz || c < 0 || c >= sc || t < 0 || t >= st) throw new IllegalArgumentException("Nope."); byte[] out = Gateway.getPlane(id, z, c, t); return out; }
|
byte[] getPlane(int z, int c, int t) throws Exception { if (z < 0 || z >= sz || c < 0 || c >= sc || t < 0 || t >= st) throw new IllegalArgumentException("Nope."); byte[] out = Gateway.getPlane(id, z, c, t); return out; }
| 3,231,307
|
abstract void each(Image i, int z, int c, int t, int counter) throws IOException;
|
abstract void each(Image i, int z, int c, int t, int counter) throws IOException;
| 3,231,308
|
void add(long b_time, long g_time) { Long b = new Long(b_time); Long g = new Long(g_time); Double s = new Double(b.doubleValue() / g.doubleValue()); b_times.add(b); g_times.add(g); s_times.add(s); b_total += b.longValue(); g_total += g.longValue(); s_total += s.doubleValue(); s_avg.add(new Double(s_total/(double)s_times.size())); }
|
void add(long b_time, long g_time, long n_time) { Long b = new Long(b_time); Long g = new Long(g_time); Double s = new Double(b.doubleValue() / g.doubleValue()); b_times.add(b); g_times.add(g); s_times.add(s); b_total += b.longValue(); g_total += g.longValue(); s_total += s.doubleValue(); s_avg.add(new Double(s_total/(double)s_times.size())); }
| 3,231,309
|
public String toString() { double total=0.0; StringBuilder sb = new StringBuilder(); sb.append("\n---------------------------------\n"); for (int i = 0; i < last(); i++) { total+=((Double)s_times.get(i)).doubleValue(); sb.append(i); sb.append("\tSlowdown: " + s_times.get(i)); sb.append(" (" + s_avg.get(i) + ") "); sb.append("\tGateway:\t" + g_times.get(i)); sb.append("\tBdb:\t" + b_times.get(i)); sb.append("\n"); } sb.append("\n----------------------------------"); sb.append("\nBMin: "+Collections.min(b_times)); sb.append("\nBMax: "+Collections.max(b_times)); sb.append("\nGMin: "+Collections.min(g_times)); sb.append("\nGMax: "+Collections.max(g_times)); sb.append("\nSMin: "+Collections.min(s_times)); sb.append("\nSMax: "+Collections.max(s_times)); sb.append("\n----------------------------------"); return sb.toString(); }
|
public String toString() { double total=0.0; StringBuilder sb = new StringBuilder(); sb.append("\n---------------------------------\n"); for (int i = 0; i < last(); i++) { total+=((Double)s_times.get(i)).doubleValue(); sb.append(i); sb.append("\tB/G: " + s_times.get(i)); sb.append(" (" + s_avg.get(i) + ") "); sb.append("\tGateway:\t" + g_times.get(i)); sb.append("\tBdb:\t" + b_times.get(i)); sb.append("\n"); } sb.append("\n----------------------------------"); sb.append("\nBMin: "+Collections.min(b_times)); sb.append("\nBMax: "+Collections.max(b_times)); sb.append("\nGMin: "+Collections.min(g_times)); sb.append("\nGMax: "+Collections.max(g_times)); sb.append("\nSMin: "+Collections.min(s_times)); sb.append("\nSMax: "+Collections.max(s_times)); sb.append("\n----------------------------------"); return sb.toString(); }
| 3,231,311
|
public String toString() { double total=0.0; StringBuilder sb = new StringBuilder(); sb.append("\n---------------------------------\n"); for (int i = 0; i < last(); i++) { total+=((Double)s_times.get(i)).doubleValue(); sb.append(i); sb.append("\tSlowdown: " + s_times.get(i)); sb.append(" (" + s_avg.get(i) + ") "); sb.append("\tGateway:\t" + g_times.get(i)); sb.append("\tBdb:\t" + b_times.get(i)); sb.append("\n"); } sb.append("\n----------------------------------"); sb.append("\nBMin: "+Collections.min(b_times)); sb.append("\nBMax: "+Collections.max(b_times)); sb.append("\nGMin: "+Collections.min(g_times)); sb.append("\nGMax: "+Collections.max(g_times)); sb.append("\nSMin: "+Collections.min(s_times)); sb.append("\nSMax: "+Collections.max(s_times)); sb.append("\n----------------------------------"); return sb.toString(); }
|
public String toString() { double total=0.0; StringBuilder sb = new StringBuilder(); sb.append("\n---------------------------------\n"); for (int i = 0; i < last(); i++) { total+=((Double)s_times.get(i)).doubleValue(); sb.append(i); sb.append("\tSlowdown: " + s_times.get(i)); sb.append(" (" + s_avg.get(i) + ") "); sb.append("\tN/G: " + s2_times.get(i)); sb.append(" (" + s2_avg.get(i) + ") "); sb.append("\tGtw:\t" + g_times.get(i)); sb.append("\tBdb:\t" + b_times.get(i)); sb.append("\n"); } sb.append("\n----------------------------------"); sb.append("\nBMin: "+Collections.min(b_times)); sb.append("\nBMax: "+Collections.max(b_times)); sb.append("\nGMin: "+Collections.min(g_times)); sb.append("\nGMax: "+Collections.max(g_times)); sb.append("\nSMin: "+Collections.min(s_times)); sb.append("\nSMax: "+Collections.max(s_times)); sb.append("\n----------------------------------"); return sb.toString(); }
| 3,231,312
|
void update(){ add(b_running,g_running); }
|
void update(){ add(b_running,g_running,n_running); }
| 3,231,314
|
public void displayTab(Event e) { List<NoteTreeNode> treeNodes = dd.getTree().getSelectedNodes(); for (NoteTreeNode treeNode : treeNodes) { DisplayedNote dn = treeNode.getDisplayedNote(); if (dn.getTab() == null) { dd.getTabFolder().addNoteTab(dn); } else { dn.getTab().select(); } } }
|
public void displayTab(Event e) { List<NoteTreeNode> treeNodes = dd.getTree().getSelectedNodes(); for (NoteTreeNode treeNode : treeNodes) { DisplayedNote dn = treeNode.getDisplayedNote(); if (dn.getTab() == null) { dd.getTabFolder().addNoteTab(dn); } else { dn.getTab().select(); } } }
| 3,231,315
|
static public Timestamp convertDate(Date date){ return null == date ? null : new Timestamp(date.getTime()); }
|
static public Timestamp convertDate(Date date){ if (null==date){ log.debug("Null date."); return null; } return new Timestamp(date.getTime()); }
| 3,231,316
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.