Package model

Examples of model.TrackTableModel


   * @param isReorderable kann der user die reihenfolge ändern?
   */
  public TrackTable(Library lib, Map<Integer, String> colMap, PhoenixCore core, boolean showCheckBox, boolean tracksAddable,  boolean isReorderable) {
    this.core = core;
    this.isCheckboxShown = showCheckBox;
    setModel(new TrackTableModel(lib, colMap, showCheckBox, tracksAddable));
    JTableHeader tableHeader = new JTableHeader(columnModel);
    setTableHeader(tableHeader);
    addMouseListener(new TableMouseListener(core));
    addMouseListener(new TrackTablePopupMenu(this));
    if (showCheckBox) {
View Full Code Here


    if (mColIndex == 0 || mColIndex == 1 || mColIndex == 2
        || !isCheckboxShown) {
      return;
    }
    TableColumn col = getColumnModel().getColumn(vColIndex);
    TrackTableModel model = (TrackTableModel) getModel();
    char temp = getColumnConstant(col.getHeaderValue().toString());
    if (lastSortedColumnIndex == temp) {// column bereits angeklickt?
      if (col.getHeaderValue().toString().endsWith(" v")) {// dann den
                                  // entsprechenden
                                  // suffix
                                  // umkehren
        col.setHeaderValue(col
            .getHeaderValue()
            .toString()
            .substring(0,
                col.getHeaderValue().toString().length() - 2)
            + " ^");
        model.sort(getColumnConstant(col.getHeaderValue().toString()),
            TrackTableModel.SORT_ASC);
      } else if (col.getHeaderValue().toString().endsWith(" ^")) {
        col.setHeaderValue(col
            .getHeaderValue()
            .toString()
            .substring(0,
                col.getHeaderValue().toString().length() - 2)
            + " v");
        model.sort(getColumnConstant(col.getHeaderValue().toString()),
            TrackTableModel.SORT_DESC);
      }
    } else {
      clearSortedMarker();
      col.setHeaderValue(col.getHeaderValue() + " ^");// neues selektieren
      model.sort(getColumnConstant(col.getHeaderValue().toString()),
          TrackTableModel.SORT_ASC);
    }
    lastSortedColumnIndex = temp;
  }
View Full Code Here

    // das transferable-objekt bauen
    public Transferable createTransferable(JComponent comp) {
      index = itself.getSelectedRows();
      Track[] tracks = new Track[index.length];// tracks hier reinpacken
      for (int i = 0; i < index.length; i++) {
        TrackTableModel model = ((TrackTableModel) itself.getModel());
        if (index[i] >= 0 || index[i] < model.getRowCount()) {
          tracks[i] = model.getTrackAt(index[i]);
        }
      }

      return new TrackTransferDto(tracks);// und als Transferable-objekt
                        // ausspucken.
View Full Code Here

TOP

Related Classes of model.TrackTableModel

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.