【Java开源代码栏目提醒】:网学会员在Java开源代码频道为大家收集整理了AdvancedSearchDialog.java提供大家参考,希望对大家有所帮助!
/*
* AdvancedSearchDialog.java
*
* Created on 2008年7月8日, 上午11:20
*/
package com.mwq.map.frame;
import com.mwq.map.dao.Dao;
import com.mwq.map.tool.ScreenSize;
import java.text.DateFormat;
import java.text.ParseException;
import java.util.Date;
import java.util.Enumeration;
import java.util.Vector;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.AbstractButton;
import javax.swing.JList;
import javax.swing.JOptionPane;
import javax.swing.JRadioButton;
import javax.swing.JTextField;
/**
*
* @author Administrator
*/
public class AdvancedSearchDialog extends javax.swing.JDialog {
private static final Dao dao = Dao.getInstance();
private JList searchResultList;
private Vector searchResult;
/** Creates new form AdvancedSearchDialog */
public AdvancedSearchDialog(java.awt.Frame parent, boolean modal, JList searchResultList, Vector searchResult) {
super(parent, modal);
this.searchResultList = searchResultList;
this.searchResult = searchResult;
initComponents();
ScreenSize.centered(this);
}
/** This method is called from within the constructor to
* initialize the form.
* WARNING: Do NOT modify this code. The content of this method is
* always regenerated by the Form Editor.
*/
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">
private void initComponents() {
textButtonGroup = new javax.swing.ButtonGroup();
timeButtonGroup = new javax.swing.ButtonGroup();
sortButtonGroup = new javax.swing.ButtonGroup();
textPanel = new javax.swing.JPanel();
keywordTextField = new javax.swing.JTextField();
keywordLabel = new javax.swing.JLabel();
nameRadioButton = new javax.swing.JRadioButton();
allRadioButton = new javax.swing.JRadioButton();
explainRadioButton = new javax.swing.JRadioButton();
jLabel1 = new javax.swing.JLabel();
timePanel = new javax.swing.JPanel();
appointRadioButton = new javax.swing.JRadioButton();
spaceRadioButton = new javax.swing.JRadioButton();
appointPanel = new com.mwq.map.calendar.CalendarPanel();
spaceStartPanel = new com.mwq.map.calendar.CalendarPanel();
spaceLabel = new javax.swing.JLabel();
spaceEndPanel = new com.mwq.map.calendar.CalendarPanel();
compareComboBox = new javax.swing.JComboBox();
sortPanel = new javax.swing.JPanel();
sortLabel = new javax.swing.JLabel();
sortTreePanel = new com.mwq.map.mwing.MTreePanel();
childTreeRadioButton = new javax.swing.JRadioButton();
currentNodeRadioButton = new javax.swing.JRadioButton();
jLabel2 = new javax.swing.JLabel();
searchButton = new javax.swing.JButton();
clearButton = new javax.swing.JButton();
exitButton = new javax.swing.JButton();
setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
setTitle("高级搜索");
textPanel.setBorder(javax.swing.BorderFactory.createTitledBorder("标记文本"));
keywordTextField.setColumns(30);
keywordLabel.setText("关 键 字:");
textButtonGroup.add(nameRadioButton);
nameRadioButton.setText("名称");
nameRadioButton.setFocusPainted(false);
textButtonGroup.add(allRadioButton);
allRadioButton.setSelected(true);
allRadioButton.setText("全部");
allRadioButton.setFocusPainted(false);
textButtonGroup.add(explainRadioButton);
explainRadioButton.setText("说明");
explainRadioButton.setFocusPainted(false);
jLabel1.setText("搜索范围:");
javax.swing.GroupLayout textPanelLayout = new javax.swing.GroupLayout(textPanel);
textPanel.setLayout(textPanelLayout);
textPanelLayout.setHorizontalGroup(
textPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(textPanelLayout.createSequentialGroup()
.addContainerGap()
.addGroup(textPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(keywordLabel)
.addComponent(jLabel1))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(textPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(textPanelLayout.createSequentialGroup()
.addComponent(allRadioButton)
.addGap(18, 18, 18)
.addComponent(nameRadioButton)
.addGap(18, 18, 18)
.addComponent(explainRadioButton))
.addComponent(keywordTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);
textPanelLayout.setVerticalGroup(
textPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(textPanelLayout.createSequentialGroup()
.addContainerGap()
.addGroup(textPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(keywordLabel)
.addComponent(keywordTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addGroup(textPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(allRadioButton)
.addComponent(nameRadioButton)
.addComponent(explainRadioButton)
.addComponent(jLabel1))
.addContainerGap(11, Short.MAX_VALUE))
);
timePanel.setBorder(javax.swing.BorderFactory.createTitledBorder("创建日期"));
timeButtonGroup.add(appointRadioButton);
appointRadioButton.setSelected(true);
appointRadioButton.setText("指定日期");
appointRadioButton.setFocusPainted(false);
appointRadioButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
appointRadioButtonActionPerformed(evt);
}
});
timeButtonGroup.add(spaceRadioButton);
spaceRadioButton.setText("一段时间");
spaceRadioButton.setFocusPainted(false);
spaceRadioButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
spaceRadioButtonActionPerformed(evt);
}
});
spaceStartPanel.setEnabled(false);
spaceLabel.setText("——");
spaceLabel.setEnabled(false);
spaceEndPanel.setEnabled(false);
compareComboBox.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "等于", "大于", "小于" }));
javax.swing.GroupLayout timePanelLayout = new javax.swing.GroupLayout(timePanel);
timePanel.setLayout(timePanelLayout);
tim
上一篇:
AdtypeManagerImpl.java
下一篇:
ASP小区停车管理系统(Access)(含录像)