本文整理了Java中org.eclipse.swt.widgets.Tree.addControlListener()
方法的一些代码示例,展示了Tree.addControlListener()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Tree.addControlListener()
方法的具体详情如下:
包路径:org.eclipse.swt.widgets.Tree
类名称:Tree
方法名:addControlListener
暂无
代码示例来源:origin: org.eclipse.platform/org.eclipse.ui.views
tree.addControlListener(new ControlAdapter() {
@Override
public void controlResized(ControlEvent e) {
代码示例来源:origin: org.eclipse/org.eclipse.ui.views
/**
* Add columns to the tree and set up the layout manager accordingly.
*/
private void addColumns() {
// create the columns
TreeColumn[] columns = tree.getColumns();
for (int i = 0; i < columnLabels.length; i++) {
String string = columnLabels[i];
if (string != null) {
TreeColumn column;
if (i < columns.length) {
column = columns[i];
} else {
column = new TreeColumn(tree, 0);
}
column.setText(string);
}
}
tree.addControlListener(new ControlAdapter() {
public void controlResized(ControlEvent e) {
Rectangle area = tree.getClientArea();
TreeColumn[] columns = tree.getColumns();
if (area.width > 0) {
columns[0].setWidth(area.width * 40 / 100);
columns[1].setWidth(area.width - columns[0].getWidth() - 4);
tree.removeControlListener(this);
}
}
});
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.ui.views
tree.addControlListener(new ControlAdapter() {
@Override
public void controlResized(ControlEvent e) {
代码示例来源:origin: org.apache.directory.studio/ldapbrowser.common
tree.addControlListener( new ControlAdapter()
内容来源于网络,如有侵权,请联系作者删除!