もうすぐ春かな~
暖かくならないかな~
が増える新書
9784569657059
4569657052
756
JPY
¥ 756
225
63
677
35
417
ABIS_BOOK
2006-09-16
PHP研究所
PHP研究所
http://ecx.images-amazon.com/images/I/012HSX44MAL.jpg
75
45
http://ecx.images-amazon.com/images/I/21N55GX6D9L.jpg
160
96
http://ecx.images-amazon.com/images/I/414G2N42YKL.jpg
500
300
http://ecx.images-amazon.com/images/I/01592ZZJKTL.jpg
30
18
http://ecx.images-amazon.com/images/I/012HSX44MAL.jpg
75
45
http://ecx.images-amazon.com/images/I/012HSX44MAL.jpg
75
45
http://ecx.images-amazon.com/images/I/116YQHD9B0L.jpg
110
66
http://ecx.images-amazon.com/images/I/21N55GX6D9L.jpg
160
96
http://ecx.images-amazon.com/images/I/414G2N42YKL.jpg
500
300
import java.io.FileInputStream;
import javafx.data.pull.Event;
import javafx.data.pull.PullParser;
import javafx.ext.swing.SwingList;
import javafx.ext.swing.SwingListItem;
import javafx.scene.Scene;
import javafx.stage.Stage;
var list = SwingList { width: 600 height: 300 }
var myparser = PullParser {
documentType: PullParser.XML;
onEvent: function (e: Event) {
var item = SwingListItem {
text: "event {e}"
};
insert item into list.items;
}
input: new FileInputStream("/tmp/sandwich.xml");
}
myparser.parse();
Stage {
title: "XML Sandwich"
scene: Scene { content: list }
}
variables
type : Integer current Event type
typeName : String current Event name
level : Integer depth of Node
qname : QName name of XML element
text : String XML text
variable of QName (javafx.data.xml.QName)
name : String
namespaces : String
functions
getAttributeValue(qname : QName) : String
type はこんな感じで使う
if(e.type == PullParser.START_ELEMENT){
...
}
variables of PullParser
START_DOCUMENT : Integer (=7)
END_DOCUMENT : Integer (=8)
START_ELEMENT : Integer (=1)
END_ELEMENT : Integer (=2)
TEXT : Integer (=4)
qname はこんな感じで使う
if(e.qname.name.equals("bread")){
...
}
xml が
<cheese type="chedar"/>
のようになっているとき、 getAttributeValue で type の値を得る
if(e.qname.name.equals("cheese")){
var cheesetype = e.getAttributeValue(QName{name:"type"});
// cheesetype = "chedar" になる
....
}
var s : String = "";
def request : HttpRequest = HttpRequest {
location: "http://javafx.com";
onStarted: function() {
s = "started"
}
onConnecting: function() {
s = "{s}\nconnecting..."
}
onDoneConnect: function() {
s = "{s}\ndoneConnect"
}
onReadingHeaders: function() {
s = "{s}\nreadingHeaders..."
}
onResponseCode: function(code:Integer) {
s = "{s}\nresponseCode: {code}"
}
onResponseMessage: function(msg:String) {
s = "{s}\nresponseMessage: {msg}"
}
onResponseHeaders: function(headerNames: String[]) {
s = "{s}\nthere are {headerNames.size()} response headers:";
for (name in headerNames) {
s = "{s}\n {name}: {request.getResponseHeaderValue(name)}"
}
}
onToRead: function(bytes: Integer) {
s = "{s}\nbytes to read: {bytes}"
}
onRead: function(bytes: Integer) {
def progress =
if (request.toread > 0) "({(bytes * 100 / request.toread)}%)" else "";
s = "{s}\nbytes read: {bytes} {progress}";
}
onInput: function(is: java.io.InputStream) {
try {
s = "{s}\nbytes of content available: {is.available()}"
} finally {
is.close();
}
}
onException: function(ex: Exception) {
s = "exception: {ex.toString()}"
}
onDoneRead: function() {
s = "{s}\ndoneRead"
}
onDone: function() {
s = "{s}\ndone"
}
}
Stage {
title: "MyApp"
scene: Scene {
width: 400
height: 600
content:Text {
font: Font {
size: 11
}
x: 10,
y: 30
content: bind s
}
}
}
request.enqueue();
variables
input : InputStream
location : "http://javafx.com"
method : String ("GET/POST/PUT/DELETE")
output : OutputStream (only POST or PUT)
POST : String (only method = POST)
PUT : String (only method = PUT)
read : Integer (read bytes)
responseCode : Integer
responseMessage : String
toread : Integer (be expected read bytes)
towrite : Integer (going to be written bytes)
written : Integer (have been written bytes)
triggers
onStarted: function() {}
onConnecting: function() {}
onDoneConnect: function() {}
onReadingHeaders: function() {}
onResponseCode: function(code:Integer) {}
onResponseMessage: function(msg:String) {}
onResponseHeaders: function(headerNames: String[]) {}
onToRead: function(bytes: Integer) {}
onRead: function(bytes: Integer) {}
// Be sure to close the input sream when finished
onInput: function(input: java.io.InputStream) {
try {
} finally {
is.close();
}
}
onException: function(ex: Exception) {}
onDoneRead: function() {}
onDone: function() {}
import javafx.scene.control.*;
import javafx.scene.*;
import javafx.stage.*;
Stage {
scene: Scene {
content: TextBox {
text: "Hello World"
columns: 12
selectOnFocus: true
}
}
}
パラメータ値 | 実行内容 |
---|---|
BrowseNodeLookup | BrowseNodeの情報。ブラウズノードとは商品が分類されているグループの階層構造 |
CartAdd | カートに商品追加 |
CartClear | カートをクリア |
CartCreate | カートを作成 |
CartGet | カートを取得 |
CartModify | カート内の情報変更 |
CustomerContentLookup | 顧客をID検索 |
CustomerContentSearch | 顧客を検索 |
Help | HELPを表示 |
ItemLookup | ASINなどで商品を検索 |
ItemSearch | 商品名や著者名でキーワード検索 |
ListLookup | リストマニア情報をID検索 |
ListSearch | リストマニア情報を検索 |
SellerListingLookup | 特定の売り手の商品をID検索 |
SellerListingSearch | 特定の売り手の商品検索 |
SellerLookup | 売り手を検索 |
SimilarityLookup | 関連商品の検索 |
TagLookup | US only |
TransactionLookup | US only |
import javafx.animation.transition.TranslateTransition;
var node = Rectangle {
x: 100,
y: 40
width: 100,
height: 100
arcHeight: 50
arcWidth: 50
fill: Color.VIOLET
}
var transTransition = TranslateTransition {
duration : 2s
node : node
fromY : 0
toY : 200
repeatCount : 4
autoReverse : true
}
transTransition.play();