Codota Logo
KTable
Code IndexAdd Codota to your IDE (free)

How to use
KTable
in
de.kupzog.ktable

Best Java code snippets using de.kupzog.ktable.KTable (Showing top 11 results out of 315)

  • Common ways to obtain KTable
private void myMethod () {
KTable k =
  • Codota IconComposite composite;new KTable(composite, SWT.FULL_SELECTION | SWT.MULTI | SWT.V_SCROLL| SWT.H_SCROLL| SWTX.FILL_WITH_LASTCOL| SWTX.EDIT_ON_KEY)
  • Smart code suggestions by Codota
}
origin: net.java.dev.glazedlists/glazedlists_java15

/** {@inheritDoc} */
public void listChanged(ListEvent listChanges) {
  // KTable has no fine-grained event notification,
  // so each time the data changes we'll probably break
  // selection. Hopefully we can resolve this problem
  // in the future by saving selection and adjusting it
  // as the model changes
  table.redraw();
}
origin: net.java.dev.glazedlists/glazedlists_java16

private static void createIssuesTable(Shell shell) {
  BasicEventList issuesEventList = new BasicEventList();
  Composite comp1 = new Composite(shell, SWT.NONE);
  comp1.setLayout(new FillLayout());
  final KTable table = new KTable(comp1, SWT.FULL_SELECTION | SWT.MULTI | SWT.V_SCROLL
      | SWT.H_SCROLL | SWTX.FILL_WITH_LASTCOL | SWTX.EDIT_ON_KEY);
  DefaultEventKTableModel tableModel = GlazedListsKTable.eventKTableModelWithThreadProxyList(table, issuesEventList, new IssuesTableFormat());
  table.setModel(tableModel);
  // loads issues
  final IssueLoader issueLoader = new IssueLoader(issuesEventList, new SimpleThrobber());
  issueLoader.start();
  issueLoader.setProject(Project.getProjects().get(0));
}
origin: net.java.dev.glazedlists/glazedlists_java16

/**
 * Create a new {@link EventKTableModel} that uses elements from the
 * specified {@link EventList} as rows, and the specified {@link TableFormat}
 * to divide row objects across columns.
 *
 * @param table the KTable the model is created for
 * @param source the {@link EventList}
 * @param tableFormat provides logic to divide row objects across columns.
 *      If the value implements the {@link KTableFormat} interface, those
 *      methods will be used to provide further details such as cell renderers,
 *      cell editors and row heights.
 */
public EventKTableModel(KTable table, EventList source, TableFormat tableFormat) {
  super(table, createProxyList(source, table.getDisplay()), tableFormat);
  disposeSource = (this.source != source);
}
origin: net.java.dev.glazedlists/glazedlists_java15

private static void createIssuesTable(Shell shell) {
  BasicEventList issuesEventList = new BasicEventList();
  Composite comp1 = new Composite(shell, SWT.NONE);
  comp1.setLayout(new FillLayout());
  final KTable table = new KTable(comp1, SWT.FULL_SELECTION | SWT.MULTI | SWT.V_SCROLL
      | SWT.H_SCROLL | SWTX.FILL_WITH_LASTCOL | SWTX.EDIT_ON_KEY);
  DefaultEventKTableModel tableModel = GlazedListsKTable.eventKTableModelWithThreadProxyList(table, issuesEventList, new IssuesTableFormat());
  table.setModel(tableModel);
  // loads issues
  final IssueLoader issueLoader = new IssueLoader(issuesEventList, new SimpleThrobber());
  issueLoader.start();
  issueLoader.setProject(Project.getProjects().get(0));
}
origin: net.java.dev.glazedlists/glazedlists_java15

/**
 * Create a new {@link EventKTableModel} that uses elements from the
 * specified {@link EventList} as rows, and the specified {@link TableFormat}
 * to divide row objects across columns.
 *
 * @param table the KTable the model is created for
 * @param source the {@link EventList}
 * @param tableFormat provides logic to divide row objects across columns.
 *      If the value implements the {@link KTableFormat} interface, those
 *      methods will be used to provide further details such as cell renderers,
 *      cell editors and row heights.
 */
public EventKTableModel(KTable table, EventList source, TableFormat tableFormat) {
  super(table, createProxyList(source, table.getDisplay()), tableFormat);
  disposeSource = (this.source != source);
}
origin: com.haulmont.thirdparty/glazedlists

