JavaVi - vi/vim editor clone l2f-sheet
Brought to you by:
err
This repo only has sheet and some common swing to get sheet to work; used in
jVi. The source is based on 7.3 I guess, that's what's in Version. jVi has
been tested with the latest I've seen 7.4-SNAPSHOT; it add track(component)
methods for a few things.
https://github.com/jmoraleda/l2fprod-common looks like a good start; it
updates nachocalendar version and builds with jdk1.8; I set compiler version
to 1.8 in pom. It does not build with jdk-17, gets a strange error during
compile; I'm guessing it comes from the nachocalendar jar. Perhaps building
nachocal from source might fix it. Comment out dependency on nachocal and
remove it's property editory and it builds with 17.
Note: using a full release, rather than this abbriviated repo, only need to
include shared and sheet.
PROPERTY DESCRIPTION TEXT COLOR
===============================
There's a patch I added, which fixes a bug; the problem is that with a dark
L&F, the property description is almost invisible. The patch sets the
forground color on the HTMLDocument with the foreground color from the
document's JEditorPane. The patch is removed in this source, as seen in the
diff below, and the fixups is handled in OptionSheet.java in jVi so that
unmodified l2fprod works.
private void fixupDescriptionForeground(PropertySheetPanel psp)
{
//sheet.getComponents()[1]
// .getComponents()[2]
// .getViewport().getView()
// .getDocument().getStyleSheet().addRule(fgColorStyle)
...
int fgRGB = editorPane.getForeground().getRGB() & 0xffffff;
String fgColorStyle = String.format("body { color: #%06x; }", fgRGB);
ss.addRule(fgColorStyle);
diff --git a/l2f-sheet/src/com/l2fprod/common/swing/LookAndFeelTweaks.java b/l2f-sheet/src/com/l2fprod/common/swing/LookAndFeelTweaks.java
--- a/l2f-sheet/src/com/l2fprod/common/swing/LookAndFeelTweaks.java
+++ b/l2f-sheet/src/com/l2fprod/common/swing/LookAndFeelTweaks.java
@@ -108,8 +108,8 @@
+ "; font-size: "
+ font.getSize()
+ "pt;"
- + "color: "
- + String.format("#%06x;", component.getForeground().getRGB() & 0xffffff)
+ // + "color: "
+ // + String.format("#%06x;", component.getForeground().getRGB() & 0xffffff)
+ " }"
+ "a, p, li { margin-top: 0; margin-bottom: 0; margin-left: 0; margin-right: 0; font-family: "
+ font.getName()