📄 columntc_sample.java
字号:
// Decompiled by Jad v1.5.8e2. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://kpdus.tripod.com/jad.html
// Decompiler options: packimports(3) fieldsfirst ansi space
// Source File Name: ColumnTC_Sample.java
package org.gudy.azureus2.ui.swt.views.columnsetup;
import com.aelitis.azureus.ui.common.table.*;
import org.eclipse.swt.graphics.GC;
import org.gudy.azureus2.core3.util.AERunnable;
import org.gudy.azureus2.core3.util.Debug;
import org.gudy.azureus2.plugins.ui.tables.*;
import org.gudy.azureus2.ui.swt.Utils;
import org.gudy.azureus2.ui.swt.views.table.TableCellSWT;
import org.gudy.azureus2.ui.swt.views.table.TableCellSWTPaintListener;
import org.gudy.azureus2.ui.swt.views.table.impl.FakeTableCell;
import org.gudy.azureus2.ui.swt.views.table.impl.TableCellImpl;
import org.gudy.azureus2.ui.swt.views.table.utils.CoreTableColumn;
// Referenced classes of package org.gudy.azureus2.ui.swt.views.columnsetup:
// TableColumnSetupWindow
public class ColumnTC_Sample extends CoreTableColumn
implements TableCellAddedListener
{
public class Cell
implements TableCellRefreshListener, TableCellSWTPaintListener, TableCellVisibilityListener
{
private final TableColumnCore column;
private FakeTableCell sampleCell;
final ColumnTC_Sample this$0;
public void cellPaint(GC gc, TableCellSWT cell)
{
if (sampleCell == null)
return;
org.eclipse.swt.graphics.Rectangle bounds = ((TableCellImpl)cell).getBounds();
sampleCell.setCellArea(bounds);
try
{
sampleCell.doPaint(gc);
}
catch (Throwable e)
{
Debug.out(e);
}
}
public void cellVisibilityChanged(TableCell cell, int visibility)
{
if (sampleCell == null)
return;
try
{
column.invokeCellVisibilityListeners(sampleCell, visibility);
}
catch (Throwable e)
{
Debug.out(e);
}
}
public void refresh(TableCell cell)
{
if (sampleCell == null)
return;
if (!cell.isShown())
{
return;
} else
{
sampleCell.refresh(true, true, true);
cell.setSortValue(sampleCell.getSortValue());
return;
}
}
public Cell(TableCell parentCell, TableColumnCore column, TableColumnSetupWindow.TableViewColumnSetup tv, TableRowCore sampleRow)
{
this$0 = ColumnTC_Sample.this;
super();
this.column = column;
if (sampleRow == null)
return;
sampleCell = new FakeTableCell(column);
sampleCell.setControl(tv.getTableComposite());
org.eclipse.swt.graphics.Rectangle bounds = ((TableCellImpl)parentCell).getBounds();
sampleCell.setCellArea(bounds);
if (sampleRow != null)
sampleCell.setDataSource(sampleRow.getDataSource(true));
}
}
public static final String COLUMN_ID = "TableColumnSample";
public ColumnTC_Sample(String tableID)
{
super("TableColumnSample", tableID);
setPosition(-1);
setRefreshInterval(-2);
setWidth(120);
}
public void cellAdded(final TableCell cell)
{
Utils.execSWTThread(new AERunnable() {
final TableCell val$cell;
final ColumnTC_Sample this$0;
public void runSupport()
{
TableColumnCore column = (TableColumnCore)cell.getDataSource();
TableColumnSetupWindow.TableViewColumnSetup tv = (TableColumnSetupWindow.TableViewColumnSetup)((TableCellCore)cell).getTableRowCore().getView();
TableRowCore sampleRow = (TableRowCore)tv.getSampleRow();
cell.addListeners(new Cell(cell, column, tv, sampleRow));
}
{
this$0 = ColumnTC_Sample.this;
cell = tablecell;
super();
}
});
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -