public void method389(boolean flag1, int i, int j, String s, int k) { aBoolean1499 = false; int l = i; if (s == null) return; k -= anInt1497; for (int i1 = 0; i1 < s.length(); i1++) if (s.charAt(i1) == '@' && i1 + 4 < s.length() && s.charAt(i1 + 4) == '@') { int j1 = getColorByName(s.substring(i1 + 1, i1 + 4)); if (j1 != -1) j = j1; i1 += 4; } else { char c = s.charAt(i1); if (c != ' ') { if (flag1) method392( aByteArrayArray1491[c], i + anIntArray1494[c] + 1, k + anIntArray1495[c] + 1, anIntArray1492[c], anIntArray1493[c], 0); method392( aByteArrayArray1491[c], i + anIntArray1494[c], k + anIntArray1495[c], anIntArray1492[c], anIntArray1493[c], j); } i += anIntArray1496[c]; } if (aBoolean1499) DrawingArea.method339( k + (int) ((double) anInt1497 * 0.69999999999999996D), 0x800000, i - l, l); }
private synchronized void sendEvent(MouseEvent event, boolean pressed) { DoodleEvent e = new DoodleEvent(event.getPoint(), pressed, getPressure()); if (observer != null) { observer.sendDoodle(e); } else { area.performEvent(e); } }
/** * This method handels the creation of a new DrawingArea * * @param projectName Name of project created */ private void createDrawing(String projectName) { if (firstStartup) { dailyTips(); firstStartup = false; } drawingArea = new DrawingArea(toolbox, toolSettings, activeColorSettings); drawingArea.setProjectName(projectName.toLowerCase()); Dimension desktopSize = jDesktopPane.getSize(); Dimension jInternalFrameSize = drawingArea.getSize(); drawingArea.setLocation( (desktopSize.width - jInternalFrameSize.width) / 2, (desktopSize.height - jInternalFrameSize.height) / 2); drawingArea.setTitle("Prosjekt: " + projectName); drawingArea.setVisible(true); jDesktopPane.add(drawingArea); try { drawingArea.setSelected(true); } catch (PropertyVetoException e) { e.printStackTrace(); } }
/** * This method handles the loading of an existing project into a new DrawingArea. Gives feedback * to the user if project is not found or incompatible with the current version * * @param projectName Name of project to load */ private void loadDrawing(String projectName) { if (firstStartup) { dailyTips(); firstStartup = false; } drawingArea = new DrawingArea(toolbox, toolSettings, activeColorSettings); drawingArea.setProjectName(projectName.toLowerCase()); try { serialization.load(drawingArea, projectName.toLowerCase()); Dimension desktopSize = jDesktopPane.getSize(); Dimension jInternalFrameSize = drawingArea.getSize(); drawingArea.setLocation( (desktopSize.width - jInternalFrameSize.width) / 2, (desktopSize.height - jInternalFrameSize.height) / 2); drawingArea.setTitle("Prosjekt: " + projectName); drawingArea.setVisible(true); jDesktopPane.add(drawingArea); } catch (StorageException ex) { // ex.printStackTrace(); Toolkit.getDefaultToolkit().beep(); JOptionPane.showMessageDialog( null, "Fant ikke prosjektet på serveren.", "Feil", JOptionPane.ERROR_MESSAGE); } catch (IOException ex) { // ex.printStackTrace(); Toolkit.getDefaultToolkit().beep(); JOptionPane.showMessageDialog( null, "Dette prosjektet ble laget på en eldre versjon av programmet.\n" + "Dessverre er det ikke kompatibelt med nåværende versjon.", "Gammel versjon", JOptionPane.ERROR_MESSAGE); } catch (URISyntaxException | ClassNotFoundException ex) { ex.printStackTrace(); } try { drawingArea.setSelected(true); } catch (PropertyVetoException e) { e.printStackTrace(); } }
public void method343() { DrawingArea.initDrawingArea(myHeight, myWidth, myPixels); }