Berbagai Contoh BasicShapes pada JavaFX 1.3

June 1, 2010

Ini contoh berbagai shape dasar (BasicShapes) pada JavaFX 1.3

package bab8_antarmuka;

import javafx.stage.Stage;
import javafx.scene.Scene;
import javafx.scene.shape.Arc;
import javafx.scene.shape.ArcType;
import javafx.scene.paint.Color;
import javafx.scene.image.ImageView;
import javafx.scene.image.Image;
import javafx.scene.shape.Rectangle;
import javafx.scene.shape.Circle;
import javafx.scene.shape.Line;
import javafx.scene.text.Text;
import javafx.scene.text.Font;
import javafx.scene.shape.Ellipse;
import javafx.scene.shape.Polygon;
import javafx.scene.shape.CubicCurve;
import javafx.scene.Group;
import javafx.scene.shape.Polyline;
import javafx.scene.shape.QuadCurve;
import javafx.geometry.Insets;
import javafx.scene.layout.HBox;
import javafx.scene.layout.VBox;

/**
* @author bhangun
*/

var arc=Arc {
centerX: 100, centerY: 100
radiusX: 40, radiusY: 15
startAngle: 18, length: 120
type: ArcType.OPEN
fill: Color.GREEN
}
var imageView=ImageView {
image: Image {
url: “{__DIR__}myPicture.png”
}
}
var rectangle=Rectangle {
x: 10, y: 10
width: 140, height: 90
fill: Color.BLACK
} Read the rest of this entry »


Berbagai Contoh Control pada JavaFX 1.3

June 1, 2010

Ini berbagai contoh control pada JavaFX 1.3

package bab8_antarmuka;

import javafx.stage.Stage;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.control.Label;
import javafx.scene.control.ProgressBar;
import javafx.scene.control.RadioButton;
import javafx.scene.control.Slider;
import javafx.scene.control.ToggleButton;
import javafx.scene.control.PasswordBox;
import javafx.scene.control.ScrollView;
import javafx.scene.control.CheckBox;
import javafx.scene.control.ListView;
import javafx.scene.control.ProgressIndicator;
import javafx.scene.control.ScrollBar;
import javafx.scene.control.TextBox;
import javafx.scene.control.Hyperlink;
import javafx.geometry.Insets;
import javafx.scene.layout.HBox;
import javafx.scene.layout.LayoutInfo;
import javafx.scene.control.ToggleGroup;

/**
* @author bhangun
*/
var button=Button {
text: “Button”
action: function () {

}
}
var label=Label {
text: “Label:”
} Read the rest of this entry »


Berbagai contoh Layout pada JavaFX 1.3

June 1, 2010

Ini berbagai contoh layout pada JavaFX 1.3

package bab8_antarmuka;

import javafx.scene.layout.HBox;
import javafx.scene.layout.VBox;
import javafx.scene.layout.Flow;
import javafx.scene.layout.Panel;
import javafx.scene.layout.Stack;
import javafx.scene.layout.ClipView;
import javafx.scene.layout.Tile;
import javafx.scene.shape.Rectangle;
import javafx.stage.Stage;
import javafx.scene.Scene;
import javafx.scene.control.ScrollView;
import javafx.scene.layout.LayoutInfo;
import javafx.geometry.Insets;
import javafx.scene.shape.Circle;
import javafx.scene.paint.Color;
import javafx.scene.Node;
import javafx.scene.shape.Polygon;
import javafx.scene.shape.Ellipse;
import javafx.scene.shape.CubicCurve;

/**
* @author bhangun
*/
function shapes(i: Integer): Node {
var seq = [
Circle {
radius: 30  fill:Color.BLUE
},
CubicCurve {
startX: 0 startY: 50
controlX1: 25 controlY1: 0
controlX2: 75 controlY2: 100
endX: 100 endY: 50
fill:Color.RED
}, Read the rest of this entry »


Berbagai Contoh Efek pada Shape

June 1, 2010

Ini Adalah berbagai contoh efek pada JavaFX, di coba pada JavaFX 1.3

/*
* Berbagai contoh efek untuk shape
*
*/
package bab8_antarmuka;

import javafx.scene.effect.Blend;
import javafx.scene.effect.BlendMode;
import javafx.scene.effect.ColorAdjust;
import javafx.scene.effect.Flood;
import javafx.scene.paint.Color;
import javafx.scene.effect.Glow;
import javafx.scene.effect.Lighting;
import javafx.scene.effect.PerspectiveTransform;
import javafx.scene.effect.SepiaTone;
import javafx.scene.effect.Bloom;
import javafx.scene.effect.DropShadow;
import javafx.scene.effect.GaussianBlur;
import javafx.scene.effect.InnerShadow;
import javafx.scene.effect.MotionBlur;
import javafx.scene.effect.Reflection;
import javafx.scene.effect.Shadow;
import javafx.stage.Stage;
import javafx.scene.Scene;
import javafx.scene.shape.Rectangle;
import javafx.scene.layout.HBox;
import javafx.geometry.Insets;
import javafx.scene.control.ScrollView;
import javafx.scene.layout.LayoutInfo;
import javafx.scene.Node;

/**
* @author bhangun
*/
var blend = Blend {
mode: BlendMode.ADD
opacity: 0.5
} Read the rest of this entry »