Package com.aelitis.azureus.ui.common.table.impl

Examples of com.aelitis.azureus.ui.common.table.impl.TableColumnManager


          public void tableColumnCreated(TableColumn column) {
            new ColumnTJ_Category(column);
          }
        });
   
    TableColumnManager tcm = TableColumnManager.getInstance();
    String[] defaultLibraryColumns = {
      ColumnTJ_Rank.COLUMN_ID,
      ColumnTJ_Name.COLUMN_ID,
      ColumnTJ_Duration.COLUMN_ID,
      ColumnTJ_Device.COLUMN_ID,
      ColumnTJ_Status.COLUMN_ID,
      ColumnTJ_Completion.COLUMN_ID,
    };
    tcm.setDefaultColumnNames(TABLE_TRANSCODE_QUEUE, defaultLibraryColumns);
   
    String[] defaultQColumns = {
      ColumnTJ_Name.COLUMN_ID,
      ColumnTJ_Duration.COLUMN_ID,
      ColumnTJ_Profile.COLUMN_ID,
      ColumnTJ_Status.COLUMN_ID,
      ColumnTJ_Completion.COLUMN_ID,
    };
    tcm.setDefaultColumnNames(TABLE_DEVICE_LIBRARY, defaultQColumns);
  }
View Full Code Here


      SeedsItem.COLUMN_ID,
      PeersItem.COLUMN_ID,
      ShareRatioItem.COLUMN_ID
    };

    TableColumnManager tcManager = TableColumnManager.getInstance();
    Map<String, TableColumnCore> mapTCs = tcManager.getTableColumnsAsMap(
        Download.class, tableID);
   
    tcManager.setDefaultColumnNames(tableID, defaultVisibleOrder);

    if (!tcManager.loadTableColumnSettings(Download.class, tableID)
        || areNoneVisible(mapTCs)) {
      setVisibility(mapTCs, defaultVisibleOrder);
      ColumnProgressETA tc = (ColumnProgressETA) mapTCs.get(ColumnProgressETA.COLUMN_ID);
      if (tc != null) {
        tcManager.setDefaultSortColumnName(tableID, ColumnProgressETA.COLUMN_ID);
        tc.setSortAscending(false);
      }
    }

    // special changes
View Full Code Here

      SeedsItem.COLUMN_ID,
      PeersItem.COLUMN_ID,
      "azsubs.ui.column.subs",
    };

    TableColumnManager tcManager = TableColumnManager.getInstance();
    Map<String, TableColumnCore> mapTCs = tcManager.getTableColumnsAsMap(
        DownloadTypeIncomplete.class, tableID);

    tcManager.setDefaultColumnNames(tableID, defaultVisibleOrder);

    if (!tcManager.loadTableColumnSettings(DownloadTypeIncomplete.class,
        tableID)
        || areNoneVisible(mapTCs)) {
      setVisibility(mapTCs, defaultVisibleOrder);
      ColumnThumbAndName tc = (ColumnThumbAndName) mapTCs.get(ColumnThumbAndName.COLUMN_ID);
      if (tc != null) {
        tcManager.setDefaultSortColumnName(tableID, ColumnThumbAndName.COLUMN_ID);
        tc.setSortAscending(true);
      }
    }

    // special changes
View Full Code Here

      StatusItem.COLUMN_ID,
      ShareRatioItem.COLUMN_ID,
      DateCompletedItem.COLUMN_ID,
    };

    TableColumnManager tcManager = TableColumnManager.getInstance();
    Map mapTCs = tcManager.getTableColumnsAsMap(DownloadTypeComplete.class,
        tableID);

    tcManager.setDefaultColumnNames(tableID, defaultVisibleOrder);

    if (!tcManager.loadTableColumnSettings(DownloadTypeComplete.class, tableID)
        || areNoneVisible(mapTCs)) {
      setVisibility(mapTCs, defaultVisibleOrder);
      DateCompletedItem tc = (DateCompletedItem) mapTCs.get(DateCompletedItem.COLUMN_ID);
      if (tc != null) {
        tcManager.setDefaultSortColumnName(tableID, DateCompletedItem.COLUMN_ID);
        tc.setSortAscending(false);
      }
    }

    // special changes
View Full Code Here

      ColumnProgressETA.COLUMN_ID,
      StatusItem.COLUMN_ID,
      DateCompletedItem.COLUMN_ID,
    };

    TableColumnManager tcManager = TableColumnManager.getInstance();
    Map mapTCs = tcManager.getTableColumnsAsMap(DownloadTypeComplete.class,
        tableID);

    tcManager.setDefaultColumnNames(tableID, defaultVisibleOrder);

    if (!tcManager.loadTableColumnSettings(DownloadTypeComplete.class,
        tableID)
        || areNoneVisible(mapTCs)) {
      setVisibility(mapTCs, defaultVisibleOrder);
      DateCompletedItem tc = (DateCompletedItem) mapTCs.get(DateCompletedItem.COLUMN_ID);
      if (tc != null) {
        tcManager.setDefaultSortColumnName(tableID, DateCompletedItem.COLUMN_ID);
        tc.setSortAscending(false);
      }
    }

    // special changes
