介绍JComponentPack产品中的AComboBox控件

AComboBox是JComponentPack产品中的一款下拉组件,不同于核心Java Swing包中的JComboBox。该组件支持自定义弹出图标、弹出组件等特性,并提供了一个默认的AbstractComponentFactory,能够根据当前值类型配置弹出图标和组件。

 

Introduce the AComboBox component


Overview

The AComboBox is a drop down component in JComponentPack product, it’s different with the “ JComboBox” component in the core Java swing package, it can set the popup icon, popup component, etc.

Main Features

1. Customize the popup icon

The AComboBox component have the method “setPopupIcon(Icon)”, you can change the popup icon for your requirements, see the screenshot:

2. Customize the popup component

The AComboBox component have the method “setPopupComponent(Component), you can set the component will be display in the drop down menu.

3. Customize the component factory, this is a new feature since JComponentPack 1.1.0, You can configure the popup icon, popup component based the current value’s type, the method “setComponentFactory(AbstractComponentFactory)” in AComboBox can be used for this goal.
  AComboBox currently provide a default AbstractComponentFactory, it can configure the Date value to use the calendar popup icon and JCalendar component, see the article “JCalendar new features in JComponentPack 1.1.0” for details.

Sample Code

Configure the AComboBox component to use the Date value

// create the AComboBox
AComboBox comboBox = new AComboBox();
comboBox.setValue(new Date());
// configure the date format
DateCellRenderer renderer = (DateCellRenderer) comboBox.getRenderer();
renderer.setFormat(DateFormat.getDateInstance());


奇新Java控件——Java控件提供商和Java RIA, Web, J2ME解决方案开发商

JComponentPack是基于Swing框架的Java GUI控件集合,它包括JDataGrid电子表格版本JDataGrid数据库版本JComponentSet--Java swing控件集

了解更多产品。。。


1389732.html?type=1

--------------------------
新闻: 瑞星微点之争引发全民深思中国式道德
导航: 博客园首页   知识库   新闻   招聘   社区   小组   博问   网摘   找找看

转载于:https://my.oschina.net/javastudy/blog/31

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值