Examples of TableView


Examples of com.aelitis.azureus.ui.common.table.TableView

      for (int i = 0; i < itemsNeedingSelection.length; i++) {
        String itemID = itemsNeedingSelection[i];
        mapNewToolbarStates.put(itemID, hasSelection);
      }
 
      TableView tv = SelectedContentManager.getCurrentlySelectedTableView();
      boolean hasRealDM = tv != null;
      if (!hasRealDM) {
        MultipleDocumentInterfaceSWT mdi = UIFunctionsManagerSWT.getUIFunctionsSWT().getMDISWT();
        if (mdi != null) {
          MdiEntrySWT entry = mdi.getCurrentEntrySWT();
          if (entry != null) {
            if (entry.getDatasource() instanceof DownloadManager) {
              hasRealDM = true;
            } else if ((entry.getIView() instanceof UIPluginView)
                && (((UIPluginView) entry.getIView()).getDataSource() instanceof DownloadManager)) {
              hasRealDM = true;
            }
          }
        }
      }
 
      boolean canStart = false;
      boolean canStop = false;
      boolean canRemoveFileInfo = false;
      boolean canRunFileInfo = false;
      boolean hasDM = false;
 
      if (currentContent.length > 0 && hasRealDM) {
        for (int i = 0; i < currentContent.length; i++) {
          ISelectedContent content = currentContent[i];
          DownloadManager dm = content.getDownloadManager();
          int fileIndex = content.getFileIndex();
          if (fileIndex == -1) {
            hasDM = true;
            if (!canStart && ManagerUtils.isStartable(dm)) {
              canStart = true;
            }
            if (!canStop && ManagerUtils.isStopable(dm)) {
              canStop = true;
            }
          } else {
            DiskManagerFileInfo[] fileInfos = dm.getDiskManagerFileInfo();
            if (fileIndex < fileInfos.length) {
              DiskManagerFileInfo fileInfo = fileInfos[fileIndex];
              if (!canStart && (fileInfo.isSkipped())) {
                canStart = true;
              }
             
              if (!canStop && !fileInfo.isSkipped()) {
                canStop = true;
              }
             
              if (!canRemoveFileInfo && !fileInfo.isSkipped()) {
                int storageType = fileInfo.getStorageType();
                if (storageType == DiskManagerFileInfo.ST_LINEAR
                    || storageType == DiskManagerFileInfo.ST_COMPACT) {
                  canRemoveFileInfo = true;
                }
              }
             
              if (!canRunFileInfo
                  && fileInfo.getAccessMode() == DiskManagerFileInfo.READ
                  && fileInfo.getDownloaded() == fileInfo.getLength()
                  && fileInfo.getFile(true).exists()) {
                canRunFileInfo = true;
              }
            }
          }
        }
        boolean canRemove = hasDM || canRemoveFileInfo;
        mapNewToolbarStates.put("remove", canRemove);
      }
 
      boolean canRun = has1Selection && ((hasDM && !canRunFileInfo) || (!hasDM && canRunFileInfo));
      if (canRun) {
        ISelectedContent content = currentContent[0];
        DownloadManager dm = content.getDownloadManager();
 
        if (dm == null) {
          canRun = false;
        } else {
          TOTorrent torrent = dm.getTorrent();
 
          if (torrent == null) {
 
            canRun = false;
 
          } else if (!dm.getAssumedComplete() && torrent.isSimpleTorrent()) {
 
            canRun = false;
  /*
          } else if (PlatformTorrentUtils.useEMP(torrent)
              && PlatformTorrentUtils.embeddedPlayerAvail()
              && PlayUtils.canProgressiveOrIsComplete(torrent)) {
            // play button enabled and not UMP.. don't need launch
 
            canRun = false;
 
          }
          */
          }
        }
      }
      mapNewToolbarStates.put("run", canRun);
 
      mapNewToolbarStates.put("start", canStart);
      mapNewToolbarStates.put("stop", canStop);
 
      for (int i = 0; i < itemsNeedingRealDMSelection.length; i++) {
        String itemID = itemsNeedingRealDMSelection[i];
        if (!mapNewToolbarStates.containsKey(itemID)) {
          mapNewToolbarStates.put(itemID, hasSelection && hasDM
              && hasRealDM);
        }
      }
      for (int i = 0; i < itemsRequiring1DMSelection.length; i++) {
        String itemID = itemsRequiring1DMSelection[i];
        if (!mapNewToolbarStates.containsKey(itemID)) {
          mapNewToolbarStates.put(itemID, has1Selection && hasDM);
        }
      }
 
      for (int i = 0; i < itemsRequiring1DMwithHash.length; i++) {
        String itemID = itemsRequiring1DMwithHash[i];
        if (!mapNewToolbarStates.containsKey(itemID)) {
          mapNewToolbarStates.put(itemID, hasDM);
        }
      }
 
      mapNewToolbarStates.put("download", has1Selection
            && (!(currentContent[0] instanceof ISelectedVuzeFileContent))
            && currentContent[0].getDownloadManager() == null
            && (currentContent[0].getHash() != null || currentContent[0].getDownloadInfo() != null));
 
      if (tv != null) {
        TableColumn tc = tv.getTableColumn(RankItem.COLUMN_ID);
        if (tc != null && !tc.isVisible()) {
          mapNewToolbarStates.put("up", false);
          mapNewToolbarStates.put("down", false);
        }
      }
View Full Code Here

Examples of com.aelitis.azureus.ui.common.table.TableView

    Control[] swtChildren = ((Composite) control).getChildren();
    for (int i = 0; i < swtChildren.length; i++) {
      Control childControl = swtChildren[i];
      TableOrTreeSWT tableOrTree = TableOrTreeUtils.getTableOrTreeSWT(childControl);
      TableView tv = tableOrTree == null ? null
          : (TableView) tableOrTree.getData("TableView");
      if (tv instanceof ObfusticateImage) {
        ObfusticateImage oi = (ObfusticateImage) tv;
        oi.obfusticatedImage(image);
        continue;
View Full Code Here

Examples of com.aelitis.azureus.ui.common.table.TableView

    for (Control childControl : children) {
      if (!childControl.isVisible()) {
        continue;
      }
      TableOrTreeSWT tableOrTree = TableOrTreeUtils.getTableOrTreeSWT(childControl);
      TableView tv = tableOrTree == null ? null
          : (TableView) tableOrTree.getData("TableView");
      if (tv instanceof ObfusticateImage) {
        ObfusticateImage oi = (ObfusticateImage) tv;
        oi.obfusticatedImage(image);
        continue;
View Full Code Here

Examples of com.intellij.ui.table.TableView

  };
  private final TableView myTableVeiw;
  private boolean myIsEnabled = true;

  public EnvVariablesTable() {
    myTableVeiw = new TableView(new ListTableModel((new ColumnInfo[]{NAME, VALUE})));
    myTableVeiw.getTableViewModel().setSortable(false);
    myPanel.add(ScrollPaneFactory.createScrollPane(myTableVeiw.getComponent()), BorderLayout.CENTER);
    JComponent toolbarComponent = createToolbar();
    myPanel.add(toolbarComponent, BorderLayout.NORTH);
    myTableVeiw.getComponent().setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
View Full Code Here

Examples of cx.fbn.nevernote.gui.TableView

        notebookTree = new NotebookTreeWidget(conn);
        attributeTree = new AttributeTreeWidget();
        tagTree = new TagTreeWidget(conn);
        savedSearchTree = new SavedSearchTreeWidget();
        trashTree = new TrashTreeWidget();
        noteTableView = new TableView(logger, listManager);       
       
        searchField = new QComboBox();
        searchField.setObjectName("searchField");
        //setStyleSheet("QComboBox#searchField { background-color: yellow }");
        searchField.setEditable(true);
View Full Code Here

Examples of javafx.scene.control.TableView

    public SnapshotTable(ObservableList<Snapshot> snapshots) {
        this.snapshots = snapshots;
    }

    public Node createTable() {
        TableView tableView = new TableView();
        ObservableList columns = tableView.getColumns();
        columns.add(createColumn("monitoringTime", "Monitoring Time"));
        columns.add(createColumn("usedHeapSizeInMB", "Heap Size"));
        columns.add(createColumn("threadCount", "Thread Count"));
        columns.add(createColumn("peakThreadCount", "Peak Thread Count"));
        columns.add(createColumn("totalErrors", "Total Errors"));
        columns.add(createColumn("currentThreadBusy", "Busy Threads"));
        columns.add(createColumn("committedTX", "Commits"));
        columns.add(createColumn("rolledBackTX", "Rollbacks"));
        columns.add(createColumn("queuedConnections", "Queued Connections"));
        columns.add(createColumn("totalErrors", "Total Errors"));
        columns.add(createColumn("activeSessions", "Active Sessions"));
        columns.add(createColumn("expiredSessions", "Expired Sessions"));
        tableView.setColumnResizePolicy(TableView.CONSTRAINED_RESIZE_POLICY);
        tableView.setItems(this.snapshots);
        return tableView;
    }
View Full Code Here

Examples of mage.view.TableView

      tableWaitingDialog.showDialog(roomId, newTableDialog.getTable().getTableId());
    }
}//GEN-LAST:event_btnNewTableActionPerformed

  private void btnQuickStartActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnQuickStartActionPerformed
    TableView table;
    try {
      List<String> playerTypes = new ArrayList<String>();
      playerTypes.add("Human");
      playerTypes.add("Computer - default");
      table = session.createTable(
          roomId,
          "Two Player Duel",
          "Constructed",
          playerTypes,
          null, null
      );
      session.joinTable(
          roomId,
          table.getTableId(),
          "Human",
          DeckCardLists.load("test.dck")
      );
      session.joinTable(
          roomId,
          table.getTableId(),
          "Computer",
          DeckCardLists.load("test.dck")
      );
      hideTables();
      session.startGame(roomId, table.getTableId());
    } catch (Exception ex) {
      handleError(ex);
    }
  }//GEN-LAST:event_btnQuickStartActionPerformed
View Full Code Here

Examples of net.rim.device.api.ui.component.table.TableView

                new RegionStyles(BorderFactory.createSimpleBorder(new XYEdges(
                        1, 1, 1, 1), Border.STYLE_SOLID), null, null, null,
                        RegionStyles.ALIGN_LEFT, RegionStyles.ALIGN_TOP);

        // Create the view and controller
        final TableView tableView = new TableView(_tableModel);
        final TableController tableController =
                new TableController(_tableModel, tableView);

        // Set the controller focus policy to highlight rows
        tableController.setFocusPolicy(TableController.ROW_FOCUS);

        // Set the behaviour of the controller when a table item is clicked
        tableController.setCommand(new Command(new CommandHandler() {
            /**
             * @see CommandHandler#execute(ReadOnlyCommandMetadata, Object)
             */
            public void execute(final ReadOnlyCommandMetadata metadata,
                    final Object context) {
                Dialog.alert("Command Executed");
            }
        }));

        tableView.setController(tableController);

        // Create a DataTemplate that suppresses the third column
        final DataTemplate dataTemplate = new DataTemplate(tableView, 2, 3) {
            /**
             * @see DataTemplate#getDataFields(int)
             */
            public Field[] getDataFields(final int modelRowIndex) {
                final Object[] data =
                        (Object[]) ((TableModel) getView().getModel())
                                .getRow(modelRowIndex);

                final Field[] fields = new Field[4];
                fields[0] = new BitmapField((Bitmap) data[0]);
                fields[1] =
                        new LabelField(data[1], Field.FOCUSABLE
                                | DrawStyle.HCENTER);
                fields[2] = new LabelField(data[3], Field.FOCUSABLE);
                fields[3] = new LabelField(data[4], Field.FOCUSABLE);

                return fields;
            }
        };

        // Set up regions
        dataTemplate.createRegion(new XYRect(0, 0, 1, 2), style);
        dataTemplate.createRegion(new XYRect(1, 0, 2, 1), style);
        dataTemplate.createRegion(new XYRect(1, 1, 1, 1), style);
        dataTemplate.createRegion(new XYRect(2, 1, 1, 1), style);

        // Specify the size of each column by percentage, and the height of a
        // row
        dataTemplate.setColumnProperties(0, new TemplateColumnProperties(15,
                TemplateColumnProperties.PERCENTAGE_WIDTH));
        dataTemplate.setColumnProperties(1, new TemplateColumnProperties(15,
                TemplateColumnProperties.PERCENTAGE_WIDTH));
        dataTemplate.setColumnProperties(2, new TemplateColumnProperties(70,
                TemplateColumnProperties.PERCENTAGE_WIDTH));
        dataTemplate.setRowProperties(0, new TemplateRowProperties(ROW_HEIGHT));
        dataTemplate.setRowProperties(1, new TemplateRowProperties(ROW_HEIGHT));

        // Apply the template to the view
        tableView.setDataTemplate(dataTemplate);
        dataTemplate.useFixedHeight(true);

        add(tableView);
    }