View Full Code Here

      ColumnActivityType.COLUMN_ID,
      ColumnActivityText.COLUMN_ID,
      ColumnActivityActions.COLUMN_ID,
      ColumnActivityDate.COLUMN_ID,
    };
    TableColumnManager tcManager = TableColumnManager.getInstance();
    Map mapTCs = tcManager.getTableColumnsAsMap(VuzeActivitiesEntry.class,
        tableID);

    tcManager.setDefaultColumnNames(tableID, defaultVisibleOrder);

    if (!tcManager.loadTableColumnSettings(VuzeActivitiesEntry.class, tableID)
        || areNoneVisible(mapTCs)) {
      setVisibility(mapTCs, defaultVisibleOrder);
      ColumnActivityDate tc = (ColumnActivityDate) mapTCs.get(ColumnActivityDate.COLUMN_ID);
      if (tc != null) {
        tcManager.setDefaultSortColumnName(tableID,
            ColumnActivityDate.COLUMN_ID);
        tc.setSortAscending(false);
      }
      ColumnActivityText tcText = (ColumnActivityText) mapTCs.get(ColumnActivityText.COLUMN_ID);
      if (tcText != null) {
View Full Code Here

      ColumnActivityText.COLUMN_ID,
      ColumnThumbnail.COLUMN_ID,
      ColumnActivityActions.COLUMN_ID,
      ColumnActivityDate.COLUMN_ID,
    };
    TableColumnManager tcManager = TableColumnManager.getInstance();
    Map mapTCs = tcManager.getTableColumnsAsMap(VuzeActivitiesEntry.class,
        tableID);

    tcManager.setDefaultColumnNames(tableID, defaultVisibleOrder);

    if (!tcManager.loadTableColumnSettings(VuzeActivitiesEntry.class, tableID)
        || areNoneVisible(mapTCs)) {
      setVisibility(mapTCs, defaultVisibleOrder);

      ColumnActivityText tcText = (ColumnActivityText) mapTCs.get(ColumnActivityText.COLUMN_ID);
      if (tcText != null) {
        tcText.setWidth(350);
      }
      ColumnActivityDate tc = (ColumnActivityDate) mapTCs.get(ColumnActivityDate.COLUMN_ID);
      if (tc != null) {
        tcManager.setDefaultSortColumnName(tableID,
            ColumnActivityDate.COLUMN_ID);
        tc.setSortAscending(false);
      }
    }
View Full Code Here

    // Core columns are implementors of TableColumn to save one class creation
    // Otherwise, we'd have to create a generic TableColumnImpl class, pass it
    // to another class so that it could manipulate it and act upon changes.

    TableColumnManager tcManager = TableColumnManager.getInstance();

    TableColumnCoreCreationListener tcCreator = new TableColumnCoreCreationListener() {
      // @see org.gudy.azureus2.ui.swt.views.table.TableColumnCoreCreationListener#createTableColumnCore(java.lang.Class, java.lang.String, java.lang.String)
      public TableColumnCore createTableColumnCore(Class forDataSourceType,
          String tableID, String columnID) {
        cInfo info = c.get(columnID);

        try {
          Constructor constructor = info.cla.getDeclaredConstructor(new Class[] {
            String.class
          });
          TableColumnCore column = (TableColumnCore) constructor.newInstance(new Object[] {
            tableID
          });
          return column;
        } catch (Exception e) {
          Debug.out(e);
        }

        return null;
      }

      public void tableColumnCreated(TableColumn column) {
      }
    };

    tcManager.unregisterColumn(NameItem.DATASOURCE_TYPE, NameItem.COLUMN_ID, null);

    for (Iterator<String> iter = c.keySet().iterator(); iter.hasNext();) {
      String id = iter.next();
      cInfo info = c.get(id);

      for (int i = 0; i < info.forDataSourceTypes.length; i++) {
        Class cla = info.forDataSourceTypes[i];

        tcManager.registerColumn(cla, id, tcCreator);
      }
    }
   

  }
View Full Code Here

  // @see com.aelitis.azureus.ui.common.table.impl.TableColumnImpl#preAdd()
  public void preAdd() {
    if (!isFirstLoad() || getPosition() >= 0 || getColumnAdded()) {
      return;
    }
    TableColumnManager tcManager = TableColumnManager.getInstance();
    TableColumnInfo columnInfoTAN = tcManager.getColumnInfo(null, getTableID(),
        ColumnThumbAndName.COLUMN_ID);
    if (columnInfoTAN != null) {
      TableColumn column = columnInfoTAN.getColumn();
      if (column != null) {
        int position = column.getPosition();
View Full Code Here

TOP

Related Classes of com.aelitis.azureus.ui.common.table.impl.TableColumnManager

Copyright © 2018 www.massapicom. 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.