Examples of FakeTableCell


Examples of org.gudy.azureus2.ui.swt.views.table.impl.FakeTableCell

        if (usable_cols.containsKey(id)) {
         
          continue;
        }
       
        FakeTableCell fakeTableCell = null;
        try {
          fakeTableCell = new FakeTableCell(col);
          fakeTableCell.setOrentation(SWT.LEFT);
          fakeTableCell.setWrapText(false);
          fakeTableCell.setDataSource(download_manager);
          col.invokeCellAddedListeners(fakeTableCell);
          // One refresh to see if it throws up
          fakeTableCell.refresh();
          usable_cols.put(id, fakeTableCell);
        } catch (Throwable t) {
          //System.out.println("not usable col: " + id + " - " + Debug.getCompressedStackTrace());
          try {
            if (fakeTableCell != null) {
              fakeTableCell.dispose();
            }
          } catch (Throwable t2) {
            //ignore;
          }
        }
      }
    }
   
    Collection<FakeTableCell> values = usable_cols.values();
   
    cells = new FakeTableCell[values.size()];
   
    values.toArray( cells );
   
    Arrays.sort(
        cells,
        new Comparator<FakeTableCell>()
        {
          public int compare(FakeTableCell o1, FakeTableCell o2) {
            TableColumnCore  c1 = (TableColumnCore) o1.getTableColumn();
            TableColumnCore  c2 = (TableColumnCore) o2.getTableColumn();

            String key1 = MessageText.getString(c1.getTitleLanguageKey());
            String key2 = MessageText.getString(c2.getTitleLanguageKey());
           
            return key1.compareToIgnoreCase(key2);
          }
        });
           
    for (int i=0;i<cells.length;i++){
     
      final FakeTableCell  cell = cells[i];
     
      label = new Label(gColumns, SWT.NULL);
      gridData = new GridData();
      if ( i%2 == 1 ){
        gridData.horizontalIndent = 16;
      }
      label.setLayoutData( gridData );
      String key = ((TableColumnCore) cell.getTableColumn()).getTitleLanguageKey();
      label.setText(MessageText.getString(key) + ": ");
      label.setToolTipText(MessageText.getString(key + ".info", ""));

      final Composite c = new Composite(gColumns, SWT.NONE);
      gridData = new GridData( GridData.FILL_HORIZONTAL);
      gridData.heightHint = 16;
      c.setLayoutData(gridData);
      cell.setControl(c);
      cell.invalidate();
      cell.refresh();
      c.addListener(SWT.MouseHover, new Listener() {
        public void handleEvent(Event event) {
          Object toolTip = cell.getToolTip();
          if (toolTip instanceof String) {
            String s = (String) toolTip;
            c.setToolTipText(s);
          }
        }
View Full Code Here

Examples of org.gudy.azureus2.ui.swt.views.table.impl.FakeTableCell

    public Cell(TableCell parentCell, TableColumnCore column, TableViewColumnSetup tv, TableRowCore sampleRow) {
      this.column = column;
      if (sampleRow == null) {
        return;
      }
      sampleCell = new FakeTableCell(column);

      sampleCell.setControl(tv.getTableComposite());
      Rectangle bounds = ((TableCellImpl)parentCell).getBounds();
      sampleCell.setCellArea(bounds);
      if (sampleRow != null) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.