About: Image Viewer Example   Sponge Permalink

An Entity of Type : owl:Thing, within Data Space : 134.155.108.49:8890 associated with source dataset(s)

This is a simple example of an image viewer that works in JFXPad. import javafx.ui.canvas.*; import javafx.ui.*; import javax.swing.JFileChooser; import javax.swing.filechooser.FileNameExtensionFilter; class ImageLoadNode extends CompositeNode { attribute url: String; } function ImageLoadNode.composeNode() = Group { content: [View { content: Button { cursor: DEFAULT text: "Browse" action: operation() { var fc = new JFileChooser(); var filter = new FileNameExtensionFilter("Images", ["jpg", "gif", "png"]); fc.setFileFilter(filter); var returnVal = fc.showOpenDialog(null); if(returnVal == JFileChooser.APPROVE_OPTION) { url = fc.getSelectedFile().toURL().toString(); } } } }, View { transform: translate(68, 2) content: TextField { columns: 30 value: bind url } }, ImageView { transform: translat

AttributesValues
rdfs:label
  • Image Viewer Example
rdfs:comment
  • This is a simple example of an image viewer that works in JFXPad. import javafx.ui.canvas.*; import javafx.ui.*; import javax.swing.JFileChooser; import javax.swing.filechooser.FileNameExtensionFilter; class ImageLoadNode extends CompositeNode { attribute url: String; } function ImageLoadNode.composeNode() = Group { content: [View { content: Button { cursor: DEFAULT text: "Browse" action: operation() { var fc = new JFileChooser(); var filter = new FileNameExtensionFilter("Images", ["jpg", "gif", "png"]); fc.setFileFilter(filter); var returnVal = fc.showOpenDialog(null); if(returnVal == JFileChooser.APPROVE_OPTION) { url = fc.getSelectedFile().toURL().toString(); } } } }, View { transform: translate(68, 2) content: TextField { columns: 30 value: bind url } }, ImageView { transform: translat
dcterms:subject
abstract
  • This is a simple example of an image viewer that works in JFXPad. import javafx.ui.canvas.*; import javafx.ui.*; import javax.swing.JFileChooser; import javax.swing.filechooser.FileNameExtensionFilter; class ImageLoadNode extends CompositeNode { attribute url: String; } function ImageLoadNode.composeNode() = Group { content: [View { content: Button { cursor: DEFAULT text: "Browse" action: operation() { var fc = new JFileChooser(); var filter = new FileNameExtensionFilter("Images", ["jpg", "gif", "png"]); fc.setFileFilter(filter); var returnVal = fc.showOpenDialog(null); if(returnVal == JFileChooser.APPROVE_OPTION) { url = fc.getSelectedFile().toURL().toString(); } } } }, View { transform: translate(68, 2) content: TextField { columns: 30 value: bind url } }, ImageView { transform: translate(0, 25) image: Image { url: bind url } }] }; Canvas { content: ImageLoadNode { url: "http://blogs.sun.com/chrisoliver/resource/tesla.PNG" } }
Alternative Linked Data Views: ODE     Raw Data in: CXML | CSV | RDF ( N-Triples N3/Turtle JSON XML ) | OData ( Atom JSON ) | Microdata ( JSON HTML) | JSON-LD    About   
This material is Open Knowledge   W3C Semantic Web Technology [RDF Data] Valid XHTML + RDFa
OpenLink Virtuoso version 07.20.3217, on Linux (x86_64-pc-linux-gnu), Standard Edition
Data on this page belongs to its respective rights holders.
Virtuoso Faceted Browser Copyright © 2009-2012 OpenLink Software