当前位置: 首页>>代码示例>>Java>>正文


Java JDateChooser.addPropertyChangeListener方法代码示例

本文整理汇总了Java中com.toedter.calendar.JDateChooser.addPropertyChangeListener方法的典型用法代码示例。如果您正苦于以下问题:Java JDateChooser.addPropertyChangeListener方法的具体用法?Java JDateChooser.addPropertyChangeListener怎么用?Java JDateChooser.addPropertyChangeListener使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.toedter.calendar.JDateChooser的用法示例。


在下文中一共展示了JDateChooser.addPropertyChangeListener方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createComponent

import com.toedter.calendar.JDateChooser; //导入方法依赖的package包/类
@Override
protected QuestionPanel createComponent() {
	QuestionPanel panel = createDefaultQuestionPanel(wizardElement, componentController.getCatalogService());

	calendar = new JDateChooser();
	
	if (wizardElement.isSetToday()){
		calendar.setDate(new Date());
	} else if (wizardElement.isSetDefaultValue()){
		calendar.setDate(wizardElement.getDefaultValue().getTime());
	}

	//add listener
	PropertyChangeListener listener = createDefaultListener();
	if (listener!= null){
		calendar.addPropertyChangeListener(listener);
	}

	panel.add(calendar);

	return panel;
}
 
开发者ID:lexml,项目名称:madoc,代码行数:23,代码来源:DateQuestionComponentSwing.java

示例2: createMahnungPanel

import com.toedter.calendar.JDateChooser; //导入方法依赖的package包/类
private JPanel createMahnungPanel() {
    JPanel panel = new JPanel();
    panel.setLayout(new MigLayout("", "[][]", "[][][][]"));

    JLabel lblDatum = new JLabel("Datum:");
    panel.add(lblDatum, "cell 0 0");
    inputMahnungDatum = new JDateChooser(new Date());
    inputMahnungDatum
            .addPropertyChangeListener(new RechnungsdatumAendernListener());
    panel.add(inputMahnungDatum, "cell 1 0,grow");

    JLabel lblFrist = new JLabel("Frist:");
    panel.add(lblFrist, "cell 0 1");
    inputFristDatum = new JDateChooser(getFristForDatum(new Date()));
    panel.add(inputFristDatum, "cell 1 1,grow");

    JLabel lblTyp = new JLabel("Typ:");
    panel.add(lblTyp, "cell 0 2");
    lblMahnungArt = new JLabel();
    panel.add(lblMahnungArt, "cell 1 2,grow");

    JButton btnMahnungErstellen = new JButton("Mahnung erstellen");
    btnMahnungErstellen.addActionListener(new MahnungAction());
    panel.add(btnMahnungErstellen, "cell 0 3,span,alignx right");

    return panel;
}
 
开发者ID:fabianlipp,项目名称:jnami,代码行数:28,代码来源:RechnungenVerwaltenWindow.java

示例3: PortfolioView

import com.toedter.calendar.JDateChooser; //导入方法依赖的package包/类
public PortfolioView(PortfolioDocument portfolioDoc, Portfolio portfolio, JFrame frame) {
	super(new BorderLayout());
	this.frame = frame;
	this.portfolioDoc = portfolioDoc;
	this.portfolio = portfolio;
	portfolioValueField = new JTextField();
	portfolioCashField = new JTextField();
	portfolioInvestedField = new JTextField();
	portfolioXirrField = new JTextField();

	frame.getContentPane().removeAll();

	FlowLayout flowLayout = new FlowLayout();

	Object[][] bookEntries = portfolio.getCombinedBookEntryTable(showItems);

	Object[] brokerNames = portfolio.getBookEntryBrokers();
	brokerList = new BrokerList(brokerNames, this);

	dateChooser = new JDateChooser(Calendar.getInstance().getTime());
	dateChooser.setLocale(new Locale("fi", "FI"));
	dateChooser.addPropertyChangeListener(this);

	JPanel top = new JPanel(flowLayout);

	top.add(dateChooser);

	top.add(new JLabel("AO-tili: "));
	top.add(brokerList.getBrokerList());

	top.add(new JLabel("Osakkeet: "));
	top.add(portfolioValueField);

	top.add(new JLabel("Käteinen: "));
	top.add(portfolioCashField);

	top.add(new JLabel("Sijoitettu: "));
	top.add(portfolioInvestedField);

	top.add(new JLabel("P/A%: "));
	top.add(portfolioXirrField);

	portfolioValueField.setEditable(false);
	portfolioCashField.setEditable(false);
	portfolioInvestedField.setEditable(false);
	portfolioXirrField.setEditable(false);

	updateTextFields();

	add(top, BorderLayout.PAGE_START);

	bookEntryPane = new PortfolioTable(bookEntries, portfolio);
	// PortfolioModel model = new
	// PortfolioModel(portfolio.getCombinedBookEntryList());
	// bookEntryPane = new JTreeTable((model));
	// Create the scroll pane and add the table to it.
	JScrollPane scrollPane = new JScrollPane(bookEntryPane);

	// Add the scroll pane to this panel.
	add(scrollPane);

	taxReportPane = new TaxReportPane(portfolio);
	transactionPane = new TransactionPane(portfolio);
	profitsPane = new ProfitsPane(portfolio);
	monthlyProfitsPane = new MonthlyProfitsPane(portfolio);

	JTabbedPane jtp = new JTabbedPane();
	frame.getContentPane().add(jtp);
	jtp.addTab("Yhteenveto", this);
	jtp.addTab("Arvopaperijakauma", new PieChartPane(portfolio));
	jtp.addTab("Maajakauma", new CountryAllocationPane(portfolio));
	jtp.addTab("Tapahtumat", transactionPane);
	jtp.addTab("Luovutusvoitot", taxReportPane);
	jtp.addTab("Vuosituotot", profitsPane);
	jtp.addTab("Kuukausimuutokset", monthlyProfitsPane);
	setOpaque(true); // content panes must be opaque
}
 
开发者ID:skarna1,项目名称:javaportfolio,代码行数:78,代码来源:PortfolioView.java

示例4: createSearchPanel

import com.toedter.calendar.JDateChooser; //导入方法依赖的package包/类
private JPanel createSearchPanel() {
    JPanel searchPanel = new JPanel();
    searchPanel.setBorder(new TitledBorder(null, "Briefe suchen",
            TitledBorder.LEADING, TitledBorder.TOP, null, null));
    searchPanel.setLayout(new MigLayout("", "[][]", "[]"));

    BriefeSucheListener filterChangeListener = new BriefeSucheListener();

    /*** Zeitraum ***/
    /*
     * MigLayout verhält sich in Kombination mit dem CheckBoxBorderPanel
     * etwas merkwürdig. Für die Checkbox muss manuell das Constraint "span"
     * gesetzt werden, weil sonst die nächsten Komponenten verschoben
     * werden. Die Column 0 wird nur von der Checkbox verwendet. Alle
     * anderen Komponenten beginnen bei Row 1.
     */
    MigLayout layout = new MigLayout("", "[][][]", "[][]");
    CheckBoxBorderPanel zeitraumPanel = new CheckBoxBorderPanel("Zeitraum",
            layout);
    chckbxDatumFilter = zeitraumPanel.getCheckBox();
    layout.setComponentConstraints(chckbxDatumFilter, "span");
    chckbxDatumFilter.setSelected(true);
    searchPanel
            .add(zeitraumPanel, "cell 0 0,shrink,alignx left,aligny top");

    JLabel lblVon = new JLabel("Von:");
    zeitraumPanel.add(lblVon, "cell 1 0,flowx,alignx left");
    inputDatumVon = new JDateChooser(new Date());
    zeitraumPanel.add(inputDatumVon, "cell 2 0");

    JLabel lblBis = new JLabel("Bis:");
    zeitraumPanel.add(lblBis, "cell 1 1,alignx left");
    inputDatumBis = new JDateChooser(new Date());
    zeitraumPanel.add(inputDatumBis, "cell 2 1");

    chckbxDatumFilter.addActionListener(filterChangeListener);
    inputDatumVon.addPropertyChangeListener(filterChangeListener);
    inputDatumBis.addPropertyChangeListener(filterChangeListener);

    /*** Brief-Typ ***/
    JPanel typPanel = new JPanel();
    typPanel.setBorder(new TitledBorder(null, "Brief-Typ",
            TitledBorder.LEADING, TitledBorder.TOP, null, null));
    typPanel.setLayout(new BoxLayout(typPanel, BoxLayout.Y_AXIS));
    searchPanel.add(typPanel, "cell 1 0,alignx left,aligny top");

    rdbtnAlle = new JRadioButton("Alle");
    rdbtnRechnung = new JRadioButton("Rechnung");
    rdbtnMahnung = new JRadioButton("Mahnung");
    rdbtnPrenotification = new JRadioButton("Prenotification");

    typPanel.add(rdbtnAlle);
    typPanel.add(rdbtnRechnung);
    typPanel.add(rdbtnMahnung);
    typPanel.add(rdbtnPrenotification);

    ButtonGroup vorausberechnungGrp = new ButtonGroup();
    vorausberechnungGrp.add(rdbtnAlle);
    vorausberechnungGrp.add(rdbtnRechnung);
    vorausberechnungGrp.add(rdbtnMahnung);
    vorausberechnungGrp.add(rdbtnPrenotification);
    rdbtnAlle.setSelected(true);

    rdbtnAlle.addActionListener(filterChangeListener);
    rdbtnRechnung.addActionListener(filterChangeListener);
    rdbtnMahnung.addActionListener(filterChangeListener);
    rdbtnPrenotification.addActionListener(filterChangeListener);

    return searchPanel;
}
 
开发者ID:fabianlipp,项目名称:jnami,代码行数:71,代码来源:BriefeWindow.java


注:本文中的com.toedter.calendar.JDateChooser.addPropertyChangeListener方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。