mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-06-07 23:25:07 +00:00
comments removed
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user