This repository has been archived by the owner on Jul 23, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
522 additions
and
24 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,117 @@ | ||
regex:/java.desktop/apple/laf/(?!JRSUIFocus\.class)[_a-zA-Z0-9\.\$]+ | ||
regex:/java.desktop/sun/swing/(?!FilePane\$DetailsTableRowSorter\$2\.class)[_a-zA-Z0-9\.\$]+ | ||
regex:/java.desktop/sun/swing/plaf/(?!GTKKeybindings\.class)[_a-zA-Z0-9\.\$]+ | ||
regex:/java.desktop/sun/swing/plaf/synth/(?!SynthFileChooserUIImpl\$DirectoryComboBoxAction\.class)[_a-zA-Z0-9\.\$]+ | ||
regex:/java.desktop/sun/swing/table/(?!DefaultTableCellHeaderRenderer\.class)[_a-zA-Z0-9\.\$]+ | ||
regex:/java.desktop/sun/swing/text/(?!TextComponentPrintable\$9\.class)[_a-zA-Z0-9\.\$]+ | ||
regex:/java.desktop/sun/swing/text/html/(?!FrameEditorPaneTag\.class)[_a-zA-Z0-9\.\$]+ | ||
regex:/java.desktop/sun/swing/icon/(?!SortArrowIcon\.class)[_a-zA-Z0-9\.\$]+ | ||
regex:/java.desktop/sun/print/(?!RasterPrinterJob\.class)[_a-zA-Z0-9\.\$]+ | ||
regex:/java.desktop/sun/print/resources/(?!orientRevPortrait\.png)[_a-zA-Z0-9\.\$]+ | ||
regex:/java.desktop/sun/java2d/(?!Spans\$Span\.class)[_a-zA-Z0-9\.\$]+ | ||
regex:/java.desktop/sun/java2d/cmm/(?!PCMM\.class)[_a-zA-Z0-9\.\$]+ | ||
regex:/java.desktop/sun/java2d/cmm/lcms/(?!LcmsServiceProvider\.class)[_a-zA-Z0-9\.\$]+ | ||
regex:/java.desktop/sun/java2d/cmm/profiles/(?!sRGB\.pf)[_a-zA-Z0-9\.\$]+ | ||
regex:/java.desktop/sun/java2d/marlin/(?!DTransformingPathConsumer2D\$ClosedPathDetector\.class)[_a-zA-Z0-9\.\$]+ | ||
regex:/java.desktop/sun/java2d/marlin/stats/(?!StatLong\.class)[_a-zA-Z0-9\.\$]+ | ||
regex:/java.desktop/sun/java2d/pipe/(?!BufferedBufImgOps\.class)[_a-zA-Z0-9\.\$]+ | ||
regex:/java.desktop/sun/java2d/pipe/hw/(?!AccelTypedVolatileImage\.class)[_a-zA-Z0-9\.\$]+ | ||
regex:/java.desktop/sun/java2d/loops/(?!FillRect\$General\.class)[_a-zA-Z0-9\.\$]+ | ||
regex:/java.desktop/sun/java2d/opengl/(?!CGLVolatileSurfaceManager\.class)[_a-zA-Z0-9\.\$]+ | ||
regex:/java.desktop/sun/awt/(?!WeakIdentityHashMap\$WeakKey\.class)[_a-zA-Z0-9\.\$]+ | ||
regex:/java.desktop/sun/awt/util/(?!PerformanceLogger\$1\.class)[_a-zA-Z0-9\.\$]+ | ||
regex:/java.desktop/sun/awt/shell/(?!ShellFolder\.class)[_a-zA-Z0-9\.\$]+ | ||
regex:/java.desktop/sun/awt/dnd/(?!SunDropTargetContextPeer\$EventDispatcher\.class)[_a-zA-Z0-9\.\$]+ | ||
regex:/java.desktop/sun/awt/resources/(?!awt\.class)[_a-zA-Z0-9\.\$]+ | ||
regex:/java.desktop/sun/awt/resources/cursors/(?!CopyDrop32x32\.gif)[_a-zA-Z0-9\.\$]+ | ||
regex:/java.desktop/sun/awt/www/content/(?!MultimediaContentHandlers\.class)[_a-zA-Z0-9\.\$]+ | ||
regex:/java.desktop/sun/awt/www/content/image/(?!x_xbitmap\.class)[_a-zA-Z0-9\.\$]+ | ||
regex:/java.desktop/sun/awt/www/content/audio/(?!x_wav\.class)[_a-zA-Z0-9\.\$]+ | ||
regex:/java.desktop/sun/awt/image/(?!PixelConverter\$Ushort555Rgbx\.class)[_a-zA-Z0-9\.\$]+ | ||
regex:/java.desktop/sun/awt/datatransfer/(?!DataTransferer\$ReencodingInputStream\.class)[_a-zA-Z0-9\.\$]+ | ||
regex:/java.desktop/sun/awt/geom/(?!Order2\.class)[_a-zA-Z0-9\.\$]+ | ||
regex:/java.desktop/sun/awt/im/(?!ExecutableInputMethodManager\$3\.class)[_a-zA-Z0-9\.\$]+ | ||
regex:/java.desktop/sun/awt/event/(?!IgnorePaintEvent\.class)[_a-zA-Z0-9\.\$]+ | ||
regex:/java.desktop/sun/font/(?!CMap\$CMapFormat0\.class)[_a-zA-Z0-9\.\$]+ | ||
regex:/java.desktop/sun/font/lookup/(?!JDKFontLookup\.class)[_a-zA-Z0-9\.\$]+ | ||
regex:/java.desktop/sun/lwawt/(?!LWContainerPeer\.class)[_a-zA-Z0-9\.\$]+ | ||
regex:/java.desktop/sun/lwawt/macosx/(?!CSystemTray\.class)[_a-zA-Z0-9\.\$]+ | ||
regex:/java.desktop/java/applet/(?!AudioClip\.class)[_a-zA-Z0-9\.\$]+ | ||
regex:/java.desktop/java/awt/(?!GraphicsCallback\$PaintHeavyweightComponentsCallback\.class)[_a-zA-Z0-9\.\$]+ | ||
regex:/java.desktop/java/awt/dnd/(?!InvalidDnDOperationException\.class)[_a-zA-Z0-9\.\$]+ | ||
regex:/java.desktop/java/awt/dnd/peer/(?!DragSourceContextPeer\.class)[_a-zA-Z0-9\.\$]+ | ||
regex:/java.desktop/java/awt/color/(?!ProfileDataException\.class)[_a-zA-Z0-9\.\$]+ | ||
regex:/java.desktop/java/awt/desktop/(?!FilesEvent\.class)[_a-zA-Z0-9\.\$]+ | ||
regex:/java.desktop/java/awt/peer/(?!ButtonPeer\.class)[_a-zA-Z0-9\.\$]+ | ||
regex:/java.desktop/java/awt/print/(?!PrinterException\.class)[_a-zA-Z0-9\.\$]+ | ||
regex:/java.desktop/java/awt/image/(?!DataBufferUShort\.class)[_a-zA-Z0-9\.\$]+ | ||
regex:/java.desktop/java/awt/image/renderable/(?!ContextualRenderedImageFactory\.class)[_a-zA-Z0-9\.\$]+ | ||
regex:/java.desktop/java/awt/geom/(?!Point2D\$Float\.class)[_a-zA-Z0-9\.\$]+ | ||
regex:/java.desktop/java/awt/im/(?!InputContext\.class)[_a-zA-Z0-9\.\$]+ | ||
regex:/java.desktop/java/awt/im/spi/(?!InputMethod\.class)[_a-zA-Z0-9\.\$]+ | ||
regex:/java.desktop/java/awt/font/(?!ImageGraphicAttribute\.class)[_a-zA-Z0-9\.\$]+ | ||
regex:/java.desktop/java/awt/event/(?!KeyListener\.class)[_a-zA-Z0-9\.\$]+ | ||
regex:/java.desktop/javax/swing/(?!JInternalFrame\$AccessibleJInternalFrame\.class)[_a-zA-Z0-9\.\$]+ | ||
regex:/java.desktop/javax/swing/border/(?!BevelBorder\.class)[_a-zA-Z0-9\.\$]+ | ||
regex:/java.desktop/javax/swing/tree/(?!FixedHeightLayoutCache\$VisibleFHTreeStateNodeEnumeration\.class)[_a-zA-Z0-9\.\$]+ | ||
regex:/java.desktop/javax/swing/filechooser/(?!FileNameExtensionFilter\.class)[_a-zA-Z0-9\.\$]+ | ||
regex:/java.desktop/javax/swing/plaf/(?!TextUI\.class)[_a-zA-Z0-9\.\$]+ | ||
regex:/java.desktop/javax/swing/plaf/metal/(?!MetalLookAndFeel\$AATextListener\$1\.class)[_a-zA-Z0-9\.\$]+ | ||
regex:/java.desktop/javax/swing/plaf/metal/sounds/(?!PopupMenuPopup\.wav)[_a-zA-Z0-9\.\$]+ | ||
regex:/java.desktop/javax/swing/plaf/metal/icons/ocean/(?!info\.png)[_a-zA-Z0-9\.\$]+ | ||
regex:/java.desktop/javax/swing/plaf/metal/icons/(?!Error\.gif)[_a-zA-Z0-9\.\$]+ | ||
regex:/java.desktop/javax/swing/plaf/multi/(?!MultiScrollBarUI\.class)[_a-zA-Z0-9\.\$]+ | ||
regex:/java.desktop/javax/swing/plaf/basic/(?!BasicColorChooserUI\$Handler\.class)[_a-zA-Z0-9\.\$]+ | ||
regex:/java.desktop/javax/swing/plaf/basic/icons/(?!JavaCup16\.png)[_a-zA-Z0-9\.\$]+ | ||
regex:/java.desktop/javax/swing/plaf/synth/(?!SynthRootPaneUI\.class)[_a-zA-Z0-9\.\$]+ | ||
regex:/java.desktop/javax/swing/plaf/nimbus/(?!ComboBoxArrowButtonEditableState\.class)[_a-zA-Z0-9\.\$]+ | ||
regex:/java.desktop/javax/swing/undo/(?!AbstractUndoableEdit\.class)[_a-zA-Z0-9\.\$]+ | ||
regex:/java.desktop/javax/swing/table/(?!TableRowSorter\.class)[_a-zA-Z0-9\.\$]+ | ||
regex:/java.desktop/javax/swing/colorchooser/(?!SwatchPanel\.class)[_a-zA-Z0-9\.\$]+ | ||
regex:/java.desktop/javax/swing/text/(?!DefaultEditorKit\$PreviousWordAction\.class)[_a-zA-Z0-9\.\$]+ | ||
regex:/java.desktop/javax/swing/text/rtf/(?!Constants\.class)[_a-zA-Z0-9\.\$]+ | ||
regex:/java.desktop/javax/swing/text/rtf/charsets/(?!ansi\.txt)[_a-zA-Z0-9\.\$]+ | ||
regex:/java.desktop/javax/swing/text/html/(?!HiddenTagView\.class)[_a-zA-Z0-9\.\$]+ | ||
regex:/java.desktop/javax/swing/text/html/parser/(?!ContentModelState\.class)[_a-zA-Z0-9\.\$]+ | ||
regex:/java.desktop/javax/swing/event/(?!TreeSelectionListener\.class)[_a-zA-Z0-9\.\$]+ | ||
regex:/java.desktop/javax/swing/beaninfo/images/(?!JButtonMono16\.gif)[_a-zA-Z0-9\.\$]+ | ||
regex:/java.desktop/javax/print/(?!MultiDocPrintJob\.class)[_a-zA-Z0-9\.\$]+ | ||
regex:/java.desktop/javax/print/attribute/(?!SupportedValuesAttribute\.class)[_a-zA-Z0-9\.\$]+ | ||
regex:/java.desktop/javax/print/attribute/standard/(?!MediaSize\$JIS\.class)[_a-zA-Z0-9\.\$]+ | ||
regex:/java.desktop/javax/print/event/(?!PrintJobListener\.class)[_a-zA-Z0-9\.\$]+ | ||
regex:/java.desktop/javax/imageio/(?!ImageIO\$CacheInfo\.class)[_a-zA-Z0-9\.\$]+ | ||
regex:/java.desktop/javax/imageio/plugins/jpeg/(?!JPEGHuffmanTable\.class)[_a-zA-Z0-9\.\$]+ | ||
regex:/java.desktop/javax/imageio/plugins/bmp/(?!BMPImageWriteParam\.class)[_a-zA-Z0-9\.\$]+ | ||
regex:/java.desktop/javax/imageio/plugins/tiff/(?!BaselineTIFFTagSet\.class)[_a-zA-Z0-9\.\$]+ | ||
regex:/java.desktop/javax/imageio/stream/(?!FileImageOutputStream\.class)[_a-zA-Z0-9\.\$]+ | ||
regex:/java.desktop/javax/imageio/spi/(?!ImageTranscoderSpi\.class)[_a-zA-Z0-9\.\$]+ | ||
regex:/java.desktop/javax/imageio/event/(?!IIOWriteWarningListener\.class)[_a-zA-Z0-9\.\$]+ | ||
regex:/java.desktop/javax/imageio/metadata/(?!IIOInvalidTreeException\.class)[_a-zA-Z0-9\.\$]+ | ||
regex:/java.desktop/javax/accessibility/(?!AccessibleContext\$1\.class)[_a-zA-Z0-9\.\$]+ | ||
regex:/java.desktop/javax/sound/sampled/(?!Control\.class)[_a-zA-Z0-9\.\$]+ | ||
regex:/java.desktop/javax/sound/sampled/spi/(?!MixerProvider\.class)[_a-zA-Z0-9\.\$]+ | ||
regex:/java.desktop/javax/sound/midi/(?!Receiver\.class)[_a-zA-Z0-9\.\$]+ | ||
regex:/java.desktop/javax/sound/midi/spi/(?!MidiFileWriter\.class)[_a-zA-Z0-9\.\$]+ | ||
regex:/java.desktop/com/apple/eio/(?!FileManager\.class)[_a-zA-Z0-9\.\$]+ | ||
regex:/java.desktop/com/apple/laf/(?!AquaFonts\$5\.class)[_a-zA-Z0-9\.\$]+ | ||
regex:/java.desktop/com/apple/laf/resources/(?!aqua_ja\.class)[_a-zA-Z0-9\.\$]+ | ||
regex:/java.desktop/com/apple/eawt/(?!_AppEventHandler\$_NativeEvent\.class)[_a-zA-Z0-9\.\$]+ | ||
regex:/java.desktop/com/apple/eawt/event/(?!GesturePhaseEvent\.class)[_a-zA-Z0-9\.\$]+ | ||
regex:/java.desktop/com/sun/swing/internal/plaf/metal/resources/(?!metal_zh_CN\.class)[_a-zA-Z0-9\.\$]+ | ||
regex:/java.desktop/com/sun/swing/internal/plaf/basic/resources/(?!basic_ja\.class)[_a-zA-Z0-9\.\$]+ | ||
regex:/java.desktop/com/sun/swing/internal/plaf/synth/resources/(?!synth_zh_CN\.class)[_a-zA-Z0-9\.\$]+ | ||
regex:/java.desktop/com/sun/java/swing/plaf/motif/(?!MotifDesktopIconUI\.class)[_a-zA-Z0-9\.\$]+ | ||
regex:/java.desktop/com/sun/java/swing/plaf/motif/resources/(?!motif\.class)[_a-zA-Z0-9\.\$]+ | ||
regex:/java.desktop/com/sun/java/swing/plaf/motif/icons/(?!Error\.gif)[_a-zA-Z0-9\.\$]+ | ||
regex:/java.desktop/com/sun/java/swing/(?!SwingUtilities3\.class)[_a-zA-Z0-9\.\$]+ | ||
regex:/java.desktop/com/sun/imageio/plugins/png/(?!PNGImageReader\.class)[_a-zA-Z0-9\.\$]+ | ||
regex:/java.desktop/com/sun/imageio/plugins/common/(?!BitFile\.class)[_a-zA-Z0-9\.\$]+ | ||
regex:/java.desktop/com/sun/imageio/plugins/wbmp/(?!WBMPImageReader\.class)[_a-zA-Z0-9\.\$]+ | ||
regex:/java.desktop/com/sun/imageio/plugins/jpeg/(?!JPEGImageReader\.class)[_a-zA-Z0-9\.\$]+ | ||
regex:/java.desktop/com/sun/imageio/plugins/bmp/(?!BMPImageReader\$1\.class)[_a-zA-Z0-9\.\$]+ | ||
regex:/java.desktop/com/sun/imageio/plugins/tiff/(?!TIFFDeflater\.class)[_a-zA-Z0-9\.\$]+ | ||
regex:/java.desktop/com/sun/imageio/plugins/gif/(?!GIFImageWriteParam\.class)[_a-zA-Z0-9\.\$]+ | ||
regex:/java.desktop/com/sun/imageio/stream/(?!StreamCloser\.class)[_a-zA-Z0-9\.\$]+ | ||
regex:/java.desktop/com/sun/imageio/spi/(?!RAFImageOutputStreamSpi\.class)[_a-zA-Z0-9\.\$]+ | ||
regex:/java.desktop/com/sun/accessibility/internal/resources/(?!accessibility\.class)[_a-zA-Z0-9\.\$]+ | ||
regex:/java.desktop/com/sun/media/sound/(?!AudioFloatFormatConverter\.class)[_a-zA-Z0-9\.\$]+ |
This file contains 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
This file contains 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
This file contains 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
34 changes: 34 additions & 0 deletions
34
src/main/java/net/dongliu/proxy/ui/ico/BitmapFileHeader.java
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package net.dongliu.proxy.ui.ico; | ||
|
||
import java.nio.ByteBuffer; | ||
import java.nio.ByteOrder; | ||
|
||
public class BitmapFileHeader { | ||
public static final int SIZE = 14; | ||
private short magic; | ||
private int size; | ||
private short reserved1; | ||
private short reserved2; | ||
private int dataOffset; | ||
|
||
public BitmapFileHeader(short magic, int size, short reserved1, short reserved2, int dataOffset) { | ||
this.magic = magic; | ||
this.size = size; | ||
this.reserved1 = reserved1; | ||
this.reserved2 = reserved2; | ||
this.dataOffset = dataOffset; | ||
} | ||
|
||
public static BitmapFileHeader newHeader(int size, int dataOffset) { | ||
return new BitmapFileHeader((short) 0x4d42, size, (short) 0, (short) 0, dataOffset); | ||
} | ||
|
||
public void encode(ByteBuffer buffer) { | ||
buffer.order(ByteOrder.LITTLE_ENDIAN) | ||
.putShort(magic) | ||
.putInt(size) | ||
.putShort(reserved1) | ||
.putShort(reserved2) | ||
.putInt(dataOffset); | ||
} | ||
} |
94 changes: 94 additions & 0 deletions
94
src/main/java/net/dongliu/proxy/ui/ico/BitmapInfoHeader.java
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
package net.dongliu.proxy.ui.ico; | ||
|
||
import java.nio.ByteBuffer; | ||
|
||
public class BitmapInfoHeader { | ||
private int headerSize; | ||
private int width; | ||
private int height; | ||
private short planeNum; | ||
private short bitsPerPixel; | ||
private int compression; | ||
private int imageSize; | ||
private int xpixelsPerM; | ||
private int ypixelsPerM; | ||
private int colorsUsed; | ||
private int colorsImportant; | ||
|
||
public static final int SIZE = 40; | ||
|
||
public BitmapInfoHeader(int headerSize, int width, int height, short planeNum, short bitsPerPixel, int compression, | ||
int imageSize, int xpixelsPerM, int ypixelsPerM, int colorsUsed, int colorsImportant) { | ||
this.headerSize = headerSize; | ||
this.width = width; | ||
this.height = height; | ||
this.planeNum = planeNum; | ||
this.bitsPerPixel = bitsPerPixel; | ||
this.compression = compression; | ||
this.imageSize = imageSize; | ||
this.xpixelsPerM = xpixelsPerM; | ||
this.ypixelsPerM = ypixelsPerM; | ||
this.colorsUsed = colorsUsed; | ||
this.colorsImportant = colorsImportant; | ||
} | ||
|
||
public static BitmapInfoHeader decode(ByteBuffer buffer) { | ||
return new BitmapInfoHeader( | ||
buffer.getInt(), | ||
buffer.getInt(), | ||
buffer.getInt(), | ||
buffer.getShort(), | ||
buffer.getShort(), | ||
buffer.getInt(), | ||
buffer.getInt(), | ||
buffer.getInt(), | ||
buffer.getInt(), | ||
buffer.getInt(), | ||
buffer.getInt() | ||
); | ||
} | ||
|
||
public int headerSize() { | ||
return Unsigns.ensure(headerSize); | ||
} | ||
|
||
public int width() { | ||
return Unsigns.ensure(width); | ||
} | ||
|
||
public int height() { | ||
return Unsigns.ensure(height); | ||
} | ||
|
||
public int planeNum() { | ||
return Short.toUnsignedInt(planeNum); | ||
} | ||
|
||
public int bitsPerPixel() { | ||
return Short.toUnsignedInt(bitsPerPixel); | ||
} | ||
|
||
public int compression() { | ||
return compression; | ||
} | ||
|
||
public int imageSize() { | ||
return Unsigns.ensure(imageSize); | ||
} | ||
|
||
public int xpixelsPerM() { | ||
return Unsigns.ensure(xpixelsPerM); | ||
} | ||
|
||
public int ypixelsPerM() { | ||
return Unsigns.ensure(ypixelsPerM); | ||
} | ||
|
||
public int colorsUsed() { | ||
return Unsigns.ensure(colorsUsed); | ||
} | ||
|
||
public int colorsImportant() { | ||
return Unsigns.ensure(colorsImportant); | ||
} | ||
} |
Oops, something went wrong.