介绍JComponentPack产品中的AComboBox控件

 

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控件集。

了解更多产品。。。




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

你可能感兴趣的:(介绍JComponentPack产品中的AComboBox控件)