本文整理匯總了Java中org.eclipse.swt.widgets.Label.setVisible方法的典型用法代碼示例。如果您正苦於以下問題:Java Label.setVisible方法的具體用法?Java Label.setVisible怎麽用?Java Label.setVisible使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.eclipse.swt.widgets.Label
的用法示例。
在下文中一共展示了Label.setVisible方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: setErrorMessageIfMergeExpressionIsNotValid
import org.eclipse.swt.widgets.Label; //導入方法依賴的package包/類
private void setErrorMessageIfMergeExpressionIsNotValid() {
for(MappingSheetRow mappingSheetRow:transformMapping.getMappingSheetRows())
{
if(mappingSheetRow.isActive()
&&mappingSheetRow.isExpression()
&&StringUtils.isNotBlank(mappingSheetRow.getMergeExpressionDataForGroupCombine().getExpression())
&&!(mappingSheetRow.getMergeExpressionDataForGroupCombine().isValid())
)
{
errorLabel=new Label( errorTableViewer.getTable(), SWT.NONE);
errorLabel.setVisible(true);
errorLabel.setText(mappingSheetRow.getMergeExpressionDataForGroupCombine().getErrorMessage()+" for Merge Expression"+mappingSheetRow.getOperationID());
errorLabelList.add(errorLabel);
}
}
}
示例2: setErrorMessageIfExpressionIsNotValid
import org.eclipse.swt.widgets.Label; //導入方法依賴的package包/類
private void setErrorMessageIfExpressionIsNotValid()
{
for(MappingSheetRow mappingSheetRow:transformMapping.getMappingSheetRows())
{
if(mappingSheetRow.isActive()
&&mappingSheetRow.isExpression()
&&StringUtils.isNotBlank(mappingSheetRow.getExpressionEditorData().getExpression())
&&!(mappingSheetRow.getExpressionEditorData().isValid())
)
{
errorLabel=new Label( errorTableViewer.getTable(), SWT.NONE);
errorLabel.setVisible(true);
errorLabel.setText(mappingSheetRow.getExpressionEditorData().getErrorMessage()+" for "+mappingSheetRow.getOperationID());
errorLabelList.add(errorLabel);
}
}
}
示例3: setErrorMessageForInvalidMapFields
import org.eclipse.swt.widgets.Label; //導入方法依賴的package包/類
private void setErrorMessageForInvalidMapFields(){
List<String> inputFieldNames = new ArrayList<String>();
for(InputField inputField:transformMapping.getInputFields()){
inputFieldNames.add(inputField.getFieldName());
}
for(int i = 0 ;i< transformMapping.getMapAndPassthroughField().size();i++){
if(!inputFieldNames.contains(transformMapping.getMapAndPassthroughField().get(i).getPropertyName())){
errorLabel=new Label( errorTableViewer.getTable(), SWT.NONE);
errorLabel.setVisible(true);
errorLabel.setText("Field '"+transformMapping.getMapAndPassthroughField().get(i).getPropertyName()+"' is not present in Input Fields");
errorLabelList.add(errorLabel);
outputFieldIndices.add(i);
}
}
for(int indices=0 ; indices<mappingTableViewer.getTable().getItemCount();indices++){
if(outputFieldIndices.contains(indices)){
mappingTableViewer.getTable().getItem(indices).setForeground(CustomColorRegistry.INSTANCE.getColorFromRegistry( 255,0,0));
}else{
mappingTableViewer.getTable().getItem(indices).setForeground(CustomColorRegistry.INSTANCE.getColorFromRegistry( 0, 0, 0));
}
}
}
示例4: setErrorMessageForDuplicateInputField
import org.eclipse.swt.widgets.Label; //導入方法依賴的package包/類
private void setErrorMessageForDuplicateInputField() {
if(!duplicateOperationInputFieldMap.isEmpty())
{
for(Map.Entry<String, List<String>> entry:duplicateOperationInputFieldMap.entrySet())
{
for(String f:entry.getValue())
{
boolean logError=true;
errorLabel=new Label( errorTableViewer.getTable(), SWT.NONE);
errorLabel.setVisible(true);
errorLabel.setText("Duplicate Operation Input Field"+" "+f +" "+"exist in"+" "+entry.getKey());
for(Label tempErrorLabel:errorLabelList) {
if(StringUtils.equalsIgnoreCase(errorLabel.getText(),tempErrorLabel.getText()))
logError=false;
}
if(logError)
errorLabelList.add(errorLabel);
}
}
}
}
示例5: setErrorMessageForDuplicateOutputField
import org.eclipse.swt.widgets.Label; //導入方法依賴的package包/類
private void setErrorMessageForDuplicateOutputField() {
Map<String,List<String>> duplicateOutputFieldMap=getDuplicateOutputFieldMap(temporaryOutputFieldMap);
if(!duplicateOutputFieldMap.isEmpty())
{ for (Map.Entry<String,List<String>> entry: duplicateOutputFieldMap.entrySet())
{
for(String f:entry.getValue())
{
boolean logError=true;
errorLabel=new Label( errorTableViewer.getTable(), SWT.NONE);
errorLabel.setVisible(true);
errorLabel.setText("Duplicate Output Field "+" "+f+" "+"exist in"+" "+entry.getKey());
for(Label tempErrorLabel:errorLabelList) {
if(StringUtils.equalsIgnoreCase(errorLabel.getText(),tempErrorLabel.getText()))
logError=false;
}
if(logError)
errorLabelList.add(errorLabel);
}
}
}
}
示例6: addErrorLabel
import org.eclipse.swt.widgets.Label; //導入方法依賴的package包/類
private void addErrorLabel(Composite container) {
Composite composite_3 = new Composite(container, SWT.NONE);
ColumnLayout cl_coposite_3 = new ColumnLayout();
cl_coposite_3.topMargin=0;
composite_3.setLayout(cl_coposite_3);
ColumnLayoutData cld_composite_3 = new ColumnLayoutData();
cld_composite_3.heightHint = 19;
composite_3.setLayoutData(cld_composite_3);
lblPropertyError = new Label(composite_3, SWT.NONE);
ColumnLayoutData cld_lblPropertyError = new ColumnLayoutData();
cld_lblPropertyError.heightHint = 25;
lblPropertyError.setLayoutData(cld_lblPropertyError);
lblPropertyError.setVisible(false);
lblPropertyError.setForeground(CustomColorRegistry.INSTANCE.getColorFromRegistry( 255, 0, 0));
}
示例7: createButtonBar
import org.eclipse.swt.widgets.Label; //導入方法依賴的package包/類
@Override
protected Control createButtonBar(Composite parent) {
final Composite buttonBar = (Composite) super.createButtonBar(parent);
errorLabel = new Label(buttonBar, SWT.LEFT);
errorLabel.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, true, 1, 1));
errorLabel.setText("There are no defined remote functions");
errorLabel.setForeground(display.getSystemColor(SWT.COLOR_RED));
errorLabel.setVisible(false);
errorLabel.setFont(topFont);
errorLabel.moveAbove(super.buttonControl);
return buttonBar;
}
示例8: createButtonBar
import org.eclipse.swt.widgets.Label; //導入方法依賴的package包/類
@Override
protected Control createButtonBar(Composite parent) {
final Composite buttonBar = (Composite) super.createButtonBar(parent);
errorLabel = new Label(buttonBar, SWT.LEFT);
errorLabel.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, false, 1, 1));
errorLabel.setText("The provided credentials are invalid");
errorLabel.setForeground(display.getSystemColor(SWT.COLOR_RED));
errorLabel.setVisible(false);
errorLabel.setFont(topFont);
errorLabel.moveAbove(super.buttonControl);
return buttonBar;
}
示例9: attachNote
import org.eclipse.swt.widgets.Label; //導入方法依賴的package包/類
private void attachNote(final Composite container) {
Label lblParameterGridNote=new Label(container, SWT.NONE);
FontData fontData = lblParameterGridNote.getFont().getFontData()[0];
Font font = new Font(lblParameterGridNote.getDisplay(), new FontData(fontData.getName(), fontData
.getHeight(), SWT.ITALIC));
lblParameterGridNote.setText("Note - New parameters will be visible only after you save the job.");
lblParameterGridNote.setFont(font);
if(!visibleParameterGirdNote)
lblParameterGridNote.setVisible(false);
}
示例10: addErrorLabel
import org.eclipse.swt.widgets.Label; //導入方法依賴的package包/類
/**
*
* @param container
*/
private void addErrorLabel(Composite container) {
lblPropertyError = new Label(container, SWT.NONE);
lblPropertyError.setLayoutData(new GridData(SWT.FILL,SWT.CENTER,true,true,0,0));
lblPropertyError.setForeground(CustomColorRegistry.INSTANCE.getColorFromRegistry( 255, 0, 0));
lblPropertyError.setText(Messages.HIVE_FIELD_DIALOG_ERROR);
lblPropertyError.setVisible(false);
lblPropertyError.setData("Error", lblPropertyError);
keyValueTableViewer.setData("Error", lblPropertyError);
}
示例11: validatePartitionKeyTable
import org.eclipse.swt.widgets.Label; //導入方法依賴的package包/類
/**
* Returns a boolean value
*
* @param viewer
*
* @param errorLabel
*
* This method will always return a boolean value to the caller.
* The viewer argument is the specific table viewer for which the user
* wants to validate the data. The errorLabel is used just for checking the present status
* like whether the calling class has already set its value or not.
*
*/
public static boolean validatePartitionKeyTable(Viewer viewer,Label errorLabel) {
errorLabel.setVisible(false);
for (HivePartitionFields row : (List<HivePartitionFields>) viewer.getInput()) {
if (errorLabel.getVisible()) {
return false;
}
for (int i = 0; i < row.getRowFields().size()- 1; i++) {
List<FilterProperties> list=(List<FilterProperties> ) viewer.getData(Constants.PARTITION_KEYS);
if (StringUtils.isBlank(row.getRowFields().get(0))) {
errorLabel.setVisible(true);
errorLabel.setText("Column " + list.get(i).getPropertyname() + " " + Messages.HIVE_FIELD_DIALOG_ERROR);
break;
} else {
if ((StringUtils.isBlank(row.getRowFields().get(i)))
&& (StringUtils.isNotBlank((row.getRowFields().get(i + 1))))) {
errorLabel.setVisible(true);
errorLabel.setText("Column " + list.get(i).getPropertyname()+ " " + Messages.HIVE_FIELD_DIALOG_ERROR);
break;
} else {
errorLabel.setVisible(false);
}
}
}
}
if (!errorLabel.getVisible()) {
return true;
}
return false;
}
示例12: attachWidget
import org.eclipse.swt.widgets.Label; //導入方法依賴的package包/類
@Override
public void attachWidget(Composite container) {
// TODO Auto-generated method stub
label = new Label(container, SWT.SEPARATOR | SWT.HORIZONTAL);
GridData gd_defaultELTLable = new GridData(SWT.LEFT, SWT.CENTER, grabExcessSpace, false, 1, 1);
gd_defaultELTLable.widthHint = lableWidth;
label.setLayoutData(gd_defaultELTLable);
label.setVisible(visible);
widget = label;
}
示例13: addErrorLabel
import org.eclipse.swt.widgets.Label; //導入方法依賴的package包/類
private void addErrorLabel(Composite container) {
Composite composite_3 = new Composite(container, SWT.NONE);
composite_3.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1));
composite_3.setLayout(new GridLayout(1, false));
lblPropertyError = new Label(composite_3, SWT.NONE);
lblPropertyError.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
lblPropertyError.setVisible(false);
lblPropertyError.setForeground(CustomColorRegistry.INSTANCE.getColorFromRegistry( 255, 0, 0));
}
示例14: addErrorLabel
import org.eclipse.swt.widgets.Label; //導入方法依賴的package包/類
private void addErrorLabel(Composite container) {
lblPropertyError = new Label(container, SWT.NONE);
lblPropertyError.setForeground(CustomColorRegistry.INSTANCE.getColorFromRegistry( 255, 0, 0));
lblPropertyError.setText(CREDENTIAL_BLANK_ERROR);
lblPropertyError.setVisible(false);
lblPropertyError.setData("Error", lblPropertyError);
}
示例15: addErrorLabel
import org.eclipse.swt.widgets.Label; //導入方法依賴的package包/類
private void addErrorLabel(Composite container) {
Composite composite_3 = new Composite(container, SWT.NONE);
composite_3.setLayout(new ColumnLayout());
ColumnLayoutData cld_composite_3 = new ColumnLayoutData();
cld_composite_3.heightHint = 72;
composite_3.setLayoutData(cld_composite_3);
lblPropertyError = new Label(composite_3, SWT.NONE);
ColumnLayoutData cld_lblPropertyError = new ColumnLayoutData();
cld_lblPropertyError.heightHint = 24;
lblPropertyError.setLayoutData(cld_lblPropertyError);
lblPropertyError.setVisible(false);
lblPropertyError.setForeground(CustomColorRegistry.INSTANCE.getColorFromRegistry( 255, 0, 0));
}