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

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

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

    學用Java

    奇新Java控件---Java控件提供商和Java RIA, Web, J2ME解決方案開發商

    介紹JComponentPack產品中的單元格染色器和編輯器

    Introduce the cell renderer and editor in JComponentPack 1.1.0


    1. ObjectCellRenderer and it’s subclass such as DateCellRenderer, NumberCellRenderer is used by JDataGrid or JTable component, if you want to write a cell renderer for JDataGrid, you should extend ObjectCellRenderer.The ObjectCellEditor and it’s subclass is used by JDataGrid or JTable component.

    You can view these cell renderers in the com.zfqjava.swing.cell package before reinvent the wheel.
     The ObjectCellRenderer have the following subclass in com.zfqjava.swing.cell package:

    BigDecimalCellRenderer,
    BigIntegerCellRenderer,
    BooleanCellRenderer,
    DateCellRenderer,
    NumberCellRenderer,
    StreamCellRenderer,
    URLCellRenderer   
    The ObjectCellRenderer and ObjectCellEditor and it’s subclass are managed by CellManager object,
    The JDataGrid use the CellManger object to mange all it’s cell renderer and editor, so you can add the renderer and editor for CellManager, you can also remove or replace the cell renderer or editor in CellManger.

     Write a ObjectCellRenderer subclass is very simple, generally you only need override it’s “setValue(java.lang.Object value)”method.

     Writer a ObjectCellEditor subclass, you can override it’s three methods:

    protected  void  

     commitEdit()

    protected  Object  

    getValue()

    protected  void 

    setValue(Object value)

    If the editing have illegal value, you should override the “commitEdit()” method and throws a ParseException.
    You can use the method setValue(Object value) to save the edited value, and
    Override the method getValue() to return the new value.

    You can use the protected field “label” to set the text, alignment, font, etc.

    2. DefaultCellRenderer and it’s subclass such as FileCellRenderer is used by JListView component, DefaultCellEditor and it’s subclass such as FileCellEditor is used by JListView component, it works with the JListView component to provide the different view modes: small icon, large icon, list, thumbnails, details, so if you want to use JListView component, you can extend the DefaultCellRenderer.

    Write the DefaultCellRenderer and DefaultCellEditor is same as the ObjectCellRenderer and ObjectCellEditor, the different is you should use the protected field “iconLabel” and “textLabel” to set the icon and text.

    posted on 2009-02-24 09:46 fralepg 閱讀(337) 評論(0)  編輯  收藏


    只有注冊用戶登錄后才能發表評論。


    網站導航:
     
    <2009年2月>
    25262728293031
    1234567
    891011121314
    15161718192021
    22232425262728
    1234567

    導航

    統計

    公告

    JComponentPack 3.0正式發布 功能介紹

    JComponentPack 是一個基于Java SwingGUI類庫,一系列可視化的JavaBeans集合,它基于SwingMVC架構,是100%的純Java類庫,它包括20多個Swing 所沒有的控件

    試用版下載(點擊下載

    常用鏈接

    留言簿(1)

    隨筆檔案

    文章檔案

    搜索

    最新評論

    閱讀排行榜

    評論排行榜

    主站蜘蛛池模板: 亚洲理论片在线中文字幕| 亚洲爽爽一区二区三区| 亚洲成综合人影院在院播放| 中文在线日本免费永久18近| 亚洲视频在线免费| 国产精品亚洲一区二区三区在线观看| 最好免费观看韩国+日本| 亚洲熟妇AV日韩熟妇在线| 毛色毛片免费观看| 亚洲欧美第一成人网站7777| 成全视频在线观看免费高清动漫视频下载 | 最近免费最新高清中文字幕韩国| 亚洲动漫精品无码av天堂| 久久国产精品国产自线拍免费| 精品亚洲永久免费精品| 性无码免费一区二区三区在线| 亚洲伦理一区二区| 999国内精品永久免费视频| 亚洲精品一区二区三区四区乱码| 日本zzzzwww大片免费| 中文字幕乱码亚洲精品一区| 国产在线19禁免费观看| 一级毛片人与动免费观看| 亚洲国产成人高清在线观看| 1a级毛片免费观看| 亚洲日本成本人观看| 亚洲人成网站18禁止一区| 99久久久国产精品免费牛牛四川| 亚洲人成电影在线观看青青| 日本免费福利视频| 国产免费黄色无码视频 | 热99re久久免费视精品频软件| 免费在线观看自拍性爱视频| 狠狠亚洲婷婷综合色香五月排名| 99久久99久久精品免费观看| 亚洲日韩精品无码专区| 久久久久国产成人精品亚洲午夜 | 国产乱妇高清无乱码免费| 亚洲人成网站在线播放影院在线| 插B内射18免费视频| 和老外3p爽粗大免费视频|