Package javax.swing.table

Examples of javax.swing.table.JTableHeader


{
  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.getAccessibleName(), "AA");
    ac0ac.setAccessibleName("AAx");
View Full Code Here


    test2(harness);
  }
 
  public void test1(TestHarness harness)
  {
    JTableHeader th = new JTableHeader();
    AccessibleContext ac = th.getAccessibleContext();
    harness.check(ac.getAccessibleName(), null);
    harness.check(ac.getAccessibleRole(), AccessibleRole.PANEL);
    harness.check(ac.getAccessibleChildrenCount(), 0);
    harness.check(ac.getAccessibleChild(0), null);
   
    AccessibleComponent acomp = ac.getAccessibleComponent();
    harness.check(acomp.getBackground(), th.getBackground());
  }
View Full Code Here

    tc0.setHeaderValue("XYZ0");
    tcm.addColumn(tc0);
    tcm.addColumn(new TableColumn(1, 20));
    tcm.addColumn(new TableColumn(2, 30));
    JTable t = new JTable(tm, tcm);
    JTableHeader th = t.getTableHeader();
    AccessibleContext ac = th.getAccessibleContext();
    harness.check(ac.getAccessibleName(), null);
    harness.check(ac.getAccessibleRole(), AccessibleRole.PANEL);
    harness.check(ac.getAccessibleChildrenCount(), 3);

    AccessibleContext he0 = ac.getAccessibleChild(0).getAccessibleContext();
View Full Code Here

    harness.check(c.getMaxWidth(), Integer.MAX_VALUE);
    harness.check(c.getPreferredWidth(), 75);
    harness.check(c.getWidth(), 75);
   
    JTable t = new JTable();
    JTableHeader h = t.getTableHeader();
    JComponent r = (JComponent) h.getDefaultRenderer();
    r.setMinimumSize(new Dimension(13, 5));
    r.setMaximumSize(new Dimension(999, 99));
    r.setPreferredSize(new Dimension(34, 21));
    c.setHeaderRenderer((TableCellRenderer) r);
    harness.check(c.getMinWidth(), 15);
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"));
    Accessible ac0B = ac.getAccessibleChild(0);
    harness.check(ac0 != ac0B);   // creates new instance every time
  }
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();
    harness.check(ac.getAccessibleChildrenCount(), 3);   
  }
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();
    harness.check(ac.getAccessibleRole(), AccessibleRole.PANEL);   
  }
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"));
    AccessibleComponent ac0ac = ac0.getAccessibleContext().getAccessibleComponent();
    harness.check(ac0ac.isVisible(), true);
 
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"));
    AccessibleValue ac0av = ac0.getAccessibleContext().getAccessibleValue();
    harness.check(ac0av, 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.getAccessibleIndexInParent(), 0);
 
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.