本文整理匯總了Java中org.eclipse.swt.widgets.List.setVisible方法的典型用法代碼示例。如果您正苦於以下問題:Java List.setVisible方法的具體用法?Java List.setVisible怎麽用?Java List.setVisible使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.eclipse.swt.widgets.List
的用法示例。
在下文中一共展示了List.setVisible方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: showRefs
import org.eclipse.swt.widgets.List; //導入方法依賴的package包/類
private void showRefs(Scanner input, ArrayList<String> refStrings) {
while(input.hasNext()){
String line = input.nextLine();
if (!line.equals("") && line.length() > 0)
refStrings.add(line);
}
if (refStrings.size() == 0){
MessageBox dialog =
new MessageBox(parent.getShell(), SWT.ERROR | SWT.OK);
dialog.setText("Error");
dialog.setMessage("No refactoring information was found!");
dialog.open();
} else{
list = new List(parent, SWT.BORDER | SWT.MULTI | SWT.V_SCROLL);
list.setBounds (20, 100, 250, 250);
list.setVisible(true);
for (int i = 0; i < refStrings.size(); i++) {
list.add(refStrings.get(i));
}
}
}
示例2: createDialogArea
import org.eclipse.swt.widgets.List; //導入方法依賴的package包/類
/**
* @see Dialog#createDialogArea(Composite)
*/
protected Control createDialogArea(Composite parent) {
Composite result = new Composite(parent, SWT.NONE);
result.setLayout(new GridLayout());
result.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
macList = new List(result, SWT.BORDER | SWT.MULTI );
macList.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
if (macroArray != null){
for (int i=0; i< macroArray.size(); i++){
macList.add(getLabel(macroArray.get(i)));
}
macList.pack(true);
macList.computeSize(SWT.DEFAULT, SWT.DEFAULT);
macList.setVisible(true);
}
result.setVisible(true);
macList.addDisposeListener(new DisposeListener() {
public void widgetDisposed(DisposeEvent e) {
macList = null;
}
});
return result;
}
示例3: createDialogArea
import org.eclipse.swt.widgets.List; //導入方法依賴的package包/類
/**
* @see Dialog#createDialogArea(Composite)
*/
protected Control createDialogArea(Composite parent) {
Composite result = new Composite(parent, SWT.NONE);
result.setLayout(new GridLayout());
result.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
catList = new List(result, SWT.BORDER | SWT.MULTI );
catList.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
if (categoryArray != null){
for (int i=0; i< categoryArray.size(); i++){
catList.add(getLabel(categoryArray.get(i)));
}
catList.pack(true);
catList.computeSize(SWT.DEFAULT, SWT.DEFAULT);
catList.setVisible(true);
}
result.setVisible(true);
catList.addDisposeListener(new DisposeListener() {
public void widgetDisposed(DisposeEvent e) {
catList = null;
}
});
return result;
}