📄 zcarview.java
字号:
/* * To change this template, choose Tools | Templates * and open the template in the editor. *//* * ZCarView.java * * Created on Jan 24, 2009, 11:09:25 PM */package zdrive.panels;/** * * @author Mohamed Aly */public class ZCarView extends javax.swing.JPanel { /** Creates new form ZCarView */ public ZCarView() { initComponents(); carView1.setCarImage("/zdrive/eventimages/cartop.jpg"); this.setVisible(false); } public void setDirection(String direction){ carView1.lightOn(direction); } public void appear(){ this.setVisible(true); } public void disappear(){ carView1.lightOff("N"); carView1.lightOff("S"); carView1.lightOff("E"); carView1.lightOff("W"); carView1.lightOff("NW"); carView1.lightOff("NE"); carView1.lightOff("SW"); carView1.lightOff("SE"); this.setVisible(false); } /** 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">//GEN-BEGIN:initComponents private void initComponents() { carView1 = new zdrive.panels.CarView(); setBackground(new java.awt.Color(255, 255, 255)); setLayout(new java.awt.BorderLayout()); carView1.setBackground(new java.awt.Color(255, 255, 255)); carView1.setBorder(null); javax.swing.GroupLayout carView1Layout = new javax.swing.GroupLayout(carView1); carView1.setLayout(carView1Layout); carView1Layout.setHorizontalGroup( carView1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGap(0, 238, Short.MAX_VALUE) ); carView1Layout.setVerticalGroup( carView1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGap(0, 422, Short.MAX_VALUE) ); add(carView1, java.awt.BorderLayout.CENTER); }// </editor-fold>//GEN-END:initComponents // Variables declaration - do not modify//GEN-BEGIN:variables private zdrive.panels.CarView carView1; // End of variables declaration//GEN-END:variables}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -