javaquery/demo-calculator-dynamic/src/main/java/org/apidesign/bck2brwsr/demo/calc/HistoryImpl.java
author Jaroslav Tulach <jaroslav.tulach@apidesign.org>
Sun, 31 Mar 2013 12:26:07 +0200
branchmodel
changeset 910 52cb50cea1df
child 915 b219134a2782
permissions -rw-r--r--
Introducing History model class with two defined properties and one derived
jaroslav@910
     1
/**
jaroslav@910
     2
 * Back 2 Browser Bytecode Translator
jaroslav@910
     3
 * Copyright (C) 2012 Jaroslav Tulach <jaroslav.tulach@apidesign.org>
jaroslav@910
     4
 *
jaroslav@910
     5
 * This program is free software: you can redistribute it and/or modify
jaroslav@910
     6
 * it under the terms of the GNU General Public License as published by
jaroslav@910
     7
 * the Free Software Foundation, version 2 of the License.
jaroslav@910
     8
 *
jaroslav@910
     9
 * This program is distributed in the hope that it will be useful,
jaroslav@910
    10
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
jaroslav@910
    11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
jaroslav@910
    12
 * GNU General Public License for more details.
jaroslav@910
    13
 *
jaroslav@910
    14
 * You should have received a copy of the GNU General Public License
jaroslav@910
    15
 * along with this program. Look for COPYING file in the top folder.
jaroslav@910
    16
 * If not, see http://opensource.org/licenses/GPL-2.0.
jaroslav@910
    17
 */
jaroslav@910
    18
package org.apidesign.bck2brwsr.demo.calc;
jaroslav@910
    19
jaroslav@910
    20
import org.apidesign.bck2brwsr.htmlpage.api.ComputedProperty;
jaroslav@910
    21
import org.apidesign.bck2brwsr.htmlpage.api.Model;
jaroslav@910
    22
import org.apidesign.bck2brwsr.htmlpage.api.Property;
jaroslav@910
    23
jaroslav@910
    24
/**
jaroslav@910
    25
 *
jaroslav@910
    26
 * @author Jaroslav Tulach <jtulach@netbeans.org>
jaroslav@910
    27
 */
jaroslav@910
    28
@Model(className = "History", properties = {
jaroslav@910
    29
    @Property(name = "value", type = double.class),
jaroslav@910
    30
    @Property(name = "operation", type = String.class)
jaroslav@910
    31
})
jaroslav@910
    32
public class HistoryImpl {
jaroslav@910
    33
    @ComputedProperty
jaroslav@910
    34
    static String resultOf(String operation) {
jaroslav@910
    35
        return "result of " + operation;
jaroslav@910
    36
    }
jaroslav@910
    37
}