diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/Main.java b/trunk/src/com/jpexs/decompiler/flash/gui/Main.java index adccd5d06..676b3a879 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/Main.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/Main.java @@ -630,103 +630,7 @@ public class Main { initLang(); View.setLookAndFeel(); - - /*View.execInEventDispatch(new Runnable() { - @Override - public void run() { - new JFrame() { - private int size = 15*1024; - @Override - public void setVisible(boolean b) { - addKeyListener(new KeyAdapter() { - - @Override - public void keyPressed(KeyEvent e) { - size+=10; - repaint(); - } - - }); - addWindowListener(new WindowAdapter(){ - - @Override - public void windowClosing(WindowEvent e) { - super.windowClosing(e); - System.exit(0); - } - - }); - getContentPane().add(new JPanel() { - @Override - protected void paintComponent(Graphics g) { - Graphics2D g2d = (Graphics2D) g; - AffineTransform t = AffineTransform.getTranslateInstance(0, 0); - t.translate(200, 400); - t.scale((((float)size)/1024)/(2000),(((float)size)/1024)/2000); - - g2d.setTransform(t); - - Font f = new Font("Cordia New", 0, size); - GlyphVector v = f.createGlyphVector((new JPanel()).getFontMetrics(f).getFontRenderContext(), "C"); - Shape shp = v.getOutline(); - g2d.setPaint(Color.black); - g.setColor(Color.black); - double points[] = new double[6]; - double lastX = 0; - double lastY = 0; - double startX = 0; - double startY = 0; - GeneralPath path=new GeneralPath(); - for (PathIterator it = shp.getPathIterator(null); !it.isDone(); it.next()) { - int type = it.currentSegment(points); - - switch (type) { - case PathIterator.SEG_MOVETO: - - lastX = (points[0]); - lastY = (points[1]); - startX = lastX; - startY = lastY; - path.moveTo(lastX, lastY); - break; - case PathIterator.SEG_LINETO: - //g2d.drawLine((int) lastX, (int) lastY, (int) points[0], (int) points[1]); - lastX = (points[0]); - lastY = (points[1]); - path.lineTo(lastX, lastY); - break; - case PathIterator.SEG_CUBICTO: - throw new RuntimeException("NOCUBIC"); - case PathIterator.SEG_QUADTO: - //g2d.draw(new QuadCurve2D.Double(lastX, lastY, points[0], points[1], points[2], points[3])); - path.quadTo(points[0], points[1], points[2], points[3]); - lastX = (points[2]); - lastY = (points[3]); - break; - case PathIterator.SEG_CLOSE: //Closing line back to last SEG_MOVETO - if ((startX == lastX) && (startY == lastY)) { - break; - } - //g2d.drawLine((int) lastX, (int) lastY, (int) points[0], (int) points[1]); - path.lineTo(startX, startY); - lastX = startX; - lastY = startY; - break; - } - } - g2d.draw(path); - } - }); - setDefaultCloseOperation(HIDE_ON_CLOSE); - setSize(500, 500); - super.setVisible(b); - } - }.setVisible(true); - } - }); - if (true) { - return; - }//*/ + if ((Boolean) Configuration.getConfig("cacheOnDisk", Boolean.TRUE)) { Cache.setStorageType(Cache.STORAGE_FILES); } else { diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/View.java b/trunk/src/com/jpexs/decompiler/flash/gui/View.java index 3b2304563..0400b56d6 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/View.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/View.java @@ -53,21 +53,12 @@ public class View { * Sets windows Look and Feel */ public static void setLookAndFeel() { + try { -//if(true)return; - //System.setProperty("peacock.appButtonSize", "32"); - /*try { - UIManager.setLookAndFeel("org.fife.plaf.OfficeXP.OfficeXPLookAndFeel"); - } catch (UnsupportedLookAndFeelException | ClassNotFoundException | InstantiationException | IllegalAccessException ignored) { - ignored.printStackTrace(); - }*/ - /*try { - - UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); - - } catch (UnsupportedLookAndFeelException | ClassNotFoundException | InstantiationException | IllegalAccessException ignored) { - }*/ + UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); + } catch (UnsupportedLookAndFeelException | ClassNotFoundException | InstantiationException | IllegalAccessException ignored) { + } try { SwingUtilities.invokeAndWait(new Runnable() {