<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    鍵盤上的舞者

    像寫情書一樣Coding...
    隨筆 - 20, 文章 - 0, 評論 - 15, 引用 - 0
    數(shù)據(jù)加載中……

    2010年2月25日

    Node的屬性改變后通知屬性表單(Propertites Sheet)更新

    Node API提供了一個方法在Node屬性集變化時通知注冊在其上的監(jiān)聽器更新。
    protected final void firePropertySetsChange(Node.PropertySet[] o, Node.PropertySet[] n)

    如圖,精靈動畫就是一個自定義的Node,當使用鼠標將Node從A點拖拽到B點時,Node坐標已經(jīng)改變,可以調(diào)用Node的firePropertySetsChange()方法通知屬性表單(Propertites Sheet)更新顯示。


    因為firePropertySetsChange()是個受保護(protected)的方法,如果需要在Node的外部調(diào)用,還可以包裝在自定義的公共(public)方法里。
    public void notifySheetChange(){
        firePropertySetsChange(
    null, Sheet.createDefault().toArray());
    }

    posted @ 2011-03-06 22:15 陳維 閱讀(1244) | 評論 (1)編輯 收藏

    使用TopComponent群組

    TopComponent群組的作用是在打開一個TopComponent組件的同時,打開其他相關(guān)的TopComponent組件。例如,當打開或者激活GUI編輯器的時候,“組件面板”、“屬性”窗口和“檢查器”窗口都會出現(xiàn)。當需要一個組件同時伴隨著很多其他類似于組件面板窗口的時候,利用TopComponent群組可以輕松實現(xiàn)一個組件的激活引發(fā)其他組件被打開或者被選中。

    定義群組涉及到2XML文件。首先是wsgrp,它代表“窗口系統(tǒng)群組(Window System Group)”。它定義了“窗口系統(tǒng)”的群組,系統(tǒng)根據(jù)它的定義查找對應(yīng)的目錄,它也定義了群組是否應(yīng)該在啟動時打開。另一個文件是wstcgrp,它代表“窗口系統(tǒng)TopComponent群組(Window System TopComponent Group)”,這個文件通過ID識別單態(tài)的TopComponent組件,同時還定義了一些群組的打開和關(guān)閉屬性。

    TopComponent群組編程實例

    首先創(chuàng)建一個模塊項目TopComponentGroup然后新建2個窗口組件(TopComponent),命名為EditorTopComponentSatelliteTopComponent,就像窗口的名字所表示的那樣,SatelliteTopComponent將會隨著EditorTopComponent的打開和關(guān)閉一同打開和關(guān)閉。

    首先新建一個名為EditorGroupWsgrpxml文件,這個文件里定義了名為EditorGroup的編輯器窗口群組。
    <group version="2.0">
        
    <module name="org.jqueen.nb.topcomponentgroup" spec="1.0" />
        
    <name unique="EditorGroup" />
        
    <state opened="false" />
    </group>

    再新建一個名為SatelliteTopComponentWstcgrp的xml文件,在這個文件里可以通過ID識別出SatelliteTopComponent組件
    <tc-group version="2.0">
        
    <tc-id id="SatelliteTopComponent" />
        
    <open-close-behavior open="true" close="true" />
    </tc-group>

    編輯模塊的layer.xml文件,在系統(tǒng)文件系統(tǒng)中的Windows2目錄添加一個Group文件夾,將名為"EditorGroup"的群組添加進Group。
    <folder name="Groups">
        
    <file name="EditorGroup.wsgrp" url="EditorGroupWsgrp.xml"/>
        
    <folder name="EditorGroup">
            
    <file name="SatelliteTopComponent.wstcgrp" url="SatelliteTopComponentWstcgrp.xml"/>
        
    </folder>
    </folder>

    編輯EditorTopComponent內(nèi)容,重寫TopComponent類的componentOpened()和componentClosed()方法,在EditorTopComponent被打開和關(guān)閉時打開和關(guān)閉名為"EditorGroup"的群組。
        @Override
        
    protected void componentOpened() {
            TopComponentGroup group 
    = WindowManager.getDefault().findTopComponentGroup("EditorGroup");
            
    if (group != null) {
                group.open();
            }
        }

        @Override
        
    public void componentClosed() {
            TopComponentGroup group 
    = WindowManager.getDefault().findTopComponentGroup("EditorGroup");
            
    if (group != null) {
                group.close();
            }
        }

    至此,就完成了一個TopComponent群組的編輯。執(zhí)行模塊項目,當從窗口菜單中打開EditorTopComponent時SatelliteTopComponent會自動打開,EditorTopComponent被關(guān)閉時SatelliteTopComponent也會自動關(guān)閉。

    樣例程序下載

    posted @ 2010-08-07 22:46 陳維 閱讀(1586) | 評論 (0)編輯 收藏

    JavaFX進行HTTP Basic認證

    最近用JavaFX寫一個應(yīng)用調(diào)用Internet上的開放API時需要進行HTTP Basic認證,JavaFX提供了一個類HttpRequest用于發(fā)送Web服務(wù)的請求,類HttpHeader顧名思義就是用來表示HTTP請求的"Header"了。HttpHeader提供了一個很方便的方法用來創(chuàng)建HTTP Basic認證需要的用戶名和密碼"Header":
    public basicAuth(username: java.lang.String, password: java.lang.String) : HttpHeader
    下面就看一下如何使用JavaFX編寫進行HTTP Basic認證的代碼:
    // var user = "user";
    // var password = "password";
    HttpRequest{
        location: 
    // url
        headers: HttpHeader.basicAuth(user, password)
        
    // 
    }.start();

    posted @ 2010-04-25 02:49 陳維 閱讀(1510) | 評論 (0)編輯 收藏

    本公司的幾個開發(fā)類職位的招聘(上海)

    有興趣的朋友可以先給我發(fā)簡歷,謝謝謝謝謝謝謝謝。
    chenweionline#hotmail.com

    公司基本信息可以訪問
    www.jaiziworld.com
    www.ccjoy.com

    51job上的發(fā)布鏈接
    http://search.51job.com/list/co,c,2088688,0000,10,1.html

    Java/JavaFX富客戶端應(yīng)用開發(fā)工程師

    崗位職責:
    在Java平臺上進行網(wǎng)絡(luò)游戲相關(guān)客戶端產(chǎn)品的研發(fā)。

    任職要求:
    1.Java SE基礎(chǔ)扎實,了解常用設(shè)計模式并且能夠在開發(fā)過程用適當?shù)膽?yīng)用;
    2.熟悉AWT/Swing,Java 2D,JavaFX,NetBeans Platform編程技術(shù);
    3.誠實守信,具有良好的團隊合作精神,具有迎接挑戰(zhàn)的信心和對工作的激情。

    優(yōu)先條件:
    1.熟悉游戲相關(guān)業(yè)務(wù)或者有相關(guān)游戲、編輯器工具開發(fā)經(jīng)驗者;
    2.熟悉JavaScript,Flash/Flex,Silverlight等其他RIA開發(fā)技術(shù);
    3.熟悉Java ME,Android,Windows Mobile,Symbian,iPhone等移動技術(shù)平臺開發(fā)。


    Java服務(wù)器端開發(fā)工程師

    崗位職責:
    1.具備良好的分析解決問題能力,能獨立承擔任務(wù)和有系統(tǒng)進度把控能力;
    2.負責網(wǎng)絡(luò)游戲服務(wù)器端應(yīng)用邏輯的編寫,分布式系統(tǒng)的架構(gòu)設(shè)計;
    3.編寫相關(guān)的開發(fā)文檔;
    4.與項目組美術(shù)與策劃人員深入溝通,準確實現(xiàn)開發(fā)需求。

    任職要求:
    1.熟悉Java語言,熟練掌握J2EE相關(guān)技術(shù);
    2.熟悉常用設(shè)計模式、數(shù)據(jù)結(jié)構(gòu)、算法;
    3.熟練使用:eclipse、PowerDesigner、UML建模、Word、Excel等常用開發(fā)工具。

    優(yōu)先條件:
    1.熟悉游戲相關(guān)業(yè)務(wù)或者有相關(guān)開發(fā)經(jīng)驗者。


    移動設(shè)備應(yīng)用開發(fā)工程師

    崗位職責:
    1.在主流的移動平臺上開發(fā)互聯(lián)網(wǎng)服務(wù)產(chǎn)品。

    任職要求:
    1.可以熟練使用JavaME,Android或iPhone平臺編程技術(shù)進行開發(fā)。

    優(yōu)先條件:
    1.2年以上移動平臺應(yīng)用開發(fā)經(jīng)驗;
    2.具有個人作品者優(yōu)先。


    游戲算法研發(fā)工程師

    崗位職責:
    1.從事網(wǎng)絡(luò)游戲相關(guān)的技術(shù)研發(fā)和算法優(yōu)化工作。

    任職要求:
    1.數(shù)學、人工智能或計算機專業(yè)碩士以上學歷,數(shù)學基礎(chǔ)扎實;
    2.熟悉圖像處理、模式識別、計算機視覺等方面的知識;
    3.熟練掌握數(shù)值計算相關(guān)理論和方法,對算法的并行處理和優(yōu)化有經(jīng)驗的優(yōu)先;
    4.能夠編寫技術(shù)文檔。

    優(yōu)先條件:
    1.熟悉Java語言優(yōu)先

    posted @ 2010-04-15 15:24 陳維 閱讀(255) | 評論 (0)編輯 收藏

    JavaFX開發(fā)模仿Mac OS的MagicalDock(魚眼效果)

    launch
    MagicalDock修改了上個版本的設(shè)計,目前的思路是使用2個容器類Container和Flow完成布局,F(xiàn)low為Node提供水平布局,Container是Flow的容器。
    當鼠標移動到Node上,Node大小變化時會改變Flow的尺寸范圍,這時動態(tài)調(diào)整Flow在Container中的位置完成水平位移效果并且將錨定Node的底部使一組Node在變化時都能夠底線對齊。

    posted @ 2010-04-09 17:58 陳維 閱讀(1969) | 評論 (2)編輯 收藏

    SOSHaiti(Preview) - Game In JavaFX

    開發(fā)中的一個版本,先睹為快,希望有更多的開發(fā)者關(guān)注JavaFX技術(shù)。

    2010年3月22日更新:
    1.修正游戲結(jié)束時不顯示得分的BUG
    2.增加一個Menu菜單,在游戲進行中可暫停游戲
    3.添加物體間的碰撞特性(使用JBox2D)

    posted @ 2010-03-12 22:25 陳維 閱讀(1984) | 評論 (6)編輯 收藏

    JavaFX編譯器編譯重載方法的一處BUG

    直接看測試代碼吧,一共2個類:BugTest.fx和A.fx,SDK版本是1.2.3。
    /*
     * BugTest.fx
     *
     * Created on 2010-2-25, 22:05:11
     
    */
    package org.jqueen.fx.bug;

    /**
     * 
    @author Leon
     
    */
    public class BugTest {

    // 取消該方法注釋編譯將拋出異常
    //    function test(a: A): Void {
    //        test(5);
    //    }

        function test(s: String): Void {
            test(
    5);
        }

        function test(i: Integer): Void {
        }

    }
    /*
     * A.fx
     *
     * Created on 2010-2-25, 22:10:45
     
    */

    package org.jqueen.fx.bug;

    /**
     * 
    @author Leon
     
    */

    public mixin class A {}
    BugTest里實現(xiàn)了3個帶輸入?yún)?shù)的重載方法,第一個方法的參數(shù)是自定義類型A,A被聲明為mixin,后2個的參數(shù)是原始類型。只有在第一個方法被注釋的情況下該類才可以被編譯通過,否則編譯器會拋出異常:
    An exception has occurred in the OpenJavafx compiler. Please file a bug at the Openjfx-compiler issues home (https://openjfx-compiler.dev.java.net/Issues) after checking for duplicates. Include the following diagnostic in your report and, if possible, the source code which triggered this problem.  Thank you.
    java.lang.ClassCastException: com.sun.tools.javac.code.Symbol$ClassSymbol
            at com.sun.tools.javafx.code.JavafxTypes.asSuper(JavafxTypes.java:202)
            at com.sun.tools.javac.code.Types.isSubtypeUnchecked(Types.java:305)
            at com.sun.tools.javafx.comp.JavafxResolve.argumentsAcceptable(JavafxResolve.java:421)
            at com.sun.tools.javafx.comp.JavafxResolve.rawInstantiate(JavafxResolve.java:387)
            at com.sun.tools.javafx.comp.JavafxResolve.selectBest(JavafxResolve.java:711)
            at com.sun.tools.javafx.comp.JavafxResolve.findMemberWithoutAccessChecks(JavafxResolve.java:952)
            at com.sun.tools.javafx.comp.JavafxResolve.findMember(JavafxResolve.java:906)
            at com.sun.tools.javafx.comp.JavafxResolve.findMember(JavafxResolve.java:886)
            at com.sun.tools.javafx.comp.JavafxResolve.findVar(JavafxResolve.java:567)
            at com.sun.tools.javafx.comp.JavafxResolve.findIdent(JavafxResolve.java:1228)
            at com.sun.tools.javafx.comp.JavafxResolve.resolveIdent(JavafxResolve.java:1423)
            at com.sun.tools.javafx.comp.JavafxAttr.visitIdent(JavafxAttr.java:506)
            at com.sun.tools.javafx.tree.JFXIdent.accept(JFXIdent.java:52)
            at com.sun.tools.javafx.comp.JavafxAttr.attribTree(JavafxAttr.java:280)
            at com.sun.tools.javafx.comp.JavafxAttr.attribTree(JavafxAttr.java:265)
            at com.sun.tools.javafx.comp.JavafxAttr.attribExpr(JavafxAttr.java:311)
            at com.sun.tools.javafx.comp.JavafxAttr.visitFunctionInvocation(JavafxAttr.java:2239)
            at com.sun.tools.javafx.tree.JFXFunctionInvocation.accept(JFXFunctionInvocation.java:53)
            at com.sun.tools.javafx.comp.JavafxAttr.attribTree(JavafxAttr.java:280)
            at com.sun.tools.javafx.comp.JavafxAttr.attribTree(JavafxAttr.java:265)
            at com.sun.tools.javafx.comp.JavafxAttr.attribExpr(JavafxAttr.java:303)
            at com.sun.tools.javafx.comp.JavafxAttr.visitBlockExpression(JavafxAttr.java:1373)
            at com.sun.tools.javafx.tree.JFXBlock.accept(JFXBlock.java:83)
            at com.sun.tools.javafx.comp.JavafxAttr.attribTree(JavafxAttr.java:280)
            at com.sun.tools.javafx.comp.JavafxAttr.attribTree(JavafxAttr.java:265)
            at com.sun.tools.javafx.comp.JavafxAttr.attribExpr(JavafxAttr.java:311)
            at com.sun.tools.javafx.comp.JavafxAttr.finishFunctionDefinition(JavafxAttr.java:1863)
            at com.sun.tools.javafx.comp.JavafxMemberEnter$SymbolCompleter.complete(JavafxMemberEnter.java:646)
            at com.sun.tools.javac.code.Symbol.complete(Symbol.java:400)
            at com.sun.tools.javafx.comp.JavafxAttr.visitFunctionDefinition(JavafxAttr.java:1658)
            at com.sun.tools.javafx.tree.JFXFunctionDefinition.accept(JFXFunctionDefinition.java:93)
            at com.sun.tools.javafx.comp.JavafxAttr.attribTree(JavafxAttr.java:280)
            at com.sun.tools.javafx.comp.JavafxAttr.attribTree(JavafxAttr.java:265)
            at com.sun.tools.javafx.comp.JavafxAttr.attribExpr(JavafxAttr.java:321)
            at com.sun.tools.javafx.comp.JavafxMemberEnter$SymbolCompleter.complete(JavafxMemberEnter.java:643)
            at com.sun.tools.javac.code.Symbol.complete(Symbol.java:400)
            at com.sun.tools.javafx.comp.JavafxResolve.findMemberWithoutAccessChecks(JavafxResolve.java:943)
            at com.sun.tools.javafx.comp.JavafxResolve.findMember(JavafxResolve.java:906)
            at com.sun.tools.javafx.comp.JavafxResolve.findMember(JavafxResolve.java:886)
            at com.sun.tools.javafx.comp.JavafxResolve.findVar(JavafxResolve.java:567)
            at com.sun.tools.javafx.comp.JavafxResolve.findIdent(JavafxResolve.java:1228)
            at com.sun.tools.javafx.comp.JavafxResolve.resolveIdent(JavafxResolve.java:1423)
            at com.sun.tools.javafx.comp.JavafxAttr.visitIdent(JavafxAttr.java:506)
            at com.sun.tools.javafx.tree.JFXIdent.accept(JFXIdent.java:52)
            at com.sun.tools.javafx.comp.JavafxAttr.attribTree(JavafxAttr.java:280)
            at com.sun.tools.javafx.comp.JavafxAttr.attribTree(JavafxAttr.java:265)
            at com.sun.tools.javafx.comp.JavafxAttr.attribExpr(JavafxAttr.java:311)
            at com.sun.tools.javafx.comp.JavafxAttr.visitFunctionInvocation(JavafxAttr.java:2239)
            at com.sun.tools.javafx.tree.JFXFunctionInvocation.accept(JFXFunctionInvocation.java:53)
            at com.sun.tools.javafx.comp.JavafxAttr.attribTree(JavafxAttr.java:280)
            at com.sun.tools.javafx.comp.JavafxAttr.attribTree(JavafxAttr.java:265)
            at com.sun.tools.javafx.comp.JavafxAttr.attribExpr(JavafxAttr.java:303)
            at com.sun.tools.javafx.comp.JavafxAttr.visitBlockExpression(JavafxAttr.java:1373)
            at com.sun.tools.javafx.tree.JFXBlock.accept(JFXBlock.java:83)
            at com.sun.tools.javafx.comp.JavafxAttr.attribTree(JavafxAttr.java:280)
            at com.sun.tools.javafx.comp.JavafxAttr.attribTree(JavafxAttr.java:265)
            at com.sun.tools.javafx.comp.JavafxAttr.attribExpr(JavafxAttr.java:311)
            at com.sun.tools.javafx.comp.JavafxAttr.finishFunctionDefinition(JavafxAttr.java:1863)
            at com.sun.tools.javafx.comp.JavafxMemberEnter$SymbolCompleter.complete(JavafxMemberEnter.java:646)
            at com.sun.tools.javac.code.Symbol.complete(Symbol.java:400)
            at com.sun.tools.javafx.comp.JavafxAttr.visitFunctionDefinition(JavafxAttr.java:1658)
            at com.sun.tools.javafx.tree.JFXFunctionDefinition.accept(JFXFunctionDefinition.java:93)
            at com.sun.tools.javafx.comp.JavafxAttr.attribTree(JavafxAttr.java:280)
            at com.sun.tools.javafx.comp.JavafxAttr.attribTree(JavafxAttr.java:265)
            at com.sun.tools.javafx.comp.JavafxAttr.attribDecl(JavafxAttr.java:334)
            at com.sun.tools.javafx.comp.JavafxAttr.attribClassBody(JavafxAttr.java:3696)
            at com.sun.tools.javafx.comp.JavafxAttr.attribClass(JavafxAttr.java:2808)
            at com.sun.tools.javafx.comp.JavafxAttr.attribClass(JavafxAttr.java:2763)
            at com.sun.tools.javafx.main.JavafxCompiler.attribute(JavafxCompiler.java:936)
            at com.sun.tools.javafx.main.JavafxCompiler.compile2(JavafxCompiler.java:782)
            at com.sun.tools.javafx.main.JavafxCompiler.compile(JavafxCompiler.java:685)
            at com.sun.tools.javafx.main.Main.compile(Main.java:624)
            at com.sun.tools.javafx.main.Main.compile(Main.java:312)
            at com.sun.tools.javafx.Main.compile(Main.java:84)
            at com.sun.tools.javafx.Main.main(Main.java:69)

    posted @ 2010-02-25 23:35 陳維 閱讀(1597) | 評論 (1)編輯 收藏

    主站蜘蛛池模板: 亚洲激情中文字幕| 99亚洲精品卡2卡三卡4卡2卡| 51在线视频免费观看视频| 亚洲中文字幕无码av在线| 国产亚洲精品免费| 暖暖日本免费中文字幕| 国产婷婷综合丁香亚洲欧洲| 亚洲Av无码乱码在线观看性色 | 一级日本高清视频免费观看 | 亚洲无线一二三四区| 黄网址在线永久免费观看 | 亚洲av无码专区国产不乱码| 亚洲午夜福利在线观看| 成人A级毛片免费观看AV网站| fc2免费人成在线| 亚洲免费福利在线视频| 久久精品国产亚洲综合色| 午夜毛片不卡免费观看视频| 永久在线观看免费视频| 色偷偷尼玛图亚洲综合| 亚洲黄色免费网址| 亚洲综合在线另类色区奇米| 成年女人毛片免费播放视频m| 免费精品一区二区三区第35| 国产精品亚洲专区在线播放| 亚洲成年人电影网站| 国产成人精品日本亚洲专区61| 久久精品a一国产成人免费网站 | 免费中文字幕在线| 91免费资源网站入口| 免费的全黄一级录像带| 国产成人亚洲精品91专区高清| 亚洲小说区图片区| 亚洲AV日韩AV天堂久久| 国产亚洲视频在线播放| 国产免费看插插插视频| 在线免费观看污网站| 中文字幕无码播放免费| 99视频在线免费| 最近的2019免费中文字幕| 特级aa**毛片免费观看|