Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 72498 Details for
Bug 101820
New package: drawboard-1.52 (ebuild included)
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
changed.patch
changed.patch (text/plain), 5.04 KB, created by
James Le Cuirot
on 2005-11-09 08:16:56 UTC
(
hide
)
Description:
changed.patch
Filename:
MIME Type:
Creator:
James Le Cuirot
Created:
2005-11-09 08:16:56 UTC
Size:
5.04 KB
patch
obsolete
>diff -Naur drawboard-1.52-old/source/Board.java drawboard-1.52/source/Board.java >--- drawboard-1.52-old/source/Board.java 2003-12-29 20:11:24.000000000 +0000 >+++ drawboard-1.52/source/Board.java 2005-08-12 02:31:00.000000000 +0100 >@@ -130,6 +130,7 @@ > int color=current_color(); > for (int i=0; i<parent.matrix.length; i++)parent.matrix[i]=color; > send(new Reset(current_color())); >+ parent.repaint(); > } > > public void focusLost(FocusEvent e){} >@@ -185,6 +186,7 @@ > } > > } >+ parent.repaint(); > } > } > } >@@ -200,6 +202,7 @@ > element=current_mode(); > ((Shape)element).init((short)e.getX(),(short)e.getY(),current_color(), current_thick(),(short)e.getX(),(short)e.getY()); > parent.requestFocus(); >+ parent.repaint(); > } > > } >@@ -209,6 +212,7 @@ > // texttool watches mousemove, not only mousedrag > if (element instanceof LetterBox){ > ((Shape)element).init((short)e.getX(),(short)e.getY(),current_color(), current_thick(),(short)e.getX(),(short)e.getY()); >+ parent.repaint(); > } > } > >@@ -229,14 +233,17 @@ > if (mousekey==1 && stateChanged){ > element=current_mode(); > ((Shape)element).init((short)e.getX(),(short)e.getY(),current_color(), current_thick(),(short)e.getX(),(short)e.getY()); >+ parent.repaint(); > } > > if (mousekey==1 && element instanceof LetterBox){ > ((Shape)element).setx2y2((short)e.getX(),(short)e.getY()); >+ parent.repaint(); > } > > if (mousekey==2){ > colorpicker.setNewColor(parent.matrix[e.getY()*DIM_X+e.getX()]); >+ parent.repaint(); > } > > } >@@ -265,11 +272,16 @@ > if (element != null) > ((Shape)element).setx2y2((short)e.getX(),(short)e.getY()); > } >+ >+ parent.repaint(); > } > >- if (mousekey==2) >+ if (mousekey==2){ > if (e.getX()>=0 && e.getX()<DIM_X && e.getY()>=0 && e.getY()<DIM_Y) > colorpicker.setNewColor(parent.matrix[e.getY()*DIM_X+e.getX()]); >+ >+ parent.repaint(); >+ } > > } > >@@ -293,6 +305,7 @@ > draw(element,parent.matrix); > send(element); > element=null; >+ parent.repaint(); > } > } > mousekey=0; >diff -Naur drawboard-1.52-old/source/Communicator.java drawboard-1.52/source/Communicator.java >--- drawboard-1.52-old/source/Communicator.java 2004-08-07 16:45:06.000000000 +0100 >+++ drawboard-1.52/source/Communicator.java 2005-08-12 02:31:46.000000000 +0100 >@@ -201,6 +201,7 @@ > menu.setPeople(((Pinger)a).people); // People counter > > table.draw(a,parent.matrix); >+ parent.repaint(); > > }catch (IOException e){ > System.out.println(Lang.get("IO Exception in second thread: ")+e); >@@ -288,4 +289,4 @@ > void addToQueue(Object o){ > v.addElement(o); > } >-} >\ No newline at end of file >+} >diff -Naur drawboard-1.52-old/source/Main.java drawboard-1.52/source/Main.java >--- drawboard-1.52-old/source/Main.java 2004-08-07 15:42:28.000000000 +0100 >+++ drawboard-1.52/source/Main.java 2005-08-12 02:31:00.000000000 +0100 >@@ -25,7 +25,7 @@ > import java.util.*; > import java.io.*; > >-public class Main extends Applet implements Runnable{ >+public class Main extends Applet{ > static short RIGHT_MARGIN=100; // Menu width > static short BOTTOM_MARGIN=50; // Colorpicker height > static short DIM_X, DIM_Y; // Window dimensions >@@ -37,7 +37,6 @@ > volatile Image bgImage; // Offline image > volatile int matrix[]; // Offline image array > volatile int matrix2[]; // Temporary offline image array >- Thread repainter; // Image repaint thread > boolean listenersInitialized=false; // Initializes event listeners when images loaded > > Board board; // Blackboard instance >@@ -102,12 +101,8 @@ > matrix2[i]=initBgColor; > } > >- // Initialize image generator and start repainter > bgSource=new MemoryImageSource((DIM_X-RIGHT_MARGIN),(DIM_Y-BOTTOM_MARGIN), ColorModel.getRGBdefault(), matrix2, 0, (DIM_X-RIGHT_MARGIN)); > bgImage = createImage(bgSource); >- repainter=new Thread(this); >- repainter.setPriority(Thread.MIN_PRIORITY); >- repainter.start(); > > this.setLayout(null); > >@@ -164,6 +159,8 @@ > menu.tracker.waitForAll(100); > }catch(InterruptedException e){} > } >+ >+ repaint(); > } > > >@@ -173,19 +170,6 @@ > comm.communicatorclosing=true; > } > >- // ============================================================================= >- // Subthread, repaints image >- public void run(){ >- while(true){ >- repaint(); >- try{ >- Thread.sleep(50); >- } >- catch (InterruptedException e){ >- System.out.println(Lang.get("repaint thread interrupted")); >- } >- } >- } > > // ============================================================================= > // Blackboard area repaint >@@ -210,8 +194,7 @@ > comm.communicatorclosing=true; > } > }else{ >- g.setColor(new Color(menuBgColor)); >- g.fillRect(0,0,DIM_X,DIM_Y); >+ update(g); > } > } >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 101820
:
65497
|
65498
|
65499
|
65500
|
72497
| 72498