当前位置: 首页>>代码示例>>Java>>正文


Java HtmlCanvas._form方法代码示例

本文整理汇总了Java中org.rendersnake.HtmlCanvas._form方法的典型用法代码示例。如果您正苦于以下问题:Java HtmlCanvas._form方法的具体用法?Java HtmlCanvas._form怎么用?Java HtmlCanvas._form使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.rendersnake.HtmlCanvas的用法示例。


在下文中一共展示了HtmlCanvas._form方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getForm

import org.rendersnake.HtmlCanvas; //导入方法依赖的package包/类
@Override
public HtmlCanvas getForm() throws IOException {
    HtmlCanvas html = new HtmlCanvas();
    html.div(id("NewWaitTrigger").class_(""));
        html.form(id("newTriggersForm"));
            html.input(id("type").name("type").class_("form-control m-t")
                        .hidden("true").value("Wait"));
            html.input(class_("inputBox temperature form-control m-t")
                    .type("number").add("step", "any")
                    .add("placeholder", Messages.MINUTES)
                    .name(WAITTIMEMINS).value(""));
            html.input(class_("inputBox temperature form-control m-t")
                    .type("number").add("step", "any")
                    .add("placeholder", Messages.SECS)
                    .name(WAITTIMESECS).value(""));
            html.input(class_("inputBox form-control m-t")
                .name(NOTES).value("")
                .add("placeholder", Messages.NOTES)
                .value(this.note));
            html.button(name("submitWait")
                    .class_("btn btn-primary col-md-12")
                    .add("data-toggle", "clickover")
                    .onClick("submitNewTriggerStep(this);"))
                .write(Messages.ADD_TRIGGER)
            ._button();
        html._form();
    html._div();
    return html;
}
 
开发者ID:DougEdey,项目名称:SB_Elsinore_Server,代码行数:30,代码来源:WaitTrigger.java

示例2: getEditForm

import org.rendersnake.HtmlCanvas; //导入方法依赖的package包/类
@Override
public HtmlCanvas getEditForm() throws IOException {
    HtmlCanvas html = new HtmlCanvas();
    html.div(id("EditWaitTrigger").class_(""));
        html.form(id("editTriggersForm"));
            html.input(id("type").name("type")
                    .hidden("true").value("Wait"));
            html.input(id("type").name("position")
                    .hidden("position").value("" + this.position));
            html.input(class_("inputBox temperature form-control")
                    .type("number").add("step", "any")
                    .add("placeholder", Messages.MINUTES)
                    .name(WAITTIMEMINS)
                    .value(Double.toString(this.minutes)));
            html.input(class_("inputBox temperature form-control")
                    .type("number").add("step", "any")
                    .add("placeholder", Messages.SECS)
                    .name(WAITTIMESECS)
                    .value(Double.toString(this.seconds)));
            html.input(class_("inputBox form-control")
                .name(NOTES).value("")
                .add("placeholder", Messages.NOTES)
                .value(this.note));
            html.button(name("submitWait")
                    .class_("btn col-md-12")
                    .add("data-toggle", "clickover")
                    .onClick("updateTriggerStep(this);"))
                .write(Messages.ADD_TRIGGER)
            ._button();
        html._form();
    html._div();
    return html;
}
 
开发者ID:DougEdey,项目名称:SB_Elsinore_Server,代码行数:34,代码来源:WaitTrigger.java

示例3: getForm

import org.rendersnake.HtmlCanvas; //导入方法依赖的package包/类
/**
 * Get the Form HTML Canvas representing a temperature trigger.
 * @return {@link org.rendersnake.HtmlCanvas} representing the input form.
 * @throws IOException when the HTMLCanvas could not be created.
 */
@Override
public final HtmlCanvas getForm() throws IOException {
    HtmlCanvas html = new HtmlCanvas(new PrettyWriter());
    html.div(id("NewTempTrigger").class_(""));
        html.form(id("newTriggersForm"));
            html.input(id("type").name("type").class_("form-control m-t")
                    .hidden("true").value("Temperature"));
            html.input(id("type").name("position").class_("form-control m-t")
                    .hidden("position").value("" + this.position));
            html.input(class_("inputBox temperature form-control m-t")
                    .type("number").add("step", "any")
                    .add("placeholder", Messages.SET_POINT)
                    .name("targetTemperature").value(""));
            html.input(class_("inputBox temperature form-control m-t")
                .type("number").add("step", "any")
                .add("placeholder", Messages.END_TEMP)
                .name("exitTemperature").value(""));
            html.input(class_("inputBox form-control m-t")
                    .name("method").value("")
                    .add("placeholder", Messages.METHOD));
            html.input(class_("inputBox form-control m-t")
                    .name("stepType").value("")
                    .add("placeholder", Messages.TYPE));
         // Add the on/off values
            html.select(class_("form-control m-t").name("mode")
                    .id("mode"));
                html.option(value(""))
                        .write("")
                ._option();
                html.option(value(TemperatureTrigger.INCREASE))
                    .write(TemperatureTrigger.INCREASE)
                ._option();
                html.option(value(TemperatureTrigger.DECREASE))
                    .write(TemperatureTrigger.DECREASE)
                ._option();
            html._select();
            html.button(name("submitTemperature")
                    .class_("btn btn-primary m-t col-md-12")
                    .add("data-toggle", "clickover")
                    .onClick("submitNewTriggerStep(this);"))
                .write(Messages.ADD_TRIGGER)
            ._button();
        html._form();
    html._div();
    return html;
}
 
开发者ID:DougEdey,项目名称:SB_Elsinore_Server,代码行数:52,代码来源:TemperatureTrigger.java

示例4: getEditForm

import org.rendersnake.HtmlCanvas; //导入方法依赖的package包/类
/**
 * Get the Form HTML Canvas representing a temperature trigger.
 * @return {@link org.rendersnake.HtmlCanvas} representing the input form.
 * @throws IOException when the HTMLCanvas could not be created.
 */
@Override
public final HtmlCanvas getEditForm() throws IOException {
    HtmlCanvas html = new HtmlCanvas(new PrettyWriter());
    html.div(id("EditTempTrigger").class_(""));
        html.form(id("editTriggersForm"));
            html.input(id("type").name("type")
                        .hidden("true").value("Temperature"));
            html.input(id("type").name("position")
                .hidden("position").value("" + this.position));
            html.input(class_("inputBox temperature form-control")
                .type("number").add("step", "any")
                .add("placeholder", Messages.SET_POINT)
                .value(this.targetTemp.toPlainString())
                .name("targetTemperature"));
            html.input(class_("inputBox temperature form-control")
                .type("number").add("step", "any")
                .add("placeholder", Messages.END_TEMP)
                .value(this.targetTemp.toPlainString())
                .name("exitTemperature"));
            html.input(class_("inputBox form-control")
                .name("method").value("")
                .value(this.method)
                .add("placeholder", Messages.METHOD));
            html.input(class_("inputBox form-control")
                .name("stepType").value("")
                .value(this.type)
                .add("placeholder", Messages.TYPE));
            // Add the on/off values
            html.select(class_("holo-spinner").name("mode")
                    .id("mode"));
                html.option(value(""))
                        .write("")
                ._option();
                html.option(value(TemperatureTrigger.INCREASE)
                        .selected_if(
                            this.mode.equals(TemperatureTrigger.INCREASE)))
                    .write(TemperatureTrigger.INCREASE)
                ._option();
                html.option(value(TemperatureTrigger.DECREASE)
                        .selected_if(
                            this.mode.equals(TemperatureTrigger.DECREASE)))
                    .write(TemperatureTrigger.DECREASE)
                ._option();
            html._select();
            html.button(name("submitTemperature")
                    .class_("btn col-md-12")
                    .add("data-toggle", "clickover")
                    .onClick("updateTriggerStep(this);"))
                .write(Messages.ADD_TRIGGER)
            ._button();
        html._form();
    html._div();
    return html;
}
 
开发者ID:DougEdey,项目名称:SB_Elsinore_Server,代码行数:60,代码来源:TemperatureTrigger.java

示例5: getForm

import org.rendersnake.HtmlCanvas; //导入方法依赖的package包/类
/**
 * @return The HTML elements for this form.
 * @throws IOException if the form could not be created.
 */
@Override
public final HtmlCanvas getForm() throws IOException {
    HtmlCanvas html = new HtmlCanvas();
    html.div(id("NewSwitchTrigger").class_(""));
    html.form(id("newTriggersForm"));
        html.input(id("type").name("type")
                    .hidden("true").value("Switch"));
        // Add the Switches as a drop down list.
        html.select(class_("holo-spinner").name("switchname")
                .id("switchName"));
            html.option(value(""))
                    .write(Messages.SWITCHES)
            ._option();
            for (Switch tSwitch : LaunchControl.switchList) {
                String tName = tSwitch.getName();
                html.option(value(tName))
                    .write(tName)
                ._option();
            }
        html._select();

        // Add the on/off values
        html.select(class_("holo-spinner").name("activate")
                .id("activate"));
            html.option(value(""))
                    .write("")
            ._option();
            html.option(value("on"))
                .write(Messages.SWITCH_ON)
            ._option();
            html.option(value("off"))
                .write(Messages.SWITCH_OFF)
            ._option();
        html._select();

        html.button(name("submitSwitchTrigger")
                .class_("btn col-md-12")
                .add("data-toggle", "clickover")
                .onClick("submitNewTriggerStep(this);"))
            .write(Messages.ADD_TRIGGER)
        ._button();
    html._form();
    html._div();
    return html;
}
 
开发者ID:DougEdey,项目名称:SB_Elsinore_Server,代码行数:50,代码来源:SwitchTrigger.java

示例6: getEditForm

import org.rendersnake.HtmlCanvas; //导入方法依赖的package包/类
/**
 * @return The HTML elements for this form.
 * @throws IOException if the form could not be created.
 */
@Override
public final HtmlCanvas getEditForm() throws IOException {
    HtmlCanvas html = new HtmlCanvas();
    html.div(id("EditSwitchTrigger").class_(""));
    html.form(id("editTriggersForm"));
        html.input(id("type").name("type").class_("form-control m-t")
                    .hidden("true").value("switch"));
        html.input(id("type").name("position").class_("form-control m-t")
                .hidden("position").value("" + this.position));
        // Add the Switches as a drop down list.
        html.select(class_("form-control m-t").name(SWITCHNAME)
                .id("switchName"));
            html.option(value(""))
                    .write(Messages.SWITCHES)
            ._option();
            for (Switch tSwitch : LaunchControl.switchList) {
                String tName = tSwitch.getName();
                html.option(value(tName)
                        .selected_if(this.switchName.equals(tName)))
                    .write(tName)
                ._option();
            }
        html._select();

        // Add the on/off values
        html.select(class_("form-control m-t").name("activate")
                .id("activate"));
            html.option(value(""))
                    .write("")
            ._option();
            html.option(value(Messages.SWITCH_ON)
                    .selected_if(this.activate.equals("on")))
                .write("On")
            ._option();
            html.option(value(Messages.SWITCH_OFF)
                    .selected_if(this.activate.equals("off")))
                .write("Off")
            ._option();
        html._select();

        html.button(name("submitSwitchTrigger")
                .class_("btn btn-primary col-md-12")
                .add("data-toggle", "clickover")
                .onClick("updateTriggerStep(this);"))
            .write(Messages.EDIT)
        ._button();
    html._form();
    html._div();
    return html;
}
 
开发者ID:DougEdey,项目名称:SB_Elsinore_Server,代码行数:55,代码来源:SwitchTrigger.java

示例7: getForm

import org.rendersnake.HtmlCanvas; //导入方法依赖的package包/类
/**
 * @return The HTML elements for this form.
 * @throws IOException if the form could not be created.
 */
@Override
public final HtmlCanvas getForm() throws IOException {
    HtmlCanvas html = new HtmlCanvas();
    html.div(id("NewTriggerTrigger").class_(""));
    html.form(id("newTriggersForm"));
        html.input(id("type").name("type").class_("form-control m-t")
                    .hidden("true").value("Profile"));
        // Add the probe as a drop down list.
        html.select(class_("form-control m-t").name(TARGET_NAME)
                .id(TARGET_NAME));
            html.option(value(""))
                    .write("Target Probe")
            ._option();
            for (Temp tTemp: LaunchControl.tempList) {
                String tName = tTemp.getName();
                html.option(value(tName))
                    .write(tName)
                ._option();
            }
        html._select();

        // Add the on/off values
        html.select(class_("form-control m-t").name(ACTIVATE)
                .id(ACTIVATE));
            html.option(value(""))
                    .write("")
            ._option();
            html.option(value(ACTIVATE))
                .write(Messages.ACTIVATE)
            ._option();
            html.option(value(DISABLE))
                .write(Messages.DISABLE)
            ._option();
        html._select();

        html.button(name("submitTriggerTrigger")
                .class_("btn btn-primary col-md-12")
                .add("data-toggle", "clickover")
                .onClick("submitNewTriggerStep(this);"))
            .write(Messages.ADD_TRIGGER)
        ._button();
    html._form();
    html._div();
    return html;
}
 
开发者ID:DougEdey,项目名称:SB_Elsinore_Server,代码行数:50,代码来源:ProfileTrigger.java

示例8: getEditForm

import org.rendersnake.HtmlCanvas; //导入方法依赖的package包/类
/**
 * @return The HTML elements for this form.
 * @throws IOException if the form could not be created.
 */
@Override
public final HtmlCanvas getEditForm() throws IOException {
    HtmlCanvas html = new HtmlCanvas();
    html.div(id("NewTriggerTrigger").class_(""));
    html.form(id("newTriggersForm"));
        html.input(id(TYPE).name(TYPE)
                    .hidden("true").value("Profile"));
        html.input(id("type").name(POSITION)
                .hidden(POSITION).value(this.position));
        // Add the triggers as a drop down list.
        html.select(class_("holo-spinner").name(TARGET_NAME)
                .id(TARGET_NAME));
            html.option(value(""))
                    .write("Target Probe")
            ._option();
            for (Temp tTemp: LaunchControl.tempList) {
                String tName = tTemp.getName();
                html.option(value(tName))
                    .write(tName)
                ._option();
            }
        html._select();

        // Add the on/off values
        html.select(class_("holo-spinner").name(ACTIVATE)
                .id(ACTIVATE));
            html.option(value(""))
                    .write("")
            ._option();
            html.option(value(ACTIVATE)
                    .selected_if(this.activate))
                .write(Messages.ACTIVATE)
            ._option();
            html.option(value(DISABLE)
                    .selected_if(!this.activate))
                .write(Messages.DISABLE)
            ._option();
        html._select();

        html.button(name("submitTempTrigger")
                .class_("btn col-md-12")
                .add("data-toggle", "clickover")
                .onClick("updateTriggerStep(this);"))
            .write(Messages.EDIT)
        ._button();
    html._form();
    html._div();
    return html;
}
 
开发者ID:DougEdey,项目名称:SB_Elsinore_Server,代码行数:54,代码来源:ProfileTrigger.java


注:本文中的org.rendersnake.HtmlCanvas._form方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。