This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // TODO: This successfully replaces the icon but the EXE won't run afterwards | |
| package com.company; | |
| import com.kichik.pecoff4j.PE; | |
| import com.kichik.pecoff4j.ResourceDirectory; | |
| import com.kichik.pecoff4j.ResourceDirectoryTable; | |
| import com.kichik.pecoff4j.ResourceEntry; | |
| import com.kichik.pecoff4j.constant.ResourceType; | |
| import com.kichik.pecoff4j.io.DataReader; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package org.hid4java.jna; | |
| import com.sun.jna.Pointer; | |
| import com.sun.jna.WString; | |
| import java.util.concurrent.ExecutionException; | |
| import java.util.concurrent.ExecutorService; | |
| import java.util.concurrent.Executors; | |
| public class DarwinHidApiExecutionWrapper implements DarwinHidApiLibrary { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import javafx.application.Platform; | |
| import javafx.embed.swing.SwingFXUtils; | |
| import javafx.print.JobSettings; | |
| import javafx.print.PrintColor; | |
| import javafx.scene.Node; | |
| import javafx.scene.image.ImageView; | |
| import java.awt.*; | |
| import java.awt.image.BufferedImage; | |
| import java.awt.print.*; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [DEBUG] 2023-10-10T18:29:08,833 @ qz.ws.PrintSocketClient:116 | |
| Message: {"call":"print","params":{"printer":{"name":"Boca BIDI FGL 26\/46 200 DPI"},"options":{"bounds":null,"colorType":"color","copies":1,"density":0,"duplex":false,"fallbackDensity":null,"interpolation":"bicubic","jobName":null,"legacy":false,"margins":0,"orientation":null,"paperThickness":null,"printerTray":null,"rasterize":false,"rotation":0,"scaleContent":true,"size":null,"units":"in","forceRaw":false,"encoding":null,"spool":{}},"data":[{"type":"raw","format":"command","flavor":"file","data":"https:\/\/demo.qz.io\/assets\/fgl_sample.txt"}]},"signature":"","timestamp":1696976948831,"uid":"xtue20","position":{"x":960,"y":525},"signAlgorithm":"SHA512"} | |
| [WARN] 2023-10-10T18:29:08,834 @ qz.ws.PrintSocketClient:158 | |
| Bad signature on request | |
| [DEBUG] 2023-10-10T18:29:08,857 @ qz.common.TrayManager:538 | |
| Calculated dialog centered at: java.awt.Point[x=960,y=525] | |
| [INFO] 2023-10-10T18:29:09,825 @ qz.common.TrayManager:498 | |
| Allowed localhost to print t |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import javax.print.PrintService; | |
| import javax.print.PrintServiceLookup; | |
| public class ServiceTest { | |
| public static void main(String[] args) { | |
| long n = 0; | |
| // System.setProperty("sun.java2d.print.polling", "false"); | |
| PrintService[] services = PrintServiceLookup.lookupPrintServices(null, null); | |
| while (true) { | |
| long start = System.nanoTime(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import javax.swing.*; | |
| import java.awt.*; | |
| import java.awt.event.WindowAdapter; | |
| import java.awt.event.WindowEvent; | |
| import java.lang.reflect.InvocationTargetException; | |
| public class DialogTest { | |
| public static void main(String[] args) throws InterruptedException, InvocationTargetException { | |
| final JDialog dialog = new JDialog((Frame)null, | |
| "Close me", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.awt.*; | |
| import java.awt.geom.Area; | |
| public class MouseTest { | |
| public static void main(String[] args) { | |
| GraphicsDevice[] devices = GraphicsEnvironment.getLocalGraphicsEnvironment().getScreenDevices(); | |
| Area area = new Area(); | |
| for (GraphicsDevice gd : devices) { | |
| for (GraphicsConfiguration gc : gd.getConfigurations()) { | |
| area.add(new Area(gc.getBounds())); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import javax.swing.*; | |
| import java.awt.*; | |
| import java.awt.event.WindowAdapter; | |
| import java.awt.event.WindowEvent; | |
| import java.lang.reflect.InvocationTargetException; | |
| public class DialogTest { | |
| public static void main(String[] args) throws InterruptedException, InvocationTargetException { | |
| final JDialog dialog = new JDialog((Frame)null, | |
| "Close me", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import javax.swing.*; | |
| import java.awt.*; | |
| import java.awt.event.ActionEvent; | |
| import java.awt.event.ActionListener; | |
| public class DialogTest { | |
| public static void main(String[] args) { | |
| DemoDialog test = new DemoDialog(null, 1); | |
| test.setLocation(0,0); | |
| test.setVisible(true); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import javax.print.PrintServiceLookup; | |
| import java.awt.*; | |
| import java.awt.image.BufferedImage; | |
| import java.awt.print.*; | |
| public class PrintTest { | |
| private static double docWidth = 2.25 * 72; | |
| private static double docHeight = 1.25 * 72; | |
| public static void main(String[] args) throws PrinterException { |
NewerOlder