Package javax.swing.table

Examples of javax.swing.table.JTableHeader


    passwordColumn.setCellRenderer(new PasswordCellRenderer());

    // create a JScrollPane and place the auth JTable inside it
    JScrollPane scroller = new JScrollPane(authTable);
    authTable.setPreferredScrollableViewportSize(new Dimension(520, 150));
    JTableHeader tableHeader = authTable.getTableHeader();
    scroller.setColumnHeaderView(tableHeader);

    tempPanel.add(scroller);

    // ADD button
View Full Code Here


                                                 final int row,
                                                 final int column)
  {
    if (table != null)
    {
      final JTableHeader header = table.getTableHeader();
      if (header != null)
      {
        setForeground(header.getForeground());
        setBackground(header.getBackground());
        setFont(header.getFont());
      }
    }

    setText((value == null) ? "" : value.toString());
    setBorder(UIManager.getBorder("TableHeader.cellBorder"));
View Full Code Here

  protected TableModel createDefaultDataModel() {
    return new CommitTableModel();
  }

  private void configureHeader() {
    final JTableHeader th = getTableHeader();
    final TableColumnModel cols = th.getColumnModel();

    final TableColumn graph = cols.getColumn(0);
    final TableColumn author = cols.getColumn(1);
    final TableColumn date = cols.getColumn(2);
View Full Code Here

                Border border = ((JPanel) component).getBorder();
                if (border instanceof TitledBorder) {
                    ((TitledBorder) border).setTitleColor(corFrenteJanela);
                }
            } else if (component instanceof JTable) {
                JTableHeader tableHeader = ((JTable) component).getTableHeader();
                if (tableHeader != null) {
                    tableHeader.setBackground(corFundoJanele);
                    tableHeader.setForeground(corFrenteJanela);
                }
            }

            if (component instanceof Container) {
                Component[] components = ((Container) component).getComponents();
View Full Code Here

    public BugLeafNode getCurrentSelectedBugLeaf() {
        return currentSelectedBugLeaf;
    }

    public JPanel bugListPanel() {
        tableheader = new JTableHeader();
        getTableheader().setCursor(Cursor.getPredefinedCursor(Cursor.W_RESIZE_CURSOR));
        // Listener put here for when user double clicks on sorting
        // column header SorterDialog appears.
        getTableheader().addMouseListener(new MouseAdapter() {
View Full Code Here

     * priority, class, package, category, bugcode, status, and type.
     */
    private JPanel createSorterPane() {
        JPanel insidePanel = new JPanel();
        insidePanel.setLayout(new GridBagLayout());
        preview = new JTableHeader();
        Sortables[] sortables = MainFrame.getInstance().getAvailableSortables();
        preview.setColumnModel(new SorterTableColumnModel(sortables));

        for (Sortables s : sortables) {
            if (s != Sortables.DIVIDER) {
View Full Code Here

   
    public void mousePressed(MouseEvent e) {
      Point p = SwingUtilities.convertPoint(TableModelPanel.this, e
          .getPoint(), table);
      JTableHeader header = table.getTableHeader();
      int count = table.getColumnCount();
      for (int i = 0; i < count; i++) {
        Rectangle rect = header.getHeaderRect(i);
        icon = (p.x - rect.x + 8) / (rect.width / 6);
        Icon iCon = getIcon();
        if (iCon != null) {
          int x = rect.x + icon * rect.width / 6
              - iCon.getIconWidth() / 2;
View Full Code Here

   
    public void mouseReleased(MouseEvent e) {
      Point p = SwingUtilities.convertPoint(TableModelPanel.this, e
          .getPoint(), table);
      JTableHeader header = table.getTableHeader();
      int count = table.getColumnCount();
      for (int i = 0; i < count; i++) {
        Rectangle rect = header.getHeaderRect(i);
        if (p.x >= rect.x && p.x < rect.x + rect.width) {
          icon = (p.x - rect.x) / (rect.width / 6);
          Icon iCon = getIcon();
          if (iCon != null) {
            int x = rect.x + icon * rect.width / 6
View Full Code Here

   
    public void mouseMoved(MouseEvent e) {
      Point p = SwingUtilities.convertPoint(TableModelPanel.this, e
          .getPoint(), table);
      JTableHeader header = table.getTableHeader();
      int count = table.getColumnCount();
      for (int i = 0; i < count; i++) {
        Rectangle rect = header.getHeaderRect(i);
        if (p.x >= rect.x && p.x < rect.x + rect.width) {
          int lastIcon = icon;
          icon = (p.x - rect.x) / (rect.width / 6);
          Icon iCon = getIcon();
          if (iCon != null) {
View Full Code Here

{
  public void test(TestHarness harness)
  {
    DefaultTableModel tm = new DefaultTableModel(new String[] {"AA", "BB", "CC"}, 3);
    JTable t = new JTable(tm);
    JTableHeader th = t.getTableHeader();
    AccessibleContext ac = th.getAccessibleContext();
    Accessible ac0 = ac.getAccessibleChild(0);
    harness.check(ac0.getClass().getName().endsWith("AccessibleJTableHeaderEntry"));
    AccessibleContext ac0ac = ac0.getAccessibleContext();
    harness.check(ac0ac.getAccessibleChild(0), null);
    harness.check(ac0ac.getAccessibleChild(-1), null);
View Full Code Here

TOP

Related Classes of javax.swing.table.JTableHeader

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.