📄 torrentinfoview.java
字号:
refresh_failed = true;
throw( e );
}
}
protected int
getPosition()
{
return( position );
}
protected List
getRefreshListeners()
{
return( refresh_listeners );
}
public Object
getDataSource()
{
return( column.getUseCoreDataSource()?(Object)core_data_source:plugin_data_source );
}
public TableColumn
getTableColumn()
{
return column;
}
public TableRow
getTableRow()
{
throw( new RuntimeException( "getTableRow not imp" ));
}
public String
getTableID()
{
throw( new RuntimeException( "getTableID not imp" ));
}
public boolean
setText(
String original_text)
{
if ( label != null && !label.isDisposed()){
String text = DisplayFormatters.truncateString( original_text.replaceAll("&", "&&" ), 64 );
label.setText( text);
label.setToolTipText( original_text );
}
return( true );
}
public String
getText()
{
return( label==null||label.isDisposed()?"":label.getText());
}
public boolean
setForeground(
int red, int green, int blue)
{
return( true );
}
public boolean
setSortValue(
Comparable valueToSort)
{
return( true );
}
public boolean
setSortValue(
long valueToSort)
{
return( true );
}
public boolean
setSortValue(
float valueToSort )
{
return( true );
}
public Comparable
getSortValue()
{
throw( new RuntimeException( "getSortValue not imp" ));
}
public boolean
isShown()
{
return( true );
}
public boolean
isValid()
{
return( false );
}
public void
invalidate()
{
}
public void
setToolTip(
Object tooltip)
{
}
public Object
getToolTip()
{
return( null );
}
public boolean
isDisposed()
{
return( false );
}
public int
getWidth()
{
return( label==null||label.isDisposed()?0:label.getBounds().width );
}
public int
getHeight()
{
return( label==null||label.isDisposed()?0:label.getBounds().height );
}
public boolean
setGraphic(
Graphic img )
{
graphic = img;
if (img instanceof GraphicSWT){
Image imgSWT = ((GraphicSWT)img).getImage();
setIcon( imgSWT );
}
if (img instanceof UISWTGraphic){
Image imgSWT = ((UISWTGraphic)img).getImage();
setIcon( imgSWT );
}
return( true );
}
public Graphic
getGraphic()
{
return( graphic );
}
public void
setFillCell(
boolean bFillCell)
{
}
public void
setMarginHeight(
int height)
{
}
public void
setMarginWidth(
int width)
{
}
public void
addRefreshListener(
TableCellRefreshListener listener)
{
refresh_listeners.add( listener );
}
public void
removeRefreshListener(
TableCellRefreshListener listener)
{
refresh_listeners.remove( listener );
}
public void
addDisposeListener(
TableCellDisposeListener listener)
{
dispose_listeners.add( listener );
}
public void
removeDisposeListener(
TableCellDisposeListener listener)
{
dispose_listeners.remove( listener );
}
public void
addToolTipListener(
TableCellToolTipListener listener)
{
}
public void
removeToolTipListener(
TableCellToolTipListener listener)
{
}
public void
addMouseListener(
TableCellMouseListener listener)
{
}
public void
removeMouseListener(
TableCellMouseListener listener)
{
}
public void
addListeners(
Object listener)
{
if ( listener instanceof TableCellRefreshListener ){
refresh_listeners.add( listener );
}
if ( listener instanceof TableCellDisposeListener ){
dispose_listeners.add( listener );
}
}
// TableCellCore
public void
invalidate(
boolean bMustRefresh)
{
}
public boolean
setForeground(
Color color)
{
if ( label != null && !label.isDisposed()){
label.setForeground( color );
}
return( true );
}
public void
refresh(
boolean bDoGraphics)
{
}
public void
refresh(
boolean bDoGraphics,
boolean bRowVisible)
{
}
public void
refresh(
boolean bDoGraphics,
boolean bRowVisible,
boolean bCellVisible)
{
}
public void
dispose()
{
for (int i=0;i<dispose_listeners.size();i++){
try{
((TableCellDisposeListener)dispose_listeners.get(i)).dispose( this );
}catch( Throwable e ){
Debug.printStackTrace(e);
}
}
column.invokeCellDisposeListeners( this );
// We share columns with the 2 MyTorrents view. Disposing may
// have done something bad (Pieces Column), so make it dirty.
// Ideally, we'd check if there's any listeners
// Or, ideally, the cells would handle being in multiple tables at
// once better.
column.invalidateCells();
}
public void
setIcon(
Image img)
{
if ( label != null && !label.isDisposed()){
label_image = img;
if ( label.getText().length() == 0 ){
label.setImage( img );
}
}
}
public Image getIcon() {
if ( label != null && !label.isDisposed()){
return label.getImage();
}
return null;
}
public boolean
needsPainting()
{
return( true );
}
public void
doPaint(GC gc)
{
}
public void
locationChanged()
{
}
public TableRowCore
getTableRowCore()
{
return( external_row );
}
public Point
getSize()
{
throw( new RuntimeException( "getSize not imp" ));
}
public Rectangle
getBounds()
{
throw( new RuntimeException( "getBounds not imp" ));
}
public boolean
setGraphic(
Image img)
{
setIcon( img );
return( true );
}
public Image
getGraphicSWT()
{
return( label_image );
}
public void
invokeToolTipListeners(
int type)
{
}
public void
invokeMouseListeners(
TableCellMouseEvent event)
{
}
public void
setUpToDate(
boolean upToDate)
{
}
public String
getObfusticatedText()
{
return( null );
}
public Image
getBackgroundImage()
{
return( null );
}
public Color
getForegroundSWT()
{
return( null );
}
public int[] getForeground() {
return new int[3];
}
/**
* @return
*/
public BufferedTableItem
getBufferedTableItem()
{
throw( new RuntimeException( "getBufferedTableItem not imp" ));
}
public int
getCursorID()
{
return(0);
}
public void
setCursorID(
int cursorID)
{
}
public boolean
isUpToDate()
{
return( true );
}
public int
compareTo(
Object arg0 )
{
return 0;
}
// @see org.gudy.azureus2.ui.swt.views.table.TableCellCore#invokeVisibilityListeners(int)
public void invokeVisibilityListeners(int visibility) {
// TODO Auto-generated method stub
}
}
protected class
ExternalRow
implements TableRowCore
{
// table row core
public void delete(boolean bDeleteSWTObject) {
}
public void doPaint(GC gc) {
}
public Object getDataSource() {
return null;
}
public Color getForeground() {
return null;
}
public String getTableID() {
return null;
}
public void invalidate() {
}
public boolean isValid() {
return false;
}
public void refresh(boolean bDoGraphics) {
}
public void refresh(boolean bDoGraphics, boolean bVisible) {
}
public void setForeground(Color c) {
}
public void setUpToDate(boolean upToDate) {
}
public void doPaint(GC gc, boolean bVisible) {
}
public Color getBackground() {
return null;
}
public Object getDataSource(boolean bCoreObject) {
return null;
}
public int getIndex() {
return 0;
}
public TableCell getTableCell(String sColumnName) {
return null;
}
public TableCellCore getTableCellCore(String field) {
return null;
}
public boolean isRowDisposed() {
return false;
}
public boolean isSelected() {
return false;
}
public boolean isVisible() {
return false;
}
public void locationChanged(int iStartColumn) {
}
public void repaint() {
}
public void setAlternatingBGColor(boolean bEvenIfNotVisible) {
}
public boolean setHeight(int iHeight) {
return false;
}
public boolean setIconSize(Point pt) {
return false;
}
public void setSelected(boolean bSelected) {
}
public boolean setTableItem(int newIndex) {
return false;
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -