⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 tabxianludialog.java

📁 长沙公交查询管理系统,主要实现对人员资料的管理以及车辆的分配路线。
💻 JAVA
📖 第 1 页 / 共 2 页
字号:
/*此类是负责线路增,删,改的界面的规划*/
package pro;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.border.TitledBorder;
import javax.swing.border.Border;

public class TabXianLuDialog  extends  JDialog implements ActionListener
{   
	   private VoSumBus mVoSumBus;
	  // private PnlCha mPnl;
	   private BtnXianJDialog mBd;
	   private MainFrame mf;
	   
	  JLabel lblTitle = new JLabel();
	  JLabel lblLu = new JLabel();
	  TitledBorder titledBorder1 = new TitledBorder("");
	  TitledBorder titledBorder2 = new TitledBorder("");
	  JLabel lblZhan = new JLabel();
	  TitledBorder titledBorder3 = new TitledBorder("");
	  JLabel lblPrice = new JLabel();
	  TitledBorder titledBorder4 = new TitledBorder("");
	  JLabel lblTel = new JLabel();
	  JLabel lblLength = new JLabel();
	  JLabel lblTime = new JLabel();
	  TitledBorder titledBorder5 = new TitledBorder("");
	  TitledBorder titledBorder6 = new TitledBorder("");
	  Border border1 = BorderFactory.createEtchedBorder(Color.white,
	      new Color(148, 145, 140));
	  Border border2 = BorderFactory.createEtchedBorder(Color.white,
	      new Color(148, 145, 140));
	  Border border3 = BorderFactory.createEtchedBorder(Color.white, Color.pink);
	  Border border4 = BorderFactory.createEtchedBorder(Color.white,
	      new Color(0, 243, 255));
	  Border border5 = BorderFactory.createLineBorder(new Color(118, 223, 230), 2);
	  JScrollPane jScrollPane1 = new JScrollPane();
	  JTextArea txtArea = new JTextArea();
	  JButton btnClose = new JButton();
	  JLabel lblzhong = new JLabel();
      public TabXianLuDialog(BtnCenter bc,VoSumBus voSumBus)
      {
		  super(bc,true);
       	  mVoSumBus=voSumBus;
       	  //mPnl=pnlCha;
  
       	  String strLu=mVoSumBus.getSBusName();
       	  //String strLu=mPnl.txtXian.getText();
       	  String strStartArea=mVoSumBus.getSStartArea();
       	  String strSEndArea=mVoSumBus.getSEndArea();
       	  String strSGoUp="上行线路: "+mVoSumBus.getSGoUp();
       	  String strSGoDown="下行线路: "+mVoSumBus.getSGoDown();
       	  String strSStartTime=mVoSumBus.getSStartTime().substring(11,16);
       	  String strSendTime=mVoSumBus.getSendTime().substring(11,16);
       	  int inScarfare=mVoSumBus.getScarfare();
       	  String strCare=inScarfare+"";
       	  String fSLength=voSumBus.getSLength()+"";
       	  String strLeng="";
       	  if(fSLength.length()<4)
       	  {
       	  	strLeng=fSLength;
       	 
       	  }else
       	  {
       	  	 strLeng=fSLength.substring(0,4);
       	  	 
       	  }
       	  
       	 // String strlength=strLeng.substring(0,);
       	  String strSTel=mVoSumBus.getSTelephone();
       	  String strSCompany=mVoSumBus.getSCompany();
       	  
       	  
       	  
       	  
		    this.getContentPane().setLayout(null);
		    lblTitle.setFont(new java.awt.Font("Dialog", Font.BOLD | Font.ITALIC, 18));
		    lblTitle.setForeground(new Color(118, 210, 46));
		    lblTitle.setBorder(null);
		    lblTitle.setHorizontalAlignment(SwingConstants.CENTER);
		    lblTitle.setText("线路查询结果");
		    lblTitle.setBounds(new Rectangle(12, 0, 612, 37));
		    lblLu.setFont(new java.awt.Font("Dialog", Font.BOLD | Font.ITALIC, 29));
		    lblLu.setForeground(Color.red);
		    lblLu.setBorder(border5);
		    // lblLu.setBackground(new UIManager(212, 208, 200));
		    lblLu.setHorizontalAlignment(SwingConstants.CENTER);
		    lblLu.setText(strLu);
		    lblLu.setBounds(new Rectangle(13, 40, 244, 56));
		    lblZhan.setFont(new java.awt.Font("Dialog", Font.PLAIN, 12));
		    lblZhan.setForeground(Color.red);
		    lblZhan.setBorder(border5);
		    lblZhan.setHorizontalAlignment(SwingConstants.LEFT);
		    lblZhan.setText("起点站:"+strStartArea);
		    lblZhan.setBounds(new Rectangle(13, 94, 244, 32));
		    lblPrice.setBorder(border5);
		    lblPrice.setHorizontalAlignment(SwingConstants.CENTER);
		    lblPrice.setText("票价:"+strCare);
		    lblPrice.setBounds(new Rectangle(254, 40, 410, 30));
		    lblTel.setFont(new java.awt.Font("Dialog", Font.PLAIN, 12));
		    lblTel.setBorder(border5);
		    lblTel.setHorizontalAlignment(SwingConstants.CENTER);
		    lblTel.setText("经营公司:"+strSCompany+"; "+"投诉电话:"+strSTel);
		    lblTel.setBounds(new Rectangle(254, 124, 410, 26));
		    lblLength.setFont(new java.awt.Font("Dialog", Font.PLAIN, 12));
		    lblLength.setBorder(border5);
		    lblLength.setHorizontalAlignment(SwingConstants.CENTER);
		    lblLength.setText("线路总长:"+strLeng+"公里");
		    lblLength.setBounds(new Rectangle(254, 94, 410, 32));
		    lblTime.setFont(new java.awt.Font("Dialog", Font.PLAIN, 12));
		    lblTime.setBorder(border5);
		    lblTime.setHorizontalAlignment(SwingConstants.CENTER);
		    lblTime.setText("首班时间:"+strSStartTime+";末班时间:"+strSendTime);
		    lblTime.setBounds(new Rectangle(254, 67, 410, 31));
		    jScrollPane1.setBounds(new Rectangle(13, 153, 649, 315));
		   // txtArea.setBackground(new Color(203, 203, 197));
		    txtArea.setBounds(new Rectangle(6, 160, 549, 280));
		    txtArea.setEditable(false);
		    txtArea.setText("\n\n"+strSGoUp+"\n\n"+"\n"+strSGoDown);
		    txtArea.setLineWrap(true);
		    btnClose.setBounds(new Rectangle(257, 494, 117, 27));
		    btnClose.setFont(new java.awt.Font("Dialog", Font.PLAIN, 14));
		    btnClose.setForeground(new Color(92, 210, 46));
		    btnClose.setText("退出");
		    lblzhong.setBorder(border5);
		    lblzhong.setHorizontalAlignment(SwingConstants.LEFT);
		    lblzhong.setText("终点站:"+strSEndArea);
		    lblzhong.setFont(new java.awt.Font("Dialog", Font.PLAIN, 12));
		    lblzhong.setForeground(Color.red);
		    lblzhong.setBounds(new Rectangle(13, 124, 244, 26));
		    this.getContentPane().add(jScrollPane1);
		    this.getContentPane().add(lblTitle);
		    this.getContentPane().add(lblTime);
		    this.getContentPane().add(lblLu);
		    this.getContentPane().add(lblZhan);
		    this.getContentPane().add(lblzhong);
		    this.getContentPane().add(lblPrice);
		    this.getContentPane().add(lblLength);
		    this.getContentPane().add(lblTel);
		    this.getContentPane().add(btnClose);
		    jScrollPane1.getViewport().add(txtArea);
		    
		    
		    btnClose.addActionListener(this);
       	    this.setTitle("长沙公交查询系统");
            this.setSize(683,570);

	}
	
	
	
	
	/*构造函数重载*/
	  public TabXianLuDialog(MainFrame mf,VoSumBus voSumBus)
      {
		  super(mf,true);
       	  mVoSumBus=voSumBus;
       	  //mPnl=pnlCha;
  
       	  String strLu=mVoSumBus.getSBusName();
       	  //String strLu=mPnl.txtXian.getText();
       	  String strStartArea=mVoSumBus.getSStartArea();
       	  String strSEndArea=mVoSumBus.getSEndArea();
       	  String strSGoUp="上行线路: "+mVoSumBus.getSGoUp();
       	  String strSGoDown="下行线路: "+mVoSumBus.getSGoDown();
       	  String strSStartTime=mVoSumBus.getSStartTime().substring(11,16);
       	  String strSendTime=mVoSumBus.getSendTime().substring(11,16);
       	  int inScarfare=mVoSumBus.getScarfare();
       	  String strCare=inScarfare+"";
       	  String fSLength=voSumBus.getSLength()+"";
       	  String strLeng="";
       	  if(fSLength.length()<4)
       	  {
       	  	strLeng=fSLength;
       	 
       	  }else
       	  {
       	  	 strLeng=fSLength.substring(0,4);
       	  	 
       	  }
       	  
       	 // String strlength=strLeng.substring(0,);
       	  String strSTel=mVoSumBus.getSTelephone();
       	  String strSCompany=mVoSumBus.getSCompany();
       	  
       	  
       	  
       	  
		    this.getContentPane().setLayout(null);
		    lblTitle.setFont(new java.awt.Font("Dialog", Font.BOLD | Font.ITALIC, 18));
		    lblTitle.setForeground(new Color(118, 210, 46));
		    lblTitle.setBorder(null);
		    lblTitle.setHorizontalAlignment(SwingConstants.CENTER);
		    lblTitle.setText("线路查询结果");
		    lblTitle.setBounds(new Rectangle(12, 0, 612, 37));
		    lblLu.setFont(new java.awt.Font("Dialog", Font.BOLD | Font.ITALIC, 29));
		    lblLu.setForeground(Color.red);
		    lblLu.setBorder(border5);
		    // lblLu.setBackground(new UIManager(212, 208, 200));
		    lblLu.setHorizontalAlignment(SwingConstants.CENTER);
		    lblLu.setText(strLu);
		    lblLu.setBounds(new Rectangle(13, 40, 244, 56));
		    lblZhan.setFont(new java.awt.Font("Dialog", Font.PLAIN, 12));
		    lblZhan.setForeground(Color.red);
		    lblZhan.setBorder(border5);
		    lblZhan.setHorizontalAlignment(SwingConstants.LEFT);
		    lblZhan.setText("起点站:"+strStartArea);
		    lblZhan.setBounds(new Rectangle(13, 94, 244, 32));
		    lblPrice.setBorder(border5);
		    lblPrice.setHorizontalAlignment(SwingConstants.CENTER);
		    lblPrice.setText("票价:"+strCare);
		    lblPrice.setBounds(new Rectangle(254, 40, 410, 30));
		    lblTel.setFont(new java.awt.Font("Dialog", Font.PLAIN, 12));
		    lblTel.setBorder(border5);
		    lblTel.setHorizontalAlignment(SwingConstants.CENTER);
		    lblTel.setText("经营公司:"+strSCompany+"; "+"投诉电话:"+strSTel);
		    lblTel.setBounds(new Rectangle(254, 124, 410, 26));
		    lblLength.setFont(new java.awt.Font("Dialog", Font.PLAIN, 12));
		    lblLength.setBorder(border5);
		    lblLength.setHorizontalAlignment(SwingConstants.CENTER);
		    lblLength.setText("线路总长:"+strLeng+"公里");
		    lblLength.setBounds(new Rectangle(254, 94, 410, 32));
		    lblTime.setFont(new java.awt.Font("Dialog", Font.PLAIN, 12));
		    lblTime.setBorder(border5);
		    lblTime.setHorizontalAlignment(SwingConstants.CENTER);
		    lblTime.setText("首班时间:"+strSStartTime+";末班时间:"+strSendTime);
		    lblTime.setBounds(new Rectangle(254, 67, 410, 31));
		    jScrollPane1.setBounds(new Rectangle(13, 153, 649, 315));
		   // txtArea.setBackground(new Color(203, 203, 197));
		    txtArea.setBounds(new Rectangle(6, 160, 549, 280));
		    txtArea.setEditable(false);
		    txtArea.setText("\n\n"+strSGoUp+"\n\n"+"\n"+strSGoDown);
		    txtArea.setLineWrap(true);
		    btnClose.setBounds(new Rectangle(257, 494, 117, 27));
		    btnClose.setFont(new java.awt.Font("Dialog", Font.PLAIN, 14));
		    btnClose.setForeground(new Color(92, 210, 46));
		    btnClose.setText("退出");
		    lblzhong.setBorder(border5);
		    lblzhong.setHorizontalAlignment(SwingConstants.LEFT);
		    lblzhong.setText("终点站:"+strSEndArea);
		    lblzhong.setFont(new java.awt.Font("Dialog", Font.PLAIN, 12));
		    lblzhong.setForeground(Color.red);
		    lblzhong.setBounds(new Rectangle(13, 124, 244, 26));
		    this.getContentPane().add(jScrollPane1);
		    this.getContentPane().add(lblTitle);
		    this.getContentPane().add(lblTime);
		    this.getContentPane().add(lblLu);
		    this.getContentPane().add(lblZhan);
		    this.getContentPane().add(lblzhong);
		    this.getContentPane().add(lblPrice);
		    this.getContentPane().add(lblLength);
		    this.getContentPane().add(lblTel);
		    this.getContentPane().add(btnClose);
		    jScrollPane1.getViewport().add(txtArea);
		    
		    
		    btnClose.addActionListener(this);
       	    this.setTitle("长沙公交查管理询系统");
            this.setSize(683,570);

	}
	
    /*构造函数重载*/	


      public TabXianLuDialog(BtnJianZhuFrame bc,VoSumBus voSumBus)
      {
		  super(bc,true);
       	  mVoSumBus=voSumBus;
       	  //mPnl=pnlCha;
  
       	  String strLu=mVoSumBus.getSBusName();
       	  //String strLu=mPnl.txtXian.getText();
       	  String strStartArea=mVoSumBus.getSStartArea();
       	  String strSEndArea=mVoSumBus.getSEndArea();
       	  String strSGoUp="上行线路: "+mVoSumBus.getSGoUp();
       	  String strSGoDown="下行线路: "+mVoSumBus.getSGoDown();
       	  String strSStartTime=mVoSumBus.getSStartTime().substring(11,16);
       	  String strSendTime=mVoSumBus.getSendTime().substring(11,16);
       	  int inScarfare=mVoSumBus.getScarfare();
       	  String strCare=inScarfare+"";
       	  String fSLength=voSumBus.getSLength()+"";
       	  String strLeng="";
       	  if(fSLength.length()<4)
       	  {
       	  	strLeng=fSLength;
       	 
       	  }else
       	  {
       	  	 strLeng=fSLength.substring(0,4);
       	  	 
       	  }
       	  
       	 // String strlength=strLeng.substring(0,);
       	  String strSTel=mVoSumBus.getSTelephone();
       	  String strSCompany=mVoSumBus.getSCompany();
       	  
       	  
       	  
       	  
		    this.getContentPane().setLayout(null);
		    lblTitle.setFont(new java.awt.Font("Dialog", Font.BOLD | Font.ITALIC, 18));
		    lblTitle.setForeground(new Color(118, 210, 46));

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -