ViewerPage.java 文件源码

java
阅读 25 收藏 0 点赞 0 评论 0

项目:com.onpositive.prefeditor 作者:
protected void createFilterControls(Composite con) {
    Label filterLabel = new Label(con,SWT.NONE);
    filterLabel.setText("Filter:");
    GridDataFactory.swtDefaults().applyTo(filterLabel);
    Text filterText = new Text(con, SWT.BORDER);
    filterText.setMessage("(" + PreferenceFilter.MIN_FILTER_CHARS + " chars at least)");
    filterText.addModifyListener(event -> {
        filterChanged(filterText.getText());
    });
    GridDataFactory.fillDefaults().grab(true,false).applyTo(filterText);
    Button clearBtn = new Button(con, SWT.PUSH);
    clearBtn.setImage(AbstractUIPlugin.imageDescriptorFromPlugin(PrefEditorPlugin.PLUGIN_ID,"icons/clear.gif").createImage());
    GridDataFactory.swtDefaults().applyTo(clearBtn);
    clearBtn.addSelectionListener(new SelectionAdapter() {

        @Override
        public void widgetSelected(SelectionEvent e) {
            filterText.setText("");
            filterChanged("");
        }

    });
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号