private static void createIssuesTable(Shell shell) {
  BasicEventList issuesEventList = new BasicEventList();
  Composite comp1 = new Composite(shell, SWT.NONE);
  comp1.setLayout(new FillLayout());
  final KTable table = new KTable(comp1, SWT.FULL_SELECTION | SWT.MULTI | SWT.V_SCROLL
      | SWT.H_SCROLL | SWTX.FILL_WITH_LASTCOL | SWTX.EDIT_ON_KEY);
  EventKTableModel tableModel = new EventKTableModel(table, issuesEventList, new IssuesTableFormat());
  table.setModel(tableModel);
  // loads issues
  final IssueLoader issueLoader = new IssueLoader(issuesEventList, new SimpleThrobber());
  issueLoader.start();
  issueLoader.setProject(Project.getProjects().get(0));
}
origin: net.java.dev.glazedlists/glazedlists_java15

  /**
   * Create a new {@link DefaultEventKTableModel} that uses elements from the
   * specified {@link EventList} as rows, and the specified {@link TableFormat}
   * to divide row objects across columns.
   *
   * <p>The returned model is <strong>not thread-safe</strong>. Unless otherwise
   * noted, all methods are only safe to be called from the SWT event handler thread.
   * </p>
   *
   * @param table the KTable the model is created for
   * @param source the {@link EventList}
   * @param tableFormat provides logic to divide row objects across columns.
   *      If the value implements the {@link KTableFormat} interface, those
   *      methods will be used to provide further details such as cell renderers,
   *      cell editors and row heights.
   */
  public static DefaultEventKTableModel eventKTableModelWithThreadProxyList(KTable table, EventList source, TableFormat tableFormat) {
    final EventList proxySource = GlazedListsSWT.createSwtThreadProxyListWithLock(source, table.getDisplay());
    return new DefaultEventKTableModel(table, proxySource, tableFormat, true);
  }
}
origin: net.java.dev.glazedlists/glazedlists_java16

/** {@inheritDoc} */
@Override
public void listChanged(ListEvent listChanges) {
  // KTable has no fine-grained event notification,
  // so each time the data changes we'll probably break
  // selection. Hopefully we can resolve this problem
  // in the future by saving selection and adjusting it
  // as the model changes
  table.redraw();
}
origin: net.java.dev.glazedlists/glazedlists_java16

  /**
   * Create a new {@link DefaultEventKTableModel} that uses elements from the
   * specified {@link EventList} as rows, and the specified {@link TableFormat}
   * to divide row objects across columns.
   *
   * <p>The returned model is <strong>not thread-safe</strong>. Unless otherwise
   * noted, all methods are only safe to be called from the SWT event handler thread.
   * </p>
   *
   * @param table the KTable the model is created for
   * @param source the {@link EventList}
   * @param tableFormat provides logic to divide row objects across columns.
   *      If the value implements the {@link KTableFormat} interface, those
   *      methods will be used to provide further details such as cell renderers,
   *      cell editors and row heights.
   */
  public static DefaultEventKTableModel eventKTableModelWithThreadProxyList(KTable table, EventList source, TableFormat tableFormat) {
    final EventList proxySource = GlazedListsSWT.createSwtThreadProxyListWithLock(source, table.getDisplay());
    return new DefaultEventKTableModel(table, proxySource, tableFormat, true);
  }
}
origin: com.haulmont.thirdparty/glazedlists

/** {@inheritDoc} */
public void listChanged(ListEvent listChanges) {
  // KTable has no fine-grained event notification,
  // so each time the data changes we'll probably break
  // selection. Hopefully we can resolve this problem
  // in the future by saving selection and adjusting it
  // as the model changes
  table.redraw();
}
origin: com.haulmont.thirdparty/glazedlists

/**
 * Create a new {@link EventKTableModel} that uses elements from the
 * specified {@link EventList} as rows, and the specified {@link TableFormat}
 * to divide row objects across columns.
 *
 * @param tableFormat provides logic to divide row objects across columns.
 *      If the value implements the {@link KTableFormat} interface, those
 *      methods will be used to provide further details such as cell renderers,
 *      cell editors and row heights.
 */
public EventKTableModel(KTable table, EventList source, TableFormat tableFormat) {
  this.table = table;
  this.swtThreadSource = GlazedListsSWT.swtThreadProxyList(source, table.getDisplay());
  // this TableFormat supports KTable directly
  if(tableFormat instanceof KTableFormat) {
    this.kTableFormat = (KTableFormat)tableFormat;
  // adapt a regular TableFormat for use with KTable
  } else {
    this.kTableFormat = new TableFormatKTableFormat(tableFormat);
  }
  // listen for events on the SWT display thread
  swtThreadSource.addListEventListener(this);
}
de.kupzog.ktableKTable

Most used methods

  • <init>
  • getDisplay
  • redraw
  • setModel

Popular in Java

  • Reading from database using SQL prepared statement
  • addToBackStack (FragmentTransaction)
  • setRequestProperty (URLConnection)
    Sets the general request property. If a property with the key already exists, overwrite its value wi
  • getContentResolver (Context)
  • Pointer (com.sun.jna)
    An abstraction for a native pointer data type. A Pointer instance represents, on the Java side, a na
  • Runnable (java.lang)
    Represents a command that can be executed. Often used to run code in a different Thread.
  • LinkedHashMap (java.util)
    Hash table and linked list implementation of the Map interface, with predictable iteration order. Th
  • Collectors (java.util.stream)
  • Stream (java.util.stream)
    A sequence of elements supporting sequential and parallel aggregate operations. The following exampl
  • JList (javax.swing)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now