View Full Code Here

Examples of org.apache.isis.viewer.scimpi.dispatcher.view.display.TableView

        addElementProcessor(new ShortFormView());
        addElementProcessor(new ShowDebug());
        addElementProcessor(new SimpleButton());
        addElementProcessor(new Specification());
        addElementProcessor(new TableCell());
        addElementProcessor(new TableView());
        addElementProcessor(new TableBuilder());
        addElementProcessor(new TableEmpty());
        addElementProcessor(new TableRow());
        addElementProcessor(new TableHeader());
        addElementProcessor(new TemplateTag());
View Full Code Here

Examples of org.apache.pivot.wtk.TableView

    @Override
    public boolean keyPressed(Component component, int keyCode, Keyboard.KeyLocation keyLocation) {
        boolean consumed = super.keyPressed(component, keyCode, keyLocation);

        TableView tableView = (TableView)getComponent();

        switch (keyCode) {
            case Keyboard.KeyCode.UP: {
                int index = tableView.getFirstSelectedIndex();

                do {
                    index--;
                } while (index >= 0
                    && tableView.isRowDisabled(index));

                if (index >= 0) {
                    if (Keyboard.isPressed(Keyboard.Modifier.SHIFT)
                        && tableView.getSelectMode() == TableView.SelectMode.MULTI) {
                        tableView.addSelectedIndex(index);
                    } else {
                        tableView.setSelectedIndex(index);
                    }

                    tableView.scrollAreaToVisible(getRowBounds(index));
                }

                consumed = true;
                break;
            }

            case Keyboard.KeyCode.DOWN: {
                int index = tableView.getLastSelectedIndex();
                int count = tableView.getTableData().getLength();

                do {
                    index++;
                } while (index < count
                    && tableView.isRowDisabled(index));

                if (index < count) {
                    if (Keyboard.isPressed(Keyboard.Modifier.SHIFT)
                        && tableView.getSelectMode() == TableView.SelectMode.MULTI) {
                        tableView.addSelectedIndex(index);
                    } else {
                        tableView.setSelectedIndex(index);
                    }

                    tableView.scrollAreaToVisible(getRowBounds(index));
                }

                consumed = true;
                break;
            }
        }

        // Clear the highlight
        if (highlightedIndex != -1
            && tableView.getSelectMode() != TableView.SelectMode.NONE
            && showHighlight) {
            repaintComponent(getRowBounds(highlightedIndex));
        }

        highlightedIndex = -1;
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.