[자바 프로그래밍] 파워포인트, 그림판
본 자료는 미리보기를 지원하지 않습니다.
닫기
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
해당 자료는 3페이지 까지만 미리보기를 제공합니다.
3페이지 이후부터 다운로드 후 확인할 수 있습니다.

소개글

[자바 프로그래밍] 파워포인트, 그림판에 대한 보고서 자료입니다.

목차

1.Line 선택
2.ArrowLine (화살표 모양 선택)
3.Rectangle (사각형 그리기)
4.Circle (원 그리기)
5.FillColor (색 채우기)
6.LineColor (Line 색 선택)
7.WordColor (글자색 선택)
8.LineThick (Line 두께 선택)
9.LineDirect (Line 방향 선택)
10.LineShape (Line 모양 선택)

본문내용

import javax.swing.*;
import java.awt.*;
import java.util.*;
import java.awt.event.*;
import java.text.*;
import java.awt.geom.Line2D;
import java.awt.geom.Rectangle2D;
import java.awt.geom.Ellipse2D;

public class PowerPoint extends JFrame implements KeyListener, ActionListener, MouseListener, MouseMotionListener, MouseWheelListener {

private JPanel contentPanel,menuPanel;
private DrawPanel drawPanel,temp;
private JPopupMenu lineThickChoose;
private JPopupMenu lineShapeChoose;
private JPopupMenu MouseRightMenu;

//각종 변수 및 검사용 변수들
public static Color fillColor = Color.white;
public static Color lineColor = Color.black;
public static Color wordColor = Color.black;
private JButton buttons[];
public static int startx,starty,endx,endy,widthDiffer,heightDiffer;
public static int shapeMode=1;
public static int lineThickNum=1;
public static int lineShape=1;
public static int scaleX=1,scaleY=1;
public static int tryNumber=1;
public static String t="";
public static String s="";
public static String rf="";
public static boolean fillClick=false;
public static boolean lineClick=false;
public static boolean clear=false;
public static boolean mouseLeft=false;
boolean controlKey=true;



//핵심적인 내용 저장용 벡터 데이터들
public static Vector db=new Vector(); // 도형그리기용
public static Vector lineColorDb=new Vector(); //라인칼라 판별용
public static Vector fillColorDb=new Vector(); //채우기칼라 판별용
public static Vector lineThickDb=new Vector(); //라인 두께 판별용
public static Vector lineShapeDb=new Vector(); //라인 모양 판별용
public static Vector shapeFillDb=new Vector(); //도형 채우기 판별용



//오른쪽 마우스 클릭후 삭제시
public void delete(){

Graphics g = getGraphics();
g.clearRect(0,0,1000,600);
db.removeAllElements();
lineColorDb.removeAllElements();
fillColorDb.removeAllElements();
lineThickDb.removeAllElements();
lineShapeDb.removeAllElements();
shapeFillDb.removeAllElements();
repaint();
}

public PowerPoint() {

super("PowerPoint");


Container container = getContentPane();
buttons=new JButton[10];

//그림 그릴 panel 생성
drawPanel=new DrawPanel();
drawPanel.setBackground(Color.white);



//버튼 panel 생성
menuPanel=new JPanel();
menuPanel.setLayout(new GridLayout(1,buttons.length));


buttons[0] = new JButton("Line");
buttons[0].addActionListener(this);


buttons[1] = new JButton("ArrowLine");
buttons[1].addActionListener(this);

buttons[2] = new JButton("Rectangle");
buttons[2].addActionListener(this);

buttons[3] = new JButton("Circle");
buttons[3].addActionListener(this);

buttons[4] = new JButton("FillColor");
buttons[4].addActionListener(this);

buttons[5] = new JButton("LineColor");
buttons[5].addActionListener(this);

buttons[6] = new JButton("WordColor");
buttons[6].addActionListener(this);

buttons[7] = new JButton("LineThick");
buttons[7].addActionListener(this);

buttons[8] = new JButton("LineDirect");
buttons[8].addActionListener(this);

buttons[9] = new JButton("LineShape");
buttons[9].addActionListener(this);


menuPanel.add(buttons[0]);
menuPanel.add(buttons[1]);
menuPanel.add(buttons[2]);
menuPanel.add(buttons[3]);
menuPanel.add(buttons[4]);
menuPanel.add(buttons[5]);
menuPanel.add(buttons[6]);
menuPanel.add(buttons[7]);
menuPanel.add(buttons[8]);
menuPanel.add(buttons[9]);

container.add(drawPanel, BorderLayout.CENTER);
container.add(menuPanel, BorderLayout.SOUTH);


// 각종 리스너 등록
addMouseListener(this);
addMouseMotionListener(this);
addMouseWheelListener(this);
addKeyListener(this);


setSize(1000,600);
setVisible(true);
}

키워드

  • 가격2,000
  • 페이지수10페이지
  • 등록일2006.05.08
  • 저작시기2005.5
  • 파일형식압축파일(zip)
  • 자료번호#348251
본 자료는 최근 2주간 다운받은 회원이 없습니다.
청소해
다운로드 장바구니