• 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏吧

Java StaticTextItem类的典型用法和代码示例

java 2次浏览

本文整理汇总了Java中com.smartgwt.client.widgets.form.fields.StaticTextItem的典型用法代码示例。如果您正苦于以下问题:Java StaticTextItem类的具体用法?Java StaticTextItem怎么用?Java StaticTextItem使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。

StaticTextItem类属于com.smartgwt.client.widgets.form.fields包,在下文中一共展示了StaticTextItem类的17个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: createEntryConditionEditCanvas

点赞 3

import com.smartgwt.client.widgets.form.fields.StaticTextItem; //导入依赖的package包/类
private Canvas createEntryConditionEditCanvas() {
    StaticTextItem labelItem = createLabelItem(i18n.enterCondition());
    
    OverUndershootSelectionData data = controller.getOverUndershootEntryConditions();
    SelectItem entryOperatorItem = createOperatorItem(data, GREATER_THAN_INT);
    entryOperatorItem.addChangedHandler(createEntryOperatorChangedHandler());
    entryOperatorItem.setWidth(EDIT_ITEMS_WIDTH);

    TextItem entryValueItem = createValueItem();
    entryValueItem.addChangedHandler(createEntryValueChangedHandler());
    entryValueItem.setWidth(EDIT_ITEMS_WIDTH);
    declareAsRequired(entryValueItem);
    
    StaticTextItem entryUnitItem = createStaticUnitItem(data);
    entryUnitItem.setWidth(EDIT_ITEMS_WIDTH);
    
    FormItem[] items = new FormItem[] { labelItem, entryOperatorItem, entryValueItem, entryUnitItem };
    entryConditionForm = assembleEditConditionForm(items);
    return alignVerticalCenter(entryConditionForm);
}
 

开发者ID:52North,
项目名称:SensorWebClient,
代码行数:21,
代码来源:OverUndershootRuleTemplate.java

示例2: createExitConditionEditCanvas

点赞 3

import com.smartgwt.client.widgets.form.fields.StaticTextItem; //导入依赖的package包/类
private Canvas createExitConditionEditCanvas() {
    StaticTextItem labelItem = createLabelItem(i18n.exitCondition());

    OverUndershootSelectionData data = controller.getOverUndershootExitConditions();
    exitOperatorItem = createOperatorItem(data, LESS_THAN_OR_EQUAL_TO_INT);
    exitOperatorItem.addChangedHandler(createExitOperatorChangedHandler());
    exitOperatorItem.setWidth(EDIT_ITEMS_WIDTH);

    exitValueItem = createValueItem();
    exitValueItem.addChangedHandler(createExitValueChangedHandler());
    exitValueItem.setWidth(EDIT_ITEMS_WIDTH);
    declareAsRequired(exitValueItem);

    StaticTextItem exitUnitItem = createStaticUnitItem(data);
    exitUnitItem.setWidth(EDIT_ITEMS_WIDTH);
    
    FormItem[] items = new FormItem[] { labelItem, exitOperatorItem, exitValueItem, exitUnitItem };
    exitConditionForm = assembleEditConditionForm(items);
    return alignVerticalCenter(exitConditionForm);
}
 

开发者ID:52North,
项目名称:SensorWebClient,
代码行数:21,
代码来源:OverUndershootRuleTemplate.java

示例3: createEditConditionCanvas

点赞 3

import com.smartgwt.client.widgets.form.fields.StaticTextItem; //导入依赖的package包/类
private Canvas createEditConditionCanvas() {
        StaticTextItem label = createLabelItem(i18n.sensorFailure());

        SelectItem unitItem = createUnitsItem();
        unitItem.addChangedHandler(createEntryUnitChangedHandler());
        unitItem.setValueMap(createTimeunitsMap());
        unitItem.setWidth(2 * EDIT_ITEMS_WIDTH);
        
        TextItem valueItem = createValueItem();
        valueItem.addChangedHandler(createValueChangedHandler());
        valueItem.setWidth(EDIT_ITEMS_WIDTH);
        valueItem.setRequired(true);
//        valueItem.setKeyPressFilter("[0-9]+(\\.|,)[0-9]+");
        
        FormItem[] formItems = new FormItem[] { label, unitItem, valueItem };
        conditionForm = assembleEditConditionForm(formItems);
        return alignVerticalCenter(conditionForm);
    }
 

开发者ID:52North,
项目名称:SensorWebClient,
代码行数:19,
代码来源:SensorLossRuleTemplate.java

示例4: WelcomeLayout

点赞 3

import com.smartgwt.client.widgets.form.fields.StaticTextItem; //导入依赖的package包/类
/**
 * Instantiates a welcome layout.
 */
public WelcomeLayout() {
    super(i18n.welcomeText());
    this.scClassName = "VLayout";
    
    SpacerItem spacerItem = new SpacerItem();
    spacerItem.setHeight(20);

    this.welcomeText = new StaticTextItem("welcomeText");
    this.welcomeText.setShowTitle(false);
    this.welcomeText.setValue("");
    
    this.roleText = new StaticTextItem("roleText");
    this.roleText.setShowTitle(false);
    this.roleText.setValue("");
    
    this.form.setFields(this.headerItem, spacerItem, spacerItem, this.welcomeText, spacerItem, this.roleText);
    // add to mainLayout
    addMember(this.form);
}
 

开发者ID:52North,
项目名称:SensorWebClient,
代码行数:23,
代码来源:WelcomeLayout.java

示例5: createActorSelector

点赞 2

import com.smartgwt.client.widgets.form.fields.StaticTextItem; //导入依赖的package包/类
Widget createActorSelector() {
    
    DynamicForm form = new DynamicForm(); 
    form.setWidth100();
    form.setNumCols(2); 
    
    // Hacky way to create a label in a form....
    StaticTextItem actorLabel = new StaticTextItem("actor-label");
    actorLabel.setShowTitle(false);
    actorLabel.setColSpan(2);
    actorLabel.setAlign(Alignment.LEFT);
    actorLabel.setValue("Choose Actor:");
    
    String[] names = {
        "Simulator", 
        "Alice", 
        "Bob", 
        "Charlie", 
        "Dave", 
        "E-Mail System"
    };

    actorSelector.setWidth(130);
    actorSelector.setShowTitle(false);
    actorSelector.setValueMap(names);
    actorSelector.setMultiple(false);
                   
    form.setFields(actorLabel, actorSelector);
    
    // Preselect the first name
    actorSelector.setValue(names[0]);
    
    return form;
}
 

开发者ID:will-gilbert,
项目名称:OSWf-OSWorkflow-fork,
代码行数:35,
代码来源:SimulatorControls.java

示例6: createForm

点赞 2

import com.smartgwt.client.widgets.form.fields.StaticTextItem; //导入依赖的package包/类
private DynamicForm createForm() {
    DynamicForm f = new DynamicForm();
    f.setWidth(400);
    f.setBrowserSpellCheck(false);
    f.setNumCols(1);
    f.setTitleOrientation(TitleOrientation.TOP);
    f.setSaveOnEnter(true);

    TextItem user = new TextItem(USERNAME, i18nSgwt.dialog_UserNameTitle());
    user.setRequired(true);
    user.setWidth("*");
    user.setReadOnlyDisplay(ReadOnlyDisplayAppearance.STATIC);

    PasswordItem passwd = new PasswordItem(PASSWORD, i18nSgwt.dialog_PasswordTitle());
    passwd.setRequired(true);
    passwd.setWidth("*");

    TextItem producerCode = new TextItem(PRODUCER_CODE, i18n.LoginWindow_ProducerCode());
    producerCode.setWidth("*");
    producerCode.setReadOnlyDisplay(ReadOnlyDisplayAppearance.STATIC);

    StaticTextItem error = new StaticTextItem(ERROR);
    error.setShowTitle(false);
    error.setShowErrorText(true);

    f.setItems(user, producerCode, passwd, error);
    f.addSubmitValuesHandler(new SubmitValuesHandler() {

        @Override
        public void onSubmitValues(SubmitValuesEvent event) {
            submitCredentials();
        }
    });
    return f;
}
 

开发者ID:proarc,
项目名称:proarc,
代码行数:36,
代码来源:LoginWindow.java

示例7: createTextItem

点赞 2

import com.smartgwt.client.widgets.form.fields.StaticTextItem; //导入依赖的package包/类
/**
 * Create a StaticTextItem with a common style.
 * 
 * @param name
 * @param title
 * @return
 */
private StaticTextItem createTextItem(String name, String title) {
    StaticTextItem item = new StaticTextItem(name);
    item.setTitle(title);
    item.setWrap(false);
    item.setWidth(100);

    return item;
}
 

开发者ID:SHARP-HTP,
项目名称:phenotype-portal,
代码行数:16,
代码来源:PhenotypeDateRange.java

示例8: createItem

点赞 2

import com.smartgwt.client.widgets.form.fields.StaticTextItem; //导入依赖的package包/类
private StaticTextItem createItem(String title, String value) {

        StaticTextItem staticTextItem = new StaticTextItem();
        staticTextItem.setTitle(title);
        staticTextItem.setWrap(true);
        staticTextItem.setWrapTitle(false);
        staticTextItem.setDefaultValue(value);
        staticTextItem.setEscapeHTML(true);
        staticTextItem.setVAlign(VerticalAlignment.CENTER);

        return staticTextItem;

    }
 

开发者ID:SHARP-HTP,
项目名称:phenotype-portal,
代码行数:14,
代码来源:FileInfoTab.java

示例9: createStaticUnitItem

点赞 2

import com.smartgwt.client.widgets.form.fields.StaticTextItem; //导入依赖的package包/类
private StaticTextItem createStaticUnitItem(OverUndershootSelectionData data) {
    StaticTextItem unitItem = new StaticTextItem();
    unitItem.setTitle(i18n.unit());
    unitItem.setTitleOrientation(TOP);
    TimeseriesLegendData unitOfMeasure = controller.getTimeSeries();
    unitItem.setValue(unitOfMeasure.getUnitOfMeasure());
    data.setUnit(unitOfMeasure.getUnitOfMeasure());
    return unitItem;
}
 

开发者ID:52North,
项目名称:SensorWebClient,
代码行数:10,
代码来源:OverUndershootRuleTemplate.java

示例10: createStationInfo

点赞 2

import com.smartgwt.client.widgets.form.fields.StaticTextItem; //导入依赖的package包/类
private Canvas createStationInfo() {
    TimeseriesLegendData timeSeries = controller.getTimeSeries();
    StaticTextItem stationName = createStationNameItem(timeSeries);
    StaticTextItem parameter = createPhenomenonItem(timeSeries);
    HeaderItem header = createHeaderItem();
    DynamicForm form = createStationInfoForm();
    form.setFields(header, stationName, parameter);
    return form;
}
 

开发者ID:52North,
项目名称:SensorWebClient,
代码行数:10,
代码来源:EventSubscriptionWindow.java

示例11: UserDataSource

点赞 2

import com.smartgwt.client.widgets.form.fields.StaticTextItem; //导入依赖的package包/类
public UserDataSource() {
    setID(ID);

    ClientMessages i18n = GWT.create(ClientMessages.class);

    setDataURL(RestConfig.URL_USER);

    DataSourceIntegerField userId = new DataSourceIntegerField(FIELD_ID);
    userId.setPrimaryKey(true);
    userId.setCanEdit(false);
    userId.setHidden(true);
    userId.setTitle(i18n.UsersView_ListHeader_Id_Title());

    DataSourceTextField userName = new DataSourceTextField(FIELD_USERNAME);
    userName.setCanEdit(false);
    userName.setRequired(true);
    userName.setReadOnlyEditorProperties(new StaticTextItem());
    userName.setTitle(i18n.UsersView_ListHeader_Username_Title());
    userName.setPrompt(i18n.UsersView_ListHeader_Username_Hint());

    DataSourcePasswordField passwd = new DataSourcePasswordField(FIELD_PASSWORD);
    passwd.setHidden(true);
    passwd.setTitle(i18n.UsersView_ListHeader_Password_Title());

    DataSourceTextField surname = new DataSourceTextField(UserResourceApi.USER_SURNAME);
    surname.setRequired(true);
    surname.setTitle(i18n.UsersView_ListHeader_Surname_Title());

    DataSourceTextField forename = new DataSourceTextField(UserResourceApi.USER_FORENAME);
    forename.setTitle(i18n.UsersView_ListHeader_Forename_Title());

    DataSourceTextField email = new DataSourceTextField(UserResourceApi.USER_EMAIL);
    email.setTitle(i18n.UsersView_ListHeader_Email_Title());

    DataSourceTextField home = new DataSourceTextField(UserResourceApi.USER_HOME);
    home.setCanEdit(false);
    home.setReadOnlyEditorProperties(new StaticTextItem());
    home.setHidden(true);
    home.setTitle(i18n.UsersView_ListHeader_Home_Title());

    DataSourceDateTimeField created = new DataSourceDateTimeField(UserResourceApi.USER_CREATED);
    created.setCanEdit(false);
    created.setTitle(i18n.UsersView_ListHeader_Created_Title());
    created.setDateFormatter(DateDisplayFormat.TOEUROPEANSHORTDATETIME);

    DataSourceTextField remoteName = new DataSourceTextField(UserResourceApi.USER_REMOTENAME);
    remoteName.setTitle(i18n.UsersView_ListHeader_RemoteName_Title());
    remoteName.setCanEdit(false);
    remoteName.setHidden(true);

    DataSourceTextField remoteType = new DataSourceTextField(UserResourceApi.USER_REMOTETYPE);
    remoteType.setTitle(i18n.UsersView_ListHeader_RemoteType_Title());
    remoteType.setCanEdit(false);
    remoteType.setHidden(true);

    setFields(userId, userName, passwd, surname, forename, email, created, remoteName, remoteType, home);

    setOperationBindings(RestConfig.createAddOperation(), RestConfig.createUpdateOperation());
    setRequestProperties(RestConfig.createRestRequest(getDataFormat()));
}
 

开发者ID:proarc,
项目名称:proarc,
代码行数:61,
代码来源:UserDataSource.java

示例12: createForm

点赞 2

import com.smartgwt.client.widgets.form.fields.StaticTextItem; //导入依赖的package包/类
private Widget createForm() {
    taskForm = new DynamicForm();
    taskForm.setDataSource(WorkflowTaskDataSource.getInstance());
    taskForm.setNumCols(3);
    taskForm.setColWidths("*", "*", "*");
    taskForm.setTitleOrientation(TitleOrientation.TOP);
    taskForm.setItemHoverWidth(300);

    StaticTextItem jobLabel = new StaticTextItem(WorkflowTaskDataSource.FIELD_JOB_LABEL);
    jobLabel.setColSpan("*");
    jobLabel.setWidth("*");
    jobLabel.setShowTitle(false);
    jobLabel.setReadOnlyTextBoxStyle(Editor.CSS_HEADER_INSIDE_FORM);
    jobLabel.setTextBoxStyle(Editor.CSS_HEADER_INSIDE_FORM);

    final SelectItem owner = new SelectItem(WorkflowTaskDataSource.FIELD_OWNER);
    owner.setOptionDataSource(UserDataSource.getInstance());
    owner.setValueField(UserDataSource.FIELD_ID);
    owner.setDisplayField(UserDataSource.FIELD_USERNAME);
    owner.setWidth("*");
    owner.setValidators(new RequiredIfValidator(requiredFunc));

    TextAreaItem note = new TextAreaItem(WorkflowTaskDataSource.FIELD_NOTE);
    note.setStartRow(true);
    note.setColSpan("*");
    note.setWidth("*");

    // title tooltip is broken in SmartGWT 4.0
    final FormItemIcon taskHelpIcon = new FormItemIcon();
    taskHelpIcon.setSrc("[SKIN]/actions/help.png");
    taskHelpIcon.setTabIndex(-1);
    taskHelpIcon.setNeverDisable(true);
    taskHelpIcon.setShowIfCondition(new FormItemIfFunction() {

        @Override
        public boolean execute(FormItem item, Object value, DynamicForm form) {
            String hint = taskForm.getValueAsString(WorkflowTaskDataSource.FIELD_HINT);
            taskHelpIcon.setPrompt(hint);
            return hint != null;
        }
    });
    TextItem label = new TextItem(WorkflowTaskDataSource.FIELD_LABEL);
    label.setWidth("*");
    label.setIcons(taskHelpIcon);

    stateItem = new SelectItem(WorkflowTaskDataSource.FIELD_STATE);
    stateItem.addChangedHandler(new ChangedHandler() {

        @Override
        public void onChanged(ChangedEvent event) {
            owner.redraw();
            paramForm.markForRedraw();
        }
    });

    taskForm.setFields(jobLabel,
            label,
            owner,
            stateItem,
            new TextItem(WorkflowTaskDataSource.FIELD_CREATED),
            new TextItem(WorkflowTaskDataSource.FIELD_MODIFIED),
            new SelectItem(WorkflowTaskDataSource.FIELD_PRIORITY),
            note);
    return taskForm;
}
 

开发者ID:proarc,
项目名称:proarc,
代码行数:66,
代码来源:WorkflowTaskFormView.java

示例13: createPageNumberUi

点赞 2

import com.smartgwt.client.widgets.form.fields.StaticTextItem; //导入依赖的package包/类
private void createPageNumberUi() {
    formPageNumber = createForm();

    allowPageNumbers = new CheckboxItem("fillPageNumbers", i18n.PageMetadataEditor_CheckboxPageNubers_Title());
    allowPageNumbers.setStartRow(true);
    allowPageNumbers.setColSpan("*");
    allowPageNumbers.setShowTitle(false);

    PageNumberChangeHandler pageNumberChangeHandler = new PageNumberChangeHandler();

    integerStartValidator = new IntegerRangeValidator();
    integerStartValidator.setMin(0);
    integerStartValidator.setMax(1000000);
    romanStartValidator = new RegExpValidator(
            "^[1-9][0-9]{0,6}$"
            + "|^[mM]{0,6}([cC][mM]|[cC][dD]|[dD]?[cC]{0,3})([xX][cC]|[xX][lL]|[lL]?[xX]{0,3})([iI][xX]|[iI][vV]|[vV]?[iI]{0,3})$");
    alphabetStartValidator = new RegExpValidator("^[a-zA-Z]{0,6}$");
    numberStartRequired = new RequiredIfValidator(new RequiredIfFunction() {

        @Override
        public boolean execute(FormItem formItem, Object value) {
            return true;
        }
    });
    numberStart = new TextItem("numberStart", i18n.PageMetadataEditor_NumberStartValue_Title());
    numberStart.addChangedHandler(pageNumberChangeHandler);

    prefix = new TextItem("prefix", i18n.PageMetadataEditor_NumberPrefix_Title());
    prefix.setLength(20);
    prefix.addChangedHandler(pageNumberChangeHandler);

    suffix = new TextItem("suffix", i18n.PageMetadataEditor_NumberSuffix_Title());
    suffix.setLength(20);
    suffix.addChangedHandler(pageNumberChangeHandler);

    integerIncrementValidator = new IntegerRangeValidator();
    integerIncrementValidator.setMin(-1000);
    integerIncrementValidator.setMax(1000);
    numberIncrement = new IntegerItem("numberIncrement", i18n.PageMetadataEditor_NumberIncrement_Title());
    numberIncrement.addChangedHandler(pageNumberChangeHandler);
    numberIncrement.setRequired(true);
    numberIncrement.setValidators(integerIncrementValidator);

    numberExample = new StaticTextItem("numberExample", i18n.PageMetadataEditor_NumberPreview_Title());
    numberExample.setClipValue(true);
    numberExample.setWidth(120); // enforce clip value

    seriesType = new SelectItem("seriesType", i18n.PageMetadataEditor_NumberSeriesType_Title());
    seriesType.setValueMap(ARABIC_SERIES, ROMAN_UPPER_SERIES,
            ROMAN_LOWER_SERIES, ALPHABET_UPPER_SERIES, ALPHABET_LOWER_SERIES);
    seriesType.setDefaultValue(ARABIC_SERIES);
    seriesType.setValue(ARABIC_SERIES);
    seriesType.addChangedHandler(new ChangedHandler() {

        @Override
        public void onChanged(ChangedEvent event) {
            setSequenceType(seriesType.getValueAsString());
        }
    });

    allowPageNumbers.addChangedHandler(new DisableStateHandler(
            prefix, numberStart, numberIncrement, suffix, seriesType, numberExample));
}
 

开发者ID:proarc,
项目名称:proarc,
代码行数:64,
代码来源:PageMetadataEditor.java

示例14: UserRoleRequestForm

点赞 2

import com.smartgwt.client.widgets.form.fields.StaticTextItem; //导入依赖的package包/类
public UserRoleRequestForm() {
    super();

    setMargin(5);

    setCellPadding(6);
    setWidth100();
    setHeight(75);
    setTitleOrientation(titleOrientation);
    // setAutoFocus(true);
    setNumCols(5);
    setAlign(Alignment.LEFT);

    setIsGroup(true);
    setGroupTitle("User Request");

    setAlign(Alignment.LEFT);

    i_userName = new StaticTextItem();
    i_userName.setWidth(WIDGET_WIDTH);
    i_userName.setTitle(TITLE_USER_NAME);
    i_userName.setAlign(Alignment.LEFT);

    i_firstName = new StaticTextItem();
    i_firstName.setWidth(WIDGET_WIDTH);
    i_firstName.setTitle(TITLE_FIRST_NAME);
    i_firstName.setAlign(Alignment.LEFT);

    i_lastName = new StaticTextItem();
    i_lastName.setWidth(WIDGET_WIDTH);
    i_lastName.setTitle(TITLE_LAST_NAME);
    i_lastName.setAlign(Alignment.LEFT);

    i_email = new StaticTextItem();
    i_email.setWidth(WIDGET_WIDTH);
    i_email.setTitle(TITLE_EMAIL);
    i_email.setAlign(Alignment.LEFT);

    i_requestDate = new StaticTextItem();
    i_requestDate.setWidth(WIDGET_WIDTH);
    i_requestDate.setTitle(TITLE_REQUEST_DATE);
    i_requestDate.setAlign(Alignment.LEFT);

    setFields(i_userName, i_firstName, i_lastName, i_email, i_requestDate);
}
 

开发者ID:SHARP-HTP,
项目名称:phenotype-portal,
代码行数:46,
代码来源:UserRoleRequestForm.java

示例15: createStationNameItem

点赞 2

import com.smartgwt.client.widgets.form.fields.StaticTextItem; //导入依赖的package包/类
private StaticTextItem createStationNameItem(TimeseriesLegendData timeSeries) {
    StaticTextItem stationName = new StaticTextItem();
    stationName.setTitle(i18n.station());
    stationName.setValue(timeSeries.getStationName());
    return stationName;
}
 

开发者ID:52North,
项目名称:SensorWebClient,
代码行数:7,
代码来源:EventSubscriptionWindow.java

示例16: createPhenomenonItem

点赞 2

import com.smartgwt.client.widgets.form.fields.StaticTextItem; //导入依赖的package包/类
private StaticTextItem createPhenomenonItem(TimeseriesLegendData timeSeries) {
    StaticTextItem parameter = new StaticTextItem();
    parameter.setTitle(i18n.phenomenon());
    parameter.setValue(timeSeries.getPhenomenonId());
    return parameter;
}
 

开发者ID:52North,
项目名称:SensorWebClient,
代码行数:7,
代码来源:EventSubscriptionWindow.java

示例17: createLabelItem

点赞 2

import com.smartgwt.client.widgets.form.fields.StaticTextItem; //导入依赖的package包/类
protected StaticTextItem createLabelItem(String labelText) {
    StaticTextItem labelItem = new StaticTextItem();
    labelItem.setTitle(labelText);
    labelItem.setValue("");
    return labelItem;
}
 

开发者ID:52North,
项目名称:SensorWebClient,
代码行数:7,
代码来源:SubscriptionTemplate.java


版权声明:本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系管理员进行删除。
喜欢 (0)