{Hakim}

Dream Runner

Arsip untuk ‘Programming’ Kategori

Five Prayer Time

Ditulis oleh Muhammad Hakim di/pada 1 November 2009 6:07 am

five-prayer-times

this application show current time & five prayer time for muslim specific for my current city (Bandung, latitude:6.54 & longitude: 107.36), with polar clock as visualization.

to compute prayer time, i use algorithm that described in this site http://tanzil.info/praytime/doc/calculation/.

source code:
Baca entri selengkapnya »

Ditulis dalam Islam, JavaFx, Programming, Tutorial | 3 Komentar »

Yet Another Simple Javafx animation

Ditulis oleh Muhammad Hakim di/pada 30 September 2009 1:04 am

tonight, i decide to add timeline and audio to my flower, to create simple animation and better UX :P :

watch the demo below:

here the (timeline & mediaplayer) code that i was added:

Timeline {
        repeatCount: Timeline.INDEFINITE
        keyFrames : [
                KeyFrame {
                        time : 30ms
                        canSkip : true
                        action: function () {
                            for (i in [0..125]){
                                //flower[i].rotate += 1 + 0.05*(125-i);
                                flower[i].rotate += 3 + 0.05*i;
                                flower[i].scaleX = 1.25 - 0.01*i;
                                flower[i].scaleY = 1.25 - 0.01*i;
                            }
                        }
                }
        ]
}.play();

MediaPlayer {
        media : Media {
                source: "http://hakimfx.googlecode.com/files/music.mp3";
        }
}.play();

Baca entri selengkapnya »

Ditulis dalam JavaFx, Programming | 1 Komentar »

Impressive mobile Quran created with LWUIT

Ditulis oleh Muhammad Hakim di/pada 9 September 2009 4:27 pm

recently i watch an application mobile holy al-Quran in YouTube, it has cool UI, check it out:

the user interface and features are created by using LWUIT , i think it worth to learn LWUIT if you’re interesting to become a mobile application developer (and so learning javafx).

next time, i will try to make it with javafx, just wait and pray for me :)

Ditulis dalam J2ME, JavaFx, JavaME, Programming | 1 Komentar »

Javafx Swine Shooter – The Source Code

Ditulis oleh Muhammad Hakim di/pada 19 Juli 2009 5:56 pm

Astaghfirullah, hampir lupa untuk ngasih source code. maaf buat semuanya :oops: :(
Masih ingat posting game sangat sederhana dengan javafx disini kan source codenya silahkan di download langsung dari link berikut:
SwineShooterzip .
source code tersebut sudah lama gak di update, kalau ada masalah, silahkan ditanyakan. jangan lupa untuk merename dari .doc menjadi .zip (itu paket file terkompresi dalam format zip, hanya diganti ekstensinya saja)

play3

Ditulis dalam JavaFx, Programming | 12 Komentar »

JavaFX Dynamic Selection Using Polygon

Ditulis oleh Muhammad Hakim di/pada 10 Juli 2009 4:30 pm

Contoh membuat seleksi map dengan menggunakan polygon, lihat demo berikut ( a video is worth more than a thousands words :P )

klik kiri untuk membuat polygon, dan klik kanan sebagai titik terakhir.
sourcecode:

package selectarea;

import javafx.stage.Stage;
import javafx.scene.Scene;
import javafx.scene.input.MouseButton;
import javafx.scene.shape.Polygon;
import javafx.scene.paint.Color;
import javafx.scene.Group;
import javafx.scene.input.MouseEvent;
import javafx.scene.image.*;

/**
 * @author Muhammad Hakim A <hakimrie[at]gmail.com>
 */

var points:Number[];
var nextpoint:Number[];
var end:Boolean = false;
var polygon = Polygon {
        points : bind [points, nextpoint];
        fill: Color.YELLOW
        stroke: Color.BLUE
        opacity: 0.5
    }
var a:String;

var group = Group {
        content: bind [ImageView {
                x: 0, y: 0
                image: Image{
                    url: "{__DIR__}mountainview.jpg"
                }

                onMouseClicked: function( e: MouseEvent ):Void {
                    var p = [e.x,e.y];
                    insert p into points;

                    if (e.button == MouseButton.SECONDARY)
                        end = true;
                }

                onMouseMoved: function( e: MouseEvent ):Void {
                    if (not end)
                        nextpoint = [e.x,e.y];
                }
            },polygon
        ]
}

Stage {
    title: "Select Area"
    width: 800
    height: 500
    scene: Scene {
        content:bind group
    }
}

Ditulis dalam JavaFx, Programming | 2 Komentar »

Harmonyfx – JavaFx Media Player

Ditulis oleh Muhammad Hakim di/pada 4 Juli 2009 11:12 am

Introduction

Before you start read the rest of the article, watch the demo below

and the longer one (with drag & drop + search demo: 4:19 minutes)

This article has been in the making a while, and has sort of become a labour of love. When I first started the sole purpose of this article was to gain a deeper understanding of some of JavaFX features APIs, (CustomNode, Storage & Resource, RESTful Web Service using HttpRequest & pullparser, Binding with java object, drag and drop, effects, animation, “3D” etc) I needed an arena in which to perform this self study, so what I decided to do was construct a workable/searchable MP3 player. The MP3 player would work of MP3 ID3 tag metadata which would be obtained using myID3 a java ID3 tag library.

In essence this is what this article is all about.

Overview
Essentially HarmonyFx (the codename ;)) looks like this. It is made up of a number of different consituent CustomNode (Custom Control),

harmonyfx
harmonyfx2

How It Is Intended to Work
I have tried to write this application in a logical manner, and I hope it works as most people would expect it to work. So without further ado, let me delve in to how I intended Harmonyfx to work.

When Harmonyfx is run it will examine the Storage (Library) and tray read all files, that previously saved, Read the metadata (ID3) tag, and arrange it in shelf (cover flow), and download the Album art based on the Album name from last.fm web service. User can add songs in the library by drag and drop folder or files into harmonyfx.

If Harmonyfx is shutdowned, the library updated again with last changed library in application.

Baca entri selengkapnya »

Ditulis dalam JavaFx, Programming | 3 Komentar »

Reversifx: Javafx Mobile Reversi – The Source Code

Ditulis oleh Muhammad Hakim di/pada 18 Juni 2009 10:33 pm

sepertinya ada yang lagi butuh source code buat demo di sini, jadinya malam ini ku publish saja source code program ini di jfxstudio, dan tentu saja juga di blog ini :) . meski jauh dari sempurna, karena sudah tidak saya sentuh lagi semenjak saya posting di blog ini beberapa waktu yang lalu, tapi insya Allah cukuplah buat yang pengen belajar dan sebagai bahan referensi :)

Reversifx

terima kasih, selamat bermalam jumat :)

Ditulis dalam JavaFx, Programming, Tutorial | Leave a Comment »