javax.swing.JTable.repaint()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(5.1k)|赞(0)|评价(0)|浏览(260)

本文整理了Java中javax.swing.JTable.repaint()方法的一些代码示例,展示了JTable.repaint()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JTable.repaint()方法的具体详情如下:
包路径:javax.swing.JTable
类名称:JTable
方法名:repaint

JTable.repaint介绍

暂无

代码示例

代码示例来源:origin: alibaba/druid

public void valueChanged(ListSelectionEvent e) {
  this.tableShow.repaint();
}

代码示例来源:origin: pmd/pmd

private void sortOnColumn(int columnIndex) {
  Comparator<Match> comparator = matchColumns[columnIndex].sorter();
  SortingTableModel<Match> model = (SortingTableModel<Match>) resultsTable.getModel();
  if (model.sortColumn() == columnIndex) {
    model.sortDescending(!model.sortDescending());
  }
  model.sortColumn(columnIndex);
  model.sort(comparator);
  resultsTable.getSelectionModel().clearSelection();
  resultsTable.repaint();
}

代码示例来源:origin: com.alibaba/druid

public void valueChanged(ListSelectionEvent e) {
  this.tableShow.repaint();
}

代码示例来源:origin: magefree/mage

public void update(List<UserView> users) {
  int row = this.tblUsers.getSelectedRow();
  tableUserModel.loadData(users);
  this.tblUsers.repaint();
  this.tblUsers.getSelectionModel().setSelectionInterval(row, row);
}

代码示例来源:origin: magefree/mage

public void update(Collection<TableView> tables) {
  int row = this.tblTables.getSelectedRow();
  tableTableModel.loadData(tables);
  this.tblTables.repaint();
  this.tblTables.getSelectionModel().setSelectionInterval(row, row);
}

代码示例来源:origin: magefree/mage

this.jTableSeats.repaint();
  this.jTableSeats.getSelectionModel().setSelectionInterval(row, row);
} else {

代码示例来源:origin: magefree/mage

this.tablePlayers.repaint();
this.tableMatches.repaint();

代码示例来源:origin: openpnp/openpnp

@Override
public void wizardCompleted(Wizard wizard) {
  // Repaint the table so that any changed fields get updated.
  table.repaint();
}

代码示例来源:origin: chatty/chatty

@Override
  public void actionPerformed(ActionEvent e) {
    request();
    update();
    table.repaint();
  }
});

代码示例来源:origin: nz.ac.waikato.cms.moa/moa

@Override
  public void actionPerformed(ActionEvent e) {
    CDTaskManagerPanel.this.taskTable.repaint();
  }
});

代码示例来源:origin: org.activecomponents.jadex/jadex-applications-bdi

public void propertyChange(PropertyChangeEvent evt)
  {
    //System.out.println("-----:"+evt);
    if(evt.getPropertyName().equals("alarmtime"))
      alarms.repaint();
  }
};

代码示例来源:origin: org.jvnet.hudson.plugins.hudsontrayapp/client-common

public boolean imageUpdate(Image img, int flags, int x, int y, int w, int h) {
  if ((flags & (FRAMEBITS | ALLBITS)) != 0) {
   Rectangle rect = table.getCellRect(row, col, false);
   table.repaint(rect);
  }
  return (flags & (ALLBITS | ABORT)) == 0;
 }
}

代码示例来源:origin: de.dfki.mary/marytts-transcription

public void valueChanged(ListSelectionEvent event) {
    if (event.getValueIsAdjusting()) {
      return;
    }
    itsRow = table.getSelectionModel().getLeadSelectionIndex();
    table.repaint();
  }
}

代码示例来源:origin: org.geotools/gt-widgets-swing-pending

public void setParam(Param[] param) {
  this.param = param;
  tab.revalidate();
  tab.repaint();
  
  value = new Object[param.length];
  for(int i=0;i<param.length;i++){
    value[i] = param[i].sample;
  }
  
}

代码示例来源:origin: org.fudaa.framework.ebli/ebli-common

protected final void updateSize() {
 final int w = getFirstWidth();
 if (w > 0) {
  table_.getColumnModel().getColumn(0).setPreferredWidth(w);
  table_.getColumnModel().getColumn(0).setWidth(w);
 }
 // table_.revalidate();
 table_.repaint();
}

代码示例来源:origin: org.codehaus.btm/btm

private void filterByGtrid(boolean filter) {
  RawTransactionTableModel model = (RawTransactionTableModel) rawViewTransactionsTable.getModel();
  if (filter) {
    int selectedRow = rawViewTransactionsTable.getSelectedRow();
    String gtrid = (String) model.getValueAt(selectedRow, RawTransactionTableModel.GTRID_COL);
    model.filterByGtrid(gtrid);
  }
  else {
    model.filterByGtrid(null);
  }
  rawViewTransactionsTable.repaint();
}

代码示例来源:origin: bitronix/btm

private void filterByGtrid(boolean filter) {
  RawTransactionTableModel model = (RawTransactionTableModel) rawViewTransactionsTable.getModel();
  if (filter) {
    int selectedRow = rawViewTransactionsTable.getSelectedRow();
    String gtrid = (String) model.getValueAt(selectedRow, RawTransactionTableModel.GTRID_COL);
    model.filterByGtrid(gtrid);
  }
  else {
    model.filterByGtrid(null);
  }
  rawViewTransactionsTable.repaint();
}

代码示例来源:origin: openpnp/openpnp

@Override
  public void actionPerformed(ActionEvent arg0) {
    Nozzle nozzle = MainFrame.get().getMachineControls().getSelectedNozzle();
    Location placementLocation = Utils2D
        .calculateBoardPlacementLocationInverse(boardLocation, nozzle.getLocation());
    getSelection().setLocation(placementLocation);
    table.repaint();
  }
};

代码示例来源:origin: net.sf.sfac/sfac-core

@Override
protected void synchronizeEditableState() {
  if (table != null) {
    boolean tableEnabled = isEnabled();
    table.setEnabled(tableEnabled);
    table.setBackground(tableEnabled ? Color.WHITE : Color.LIGHT_GRAY);
    table.setForeground(tableEnabled ? Color.BLACK : Color.DARK_GRAY);
    table.repaint();
    getTableModel().setEditable(isEditable());
  }
  checkActionStates();
}

代码示例来源:origin: openpnp/openpnp

@Override
  public void actionPerformed(ActionEvent arg0) {
    UiUtils.messageBoxOnException(() -> {
      HeadMountable tool = MainFrame.get().getMachineControls().getSelectedTool();
      Camera camera = tool.getHead().getDefaultCamera();
      Location placementLocation = Utils2D.calculateBoardPlacementLocationInverse(
          boardLocation, camera.getLocation());
      getSelection().setLocation(placementLocation);
      table.repaint();
    });
  }
};

相关文章

JTable类方法