jidesoft / jide-oss Goto Github PK
View Code? Open in Web Editor NEWJIDE Common Layer
License: Other
JIDE Common Layer
License: Other
In LICENSE.txt, the link to the "Free Commercial" license is returning a 404:
http://www.jidesoft.com/purchase/EULA.htm
Might want to include a text version of the license in the project just in case.
On Big Sur run with Java 1.8 or 15 the JIDE code throws an error when parsing part of the Aqua Preferences file:
java.io.IOException: parseInt: unsupported byte count:16
at com.jidesoft.plaf.aqua.BinaryPListParser.parseInt(BinaryPListParser.java:673)
at com.jidesoft.plaf.aqua.BinaryPListParser.parseObjectTable(BinaryPListParser.java:424)
at com.jidesoft.plaf.aqua.BinaryPListParser.parse(BinaryPListParser.java:310)
at com.jidesoft.plaf.aqua.AquaPreferences.readPList(AquaPreferences.java:134)
at com.jidesoft.plaf.aqua.AquaPreferences.loadGlobalPreferences(AquaPreferences.java:90)
at com.jidesoft.plaf.aqua.AquaPreferences.get(AquaPreferences.java:62)
at com.jidesoft.plaf.aqua.AquaPreferences.getString(AquaPreferences.java:56)
at com.jidesoft.plaf.aqua.AquaJideUtils.isGraphite(AquaJideUtils.java:485)
Whether a tab is closeable or not is determined by its title:
if (_closableMap.containsKey(getTitleAt(index))) {
contains = true;
}
This means that if you have two tabs with the same title, setting one tab to closeable will inadvertently set it for both.
When I am extracting the sources jar using Ubuntu 16.04, I can not open the source files.
This seems to be caused by missing rights on the java files.
I have honestly no idea how this might have happened. But it seems to be the case.
The position of the popup of a JideTabbedPane with the list of all tabs is wrong when you work on a second screen that extends the desktop to the left of the main screen. The popup is then shown on the left border of the screen because the calculation of the popup position doesn't work with a negative screenposition.x value.
Hi ,
I have upgraded jide-oss-3.7.1.jar and trying to run my java application (webstart and applet) in client system with Java 9. But i am getting below error
Exception in thread "AWT-EventQueue-2" java.lang.IllegalAccessError: class com.jidesoft.plaf.LookAndFeelFactory (in unnamed module @0x2218f972) cannot access class com.sun.java.swing.plaf.windows.WindowsLookAndFeel (in module java.desktop) because module java.desktop does not export com.sun.java.swing.plaf.windows to unnamed module @0x2218f972
at com.jidesoft.plaf.LookAndFeelFactory.installJideExtension(Unknown Source)
at com.jidesoft.plaf.LookAndFeelFactory.installJideExtension(Unknown Source)
....
Can some one help me ,how to fix this
Hi, I got this warning when starting my app using jdk11.
jide: 3.7.1
os: ubuntu LTS 18.04.3
java: openjdk version "11.0.4" (build 11.0.4+11-post-Ubuntu-1ubuntu218.04.3)
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.jidesoft.swing.JideTabbedPane (file:/home/.../com/jidesoft/jide-common/3.7.1/jide-common-3.7.1.jar) to field javax.swing.JTabbedPane.visComp
WARNING: Please consider reporting this to the maintainers of com.jidesoft.swing.JideTabbedPane
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
I missing OpenSource Demos or Examples for this library.
The mentioned demo framework can not be used.
All demo files have a header like
/*
* @(#)xxx.java
*
* Copyright xxx JIDE Software Inc. All rights reserved.
*/
There is no note, that it is allowd to use the demo code in own projects.
And no, only because its "only" a demo and it gives the "feeling" that it is ok, to do it, don't giving really the right to do that.
Hi,
There seems to be only old versions available on maven central, is this intended?
See: http://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22com.jidesoft%22%20AND%20a%3A%22jide-oss%22
The tab shape Eclipse3x has a Memory leak and a Performance Issue if RTL is active. To recreate the issue start the JIDE Product demo and select the JideTabbedPane demo. Activate RTL, select the first tab (Mail) and open up the process explorer. Now you can see the cpu and memory usage is increasing.
I think is something about the Tab Border which is not drawn correctly. And the Issue only exists if RTL is active and the first (the rightmost tab) is selected.
I use code to detect EDT
thread violations (e.g. a non-EDT
thread modifies the Swing
GUI):
private static void setupThreadViolationsDetector()
{
ThreadCheckingRepaintManager repaintManager = new ThreadCheckingRepaintManager(true);
RepaintManager.setCurrentManager(repaintManager);
}
However, when I load an HTML
code snippet which contains loading an image into the GUI
, the following wrong thread exception is being printed, even though JTextPane.setText(myHTML)
is called on the EDT
.
----------Wrong Thread START
java.lang.Exception
at com.jidesoft.utils.ThreadCheckingRepaintManager.checkThreadViolations(ThreadCheckingRepaintManager.java:78)
at com.jidesoft.utils.ThreadCheckingRepaintManager.addDirtyRegion(ThreadCheckingRepaintManager.java:72)
at java.desktop/javax.swing.JComponent.repaint(JComponent.java:4836)
at java.desktop/javax.swing.text.html.ImageView.repaint(ImageView.java:655)
at java.desktop/javax.swing.text.html.ImageView$ImageHandler.imageUpdate(ImageView.java:990)
at java.desktop/sun.awt.image.ImageWatched$WeakLink.lambda$update$0(ImageWatched.java:144)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.desktop/sun.awt.image.ImageWatched$WeakLink.update(ImageWatched.java:142)
at java.desktop/sun.awt.image.ImageWatched$WeakLink.newInfo(ImageWatched.java:159)
at java.desktop/sun.awt.image.ImageWatched.newInfo(ImageWatched.java:197)
at java.desktop/sun.awt.image.ImageRepresentation.imageComplete(ImageRepresentation.java:724)
at java.desktop/sun.awt.image.ImageDecoder.imageComplete(ImageDecoder.java:153)
at java.desktop/sun.awt.image.JPEGImageDecoder.produceImage(JPEGImageDecoder.java:143)
at java.desktop/sun.awt.image.InputStreamImageSource.doFetch(InputStreamImageSource.java:269)
at java.desktop/sun.awt.image.ImageFetcher.fetchloop(ImageFetcher.java:212)
at java.desktop/sun.awt.image.ImageFetcher.run(ImageFetcher.java:176)
----------Wrong Thread END
Is this a bug you could fix?
I'm using jdk-11.0.1
on Windows 10
.
Maybe I am doing it wrong however I cannot get line wrap to work on a StyledLabel.
I'm creating an empty label during class construction:
label=new StyledLabel() {
@Override
public Dimension getPreferredSize() {
return new Dimension(PANEL_WIDTH,
label.getMinimumSize().height);
}
};
label.setLineWrap(true);
label.setBackground(null);
label.setOpaque(false);
Later on when the user does something a method is called to update the elements and set the label text:
StyledLabelBuilder.setStyledText(label, "{" + longstring + ":p, @row:1:1:10}");
I have tried messing with preferredsize (The PANEL_WIDTH is a fixed size in this instance) as well as appending a global row count... yet the label is always a single line with the string truncated (...)
Am I doing this wrong or is it a bug? I've read the pdf on styledlabels as well as the javadocs.
Thank you
Hello,
the latest version of jide-oss fails to build from source with OpenJDK 10. OpenJDK 9 is end-of-life now.
I'm hereby forwarding Ubuntu bug
https://bugs.launchpad.net/ubuntu/+source/libjide-oss-java/+bug/1766131
[javac] /<>/libjide-oss-java-3.7.2+dfsg/src/com/jidesoft/plaf/LookAndFeelFactory.java:29: error: package com.sun.java.swing.plaf.windows does not exist
[javac] import com.sun.java.swing.plaf.windows.WindowsLookAndFeel;
It seems that it's been broken by this change in the jdk: https://bugs.openjdk.java.net/browse/JDK-8189656 ("The Windows L&F should be moved out from the shared folder") which means that the com.sun.java.swing.plaf.windows classes are not built as part of our jdk10 distribution.
An Arabic user noticed that the tab close buttons were on the left of the tabs, but thought they should be on the right.
I'm not sure whether the user is right or not, so I'm passing the question upwards. JIDE currently puts them on the left because it's the reverse of where they would be for a left-to-right layout. But sometimes in right-to-left UIs, things are not reversed. I wasn't able to quickly find any literature describing the correct behaviour for tab close buttons, so all I have to go on is this one user's comment.
Test program:
import java.awt.BorderLayout;
import java.awt.ComponentOrientation;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.SwingUtilities;
import javax.swing.WindowConstants;
import com.jidesoft.swing.JideTabbedPane;
public class TestRtlTab implements Runnable {
public static void main(String[] args) {
System.setProperty("user.language", "ar");
System.setProperty("user.country", "SA");
SwingUtilities.invokeLater(new TestRtlTab());
}
@Override
public void run() {
showFrame("Left-to-Right", ComponentOrientation.LEFT_TO_RIGHT);
showFrame("Right-to-Left", ComponentOrientation.RIGHT_TO_LEFT);
}
private void showFrame(String title, ComponentOrientation componentOrientation) {
JideTabbedPane tabs = new JideTabbedPane();
tabs.setShowCloseButtonOnTab(true);
tabs.add("Tab 1", new JPanel());
tabs.add("Tab 2", new JPanel());
tabs.setComponentOrientation(componentOrientation);
JPanel content = new JPanel();
content.setLayout(new BorderLayout());
content.add(tabs, BorderLayout.CENTER);
content.setComponentOrientation(componentOrientation);
JFrame frame = new JFrame(title);
frame.setContentPane(content);
frame.setComponentOrientation(componentOrientation);
frame.pack();
frame.setSize(500, 400);
frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
frame.setVisible(true);
}
}
I see a lot of listeners in the source code traversal are flashback, and each interval is 2, why is this ?
such as:
Object[] listeners = listenerList.getListenerList();
for (int i = listeners.length - 2; i >= 0; i -= 2) {
if (listeners[i] == PageListener.class) {
_pageEvent = new PageEvent(source, id);
((PageListener) listeners[i + 1]).pageEventFired(_pageEvent);
}
}
I'm using the latest version of jide-oss (3.6.16). I'm using AutoCompletionComboBox
to replace a plain JComboBox
.
I'm populating the DefaultComboBoxModel
with instances of Car
. I'm using ComboBoxSearchable#convertElementToString
to make sure that the the instances are searchable.
The autocomplete functionality works up to the point of matching an input text with items. However, when I want to retrieve the item which was selected / found by autocomplete this does not work.
Using AutoCompletionComboBox#getSelectedIndex()
always returns -1, and AutoCompletionComboBox#getSelectedItem()
always returns a String. Hence, I can't use any of these to somehow get the Car
which was selected / found by autocomplete.
Even though you would have some sort of workaround for this, it makes no sense to extend JComboBox
and not make sure that it consistently returns the item which was selected / found by autocomplete when invoking getSelectedIndex()
and getSelectedItem()
on the AutoCompletionComboBox
itself.
Example :
import com.jidesoft.swing.AutoCompletion;
import com.jidesoft.swing.AutoCompletionComboBox;
import com.jidesoft.swing.ComboBoxSearchable;
import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.event.ActionEvent;
import java.util.ArrayList;
import javax.swing.AbstractAction;
import javax.swing.DefaultComboBoxModel;
import javax.swing.DefaultListCellRenderer;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JList;
public class Example {
public static void main(String[] args) {
final AutoCompletionComboBox l = new AutoCompletionComboBox();
JButton b = new JButton();
b.setText("Select");
JFrame f = new JFrame();
f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
f.getContentPane().add(l, BorderLayout.NORTH);
f.getContentPane().add(b);
f.pack();
f.setVisible(true);
ArrayList<Car> cars = new ArrayList();
cars.add(new Car("Nissan"));
cars.add(new Car("Volvo"));
cars.add(new Car("Saab"));
cars.add(new Car("Chrysler"));
l.setRenderer(new DefaultListCellRenderer() {
@Override
public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) {
if (value instanceof Car) {
Car c = (Car) value;
String text = c.getMake();
return super.getListCellRendererComponent(list, text, index, isSelected, cellHasFocus);
} else {
return super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);
}
}
});
DefaultComboBoxModel carsModel = new DefaultComboBoxModel();
carsModel.addElement("");
for (Car car : cars) {
carsModel.addElement(car);
}
l.setModel(carsModel);
AutoCompletion autocomplete = new AutoCompletion(l, new ComboBoxSearchable(l) {
@Override
protected String convertElementToString(Object o) {
if (o instanceof Car) {
Car c = (Car) o;
return c.getMake();
} else {
return o.toString();
}
}
});
autocomplete.setStrict(false);
b.setAction(new AbstractAction() {
public void actionPerformed(ActionEvent e) {
System.out.println("Returned index " + l.getSelectedIndex() + ".");
if (!(l.getSelectedItem() instanceof Car)) {
System.out.println("AutoCompletionComboBox#getSelectedItem() returned an instance of " + l.getSelectedItem().getClass().getName() + ". Should be an instance of " + Car.class.getName() + ".");
}
}
});
}
public static class Car {
private final String make;
public Car(String make) {
this.make = make;
}
public String getMake() {
return make;
}
}
}
None of your demos have context menus showing the standard Cut/Copy/Paste/Select All menus and functionality.
On macOS, the ResizableFrame refuses to let the frame be resized to within roughly 20 pixels of the bottom of the screen.
Here's repro code (it creates a ridiculously oversized green border for detecting window-resizing mouse drags):
import com.jidesoft.swing.ResizableFrame;
import javax.swing.*;
import java.awt.*;
public class ScratchSpace {
public static void main(String[] args) {
SwingUtilities.invokeLater(() -> {
ResizableFrame frame = new ResizableFrame("Resizable test");
frame.setBorder(BorderFactory.createLineBorder(Color.GREEN, 10));
JLabel label = new JLabel("Hello cruel world");
label.setBorder(BorderFactory.createEmptyBorder(100, 100, 100, 100));
frame.add(label);
frame.pack();
frame.setLocationRelativeTo(null);
frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
frame.setVisible(true);
});
}
}
Hi experts,
Are you planning to release a jide-oss version which is compatible with Java 11? If yes, when do you expect this will happen?
The jdeps report is complaining:
jide-oss-3.3.4.jar -> JDK removed internal API jide-oss-3.3.4.jar -> java.base jide-oss-3.3.4.jar -> java.desktop com.jidesoft.plaf.LookAndFeelFactory -> com.sun.java.swing.plaf.windows.WindowsLookAndFeel JDK internal API (JDK removed internal API) com.jidesoft.plaf.UIDefaultsLookup -> sun.reflect.Reflection JDK internal API (JDK removed internal API) com.jidesoft.plaf.aqua.AquaJidePopupMenuUI -> apple.laf.AquaPopupMenuUI JDK internal API (JDK removed internal API) com.jidesoft.plaf.aqua.AquaRangeSliderUI -> apple.laf.AquaSliderUI JDK internal API (JDK removed internal API) com.jidesoft.plaf.aqua.AquaRangeSliderUI -> apple.laf.JRSUIConstants JDK internal API (JDK removed internal API) com.jidesoft.plaf.aqua.AquaRangeSliderUI -> apple.laf.JRSUIConstants$Orientation JDK internal API (JDK removed internal API) com.jidesoft.plaf.aqua.AquaRangeSliderUI -> apple.laf.JRSUIConstants$State JDK internal API (JDK removed internal API) com.jidesoft.plaf.basic.BasicFolderChooserUI -> sun.awt.shell.ShellFolder JDK internal API (java.desktop) com.jidesoft.plaf.basic.BasicJideSplitButtonUI -> com.sun.java.swing.plaf.windows.WindowsLookAndFeel JDK internal API (JDK removed internal API) com.jidesoft.plaf.basic.BasicPainter -> com.sun.java.swing.plaf.windows.WindowsClassicLookAndFeel JDK internal API (JDK removed internal API) com.jidesoft.plaf.basic.BasicPainter -> com.sun.java.swing.plaf.windows.WindowsLookAndFeel JDK internal API (JDK removed internal API) com.jidesoft.plaf.basic.BasicPainter -> sun.swing.plaf.synth.SynthIcon JDK internal API (JDK removed internal API) com.jidesoft.plaf.basic.BasicStyledLabelUI -> com.sun.java.swing.plaf.windows.WindowsLookAndFeel JDK internal API (JDK removed internal API) com.jidesoft.plaf.eclipse.EclipseMenuItemUI -> com.sun.java.swing.plaf.windows.WindowsGraphicsUtils JDK internal API (JDK removed internal API) com.jidesoft.plaf.eclipse.EclipseMenuItemUI -> com.sun.java.swing.plaf.windows.WindowsLookAndFeel JDK internal API (JDK removed internal API) com.jidesoft.plaf.eclipse.EclipseMenuUI -> com.sun.java.swing.plaf.windows.WindowsGraphicsUtils JDK internal API (JDK removed internal API) com.jidesoft.plaf.eclipse.EclipseMenuUI -> com.sun.java.swing.plaf.windows.WindowsLookAndFeel JDK internal API (JDK removed internal API) com.jidesoft.plaf.metal.MetalUtils$GradientPainter -> sun.swing.CachedPainter JDK internal API (java.desktop) com.jidesoft.plaf.vsnet.VsnetMenuItemUI -> com.sun.java.swing.plaf.windows.WindowsGraphicsUtils JDK internal API (JDK removed internal API) com.jidesoft.plaf.vsnet.VsnetMenuItemUI -> com.sun.java.swing.plaf.windows.WindowsLookAndFeel JDK internal API (JDK removed internal API) com.jidesoft.plaf.vsnet.VsnetMenuUI -> com.sun.java.swing.plaf.windows.WindowsGraphicsUtils JDK internal API (JDK removed internal API) com.jidesoft.plaf.vsnet.VsnetMenuUI -> com.sun.java.swing.plaf.windows.WindowsLookAndFeel JDK internal API (JDK removed internal API) com.jidesoft.plaf.vsnet.VsnetWindowsProgressBarUI -> com.sun.java.swing.plaf.windows.WindowsProgressBarUI JDK internal API (JDK removed internal API) com.jidesoft.plaf.windows.AnimationController -> com.sun.java.swing.plaf.windows.WindowsLookAndFeel JDK internal API (JDK removed internal API) com.jidesoft.plaf.windows.AnimationController -> sun.awt.AppContext JDK internal API (java.desktop) com.jidesoft.plaf.windows.AnimationController -> sun.security.action.GetBooleanAction JDK internal API (java.base) com.jidesoft.plaf.windows.AnimationController$PartUIClientPropertyKey -> sun.swing.UIClientPropertyKey JDK internal API (JDK removed internal API) com.jidesoft.plaf.windows.TMSchema$State -> sun.awt.windows.ThemeReader JDK internal API (JDK removed internal API) com.jidesoft.plaf.windows.WindowsJidePopupMenuUI -> com.sun.java.swing.plaf.windows.WindowsPopupMenuUI JDK internal API (JDK removed internal API) com.jidesoft.plaf.windows.WindowsRangeSliderUI -> com.sun.java.swing.plaf.windows.WindowsSliderUI JDK internal API (JDK removed internal API) com.jidesoft.plaf.windows.XPStyle -> com.sun.java.swing.plaf.windows.WindowsClassicLookAndFeel JDK internal API (JDK removed internal API) com.jidesoft.plaf.windows.XPStyle -> sun.awt.windows.ThemeReader JDK internal API (JDK removed internal API) com.jidesoft.plaf.windows.XPStyle -> sun.security.action.GetPropertyAction JDK internal API (java.base) com.jidesoft.plaf.windows.XPStyle$Skin -> sun.awt.windows.ThemeReader JDK internal API (JDK removed internal API) com.jidesoft.plaf.windows.XPStyle$SkinPainter -> sun.awt.image.CachingSurfaceManager JDK internal API (JDK removed internal API) com.jidesoft.plaf.windows.XPStyle$SkinPainter -> sun.awt.image.SunWritableRaster JDK internal API (java.desktop) com.jidesoft.plaf.windows.XPStyle$SkinPainter -> sun.awt.image.SurfaceManager JDK internal API (java.desktop) com.jidesoft.plaf.windows.XPStyle$SkinPainter -> sun.awt.windows.ThemeReader JDK internal API (JDK removed internal API) com.jidesoft.plaf.windows.XPStyle$SkinPainter -> sun.swing.CachedPainter JDK internal API (java.desktop) com.jidesoft.plaf.windows.XPStyle$XPStatefulFillBorder -> com.sun.java.swing.plaf.windows.WindowsComboBoxUI JDK internal API (JDK removed internal API) com.jidesoft.plaf.xerto.XertoJideButtonUI -> com.sun.java.swing.plaf.windows.WindowsButtonUI JDK internal API (JDK removed internal API) com.jidesoft.popup.JidePopup -> sun.awt.EmbeddedFrame JDK internal API (java.desktop) com.jidesoft.swing.TristateCheckBoxIcon -> sun.swing.plaf.synth.SynthIcon JDK internal API (JDK removed internal API) JDK Internal API Suggested Replacement ---------------- --------------------- sun.reflect.Reflection Use java.lang.StackWalker @SInCE 9 sun.security.action.GetBooleanAction Use java.security.PrivilegedAction @SInCE 1.1 sun.security.action.GetPropertyAction Use java.security.PrivilegedAction @SInCE 1.1
Thanks in advance for the reply.
Regards,
Mario
If I try to compile with JDK 1.6 I run into the following error
[ERROR] /Users/ianp/Projects/jide-oss/src/com/jidesoft/popup/JidePopup.java:[1475,27] cannot find symbol
symbol : method setAutoRequestFocus(boolean)
location: class com.jidesoft.swing.ResizableWindow
This is because the method is @since 1.7
.
If I update the pom and try to compile with JDK 1.7 I get the following error:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (default-compile) on project jide-oss: Compilation failure: Compilation failure:
[ERROR] /Users/ianp/Projects/jide-oss/src/com/jidesoft/plaf/windows/XPStyle.java:[639,29] error: cannot find symbol
Tis is because the class sun.awt.image.CachingSurfaceManager
does not exist in JDK 1.7.
So, which version of Java are you guys using to build with?
Mac OS X 10.8.4.
Java fx has been moved out of java 11's runtime. Will this affect jidesoft?
Running the latest demo (3.7.8) on JDK13 for TriStateCheckBox Demo I received the error mentioned above with attached stack trace in java.exe
console.
This is clearly due to com.jidesoft.plaf.windows.AnimationController
importing an interface from JDK1.8 which is now moved to javax.swing.UIClientPropertyKey
, post JDK9. It can be fixed easily ,for example, by providing a variant version of com.jidesoft.plaf.windows.AnimationController
using Multi-Release JAR feature of JDK9+.
JRE:
java version "13" 2019-09-17
Java(TM) SE Runtime Environment (build 13+33)
Java HotSpot(TM) 64-Bit Server VM (build 13+33, mixed mode, sharing)
it looks like there is a problem with 3.7.x release builds in general.
If I use 3.7.6.jar downloaded from here, then I'd get the following NCF error in an app:
java.lang.NoClassDefFoundError: com/sun/java/swing/plaf/windows/WindowsLookAndFeel
at com.jidesoft.plaf.LookAndFeelFactory.installJideExtension(LookAndFeelFactory.java:848)
at com.jidesoft.plaf.LookAndFeelFactory.installJideExtension(LookAndFeelFactory.java:633)
at com.jidesoft.plaf.LookAndFeelFactory.installJideExtension(LookAndFeelFactory.java:598)
at com.jidesoft.swing.JideSplitButton.updateUI(JideSplitButton.java:109)
at java.desktop/javax.swing.JMenuItem.init(JMenuItem.java:208)
at java.desktop/javax.swing.JMenuItem.<init>(JMenuItem.java:147)
at java.desktop/javax.swing.JMenuItem.<init>(JMenuItem.java:124)
at java.desktop/javax.swing.JMenu.<init>(JMenu.java:161)
at java.desktop/javax.swing.JMenu.<init>(JMenu.java:151)
at com.jidesoft.swing.JideMenu.<init>(JideMenu.java:59)
at com.jidesoft.swing.JideSplitButton.<init>(JideSplitButton.java:44)
It's getting more interesting when one starts to compare releases and their sizes, for example:
jide-oss-3.6.14.jar - 1.57Mb
jide-oss-3.7.6.jar - 178k
and for 3.7.6 it's pretty much doesn't matter where I take it from: Github (https://github.com/jidesoft/jide-oss/releases/tag/3.7.6), Jitpack.io (https://jitpack.io/#jidesoft/jide-oss) or build locally (with Maven).
On Jitpack, click "look up", it'll show you different versions, snapshots and their build logs. Most/all of them are failing.
On my local machine, when I was trying to compile it with Maven (mvn -f pom_compile.xml clean compile package
), it wouldn't copy actual classes at all but rather some minor artefacts. If I try it with modified Ant build then it'll produce bunch of Windows
related errors:
jide-oss/src/com/jidesoft/plaf/vsnet/VsnetWindowsProgressBarUI.java:25: error: cannot find symbol
[javac] public class VsnetWindowsProgressBarUI extends WindowsProgressBarUI implements ActionListener
....
[javac] 100 errors
[javac] 30 warnings
changes to Ant build:
diff --git a/build.properties b/build.properties
index f6c53b2c..a425aaf3 100644
--- a/build.properties
+++ b/build.properties
@@ -23,5 +23,5 @@ deprecation=off
stacksize=64m
initheapsize=128m
maxheapsize=512m
-source=1.5
-target=1.5
+source=9^M
+target=9^M
diff --git a/build.xml b/build.xml
index 2ca9544e..cd326ea7 100644
--- a/build.xml
+++ b/build.xml
@@ -53,6 +53,7 @@
fork="yes" memoryInitialSize="${initheapsize}" memoryMaximumSize="${maxheapsize}" verbose="no"
debug="${debug}" deprecation="${deprecation}">
<classpath refid="standard_classpath"/>
+ <compilerarg line="--add-exports java.desktop/com.sun.java.swing.plaf.windows=ALL-UNNAMED --add-exports java.desktop/javax.swing.plaf.synth=ALL-UNNAMED --add-exports java.desktop/sun.swing=ALL-UNNAMED --add-exports java.desktop/sun.awt=ALL-UNNAMED --add-exports java.desktop/sun.awt.image=ALL-UNNAMED --add-exports java.desktop/sun.awt.shell=ALL-UNNAMED --add-exports java.desktop/sun.awt.dnd=ALL-UNNAMED --add-exports java.desktop/sun.awt.windows=ALL-UNNAMED --add-exports java.base/sun.security.action=ALL-UNNAMED" />^M
</javac>
<copy todir="${output_dir}">
<fileset dir="${src_dir}" includes="**/*.gif,**/*.jpg,**/*.png,**/*.properties,**/*.ttf,**/*.vm"/>
Potentially builds on Windows OS are fine but Unix/Linux-based shall be reviewed.
My JDK & OS versions:
> java -version
openjdk version "11.0.9.1" 2020-11-04 LTS
OpenJDK Runtime Environment Zulu11.43+1007-CA (build 11.0.9.1+1-LTS)
OpenJDK 64-Bit Server VM Zulu11.43+1007-CA (build 11.0.9.1+1-LTS, mixed mode)
> sw_vers
ProductName: macOS
ProductVersion: 11.0.1
PS: potentially relates to #30
Using the latest version of JavaSE-13 whose version is "13" with no dots, I encountered a high CPU usage in my code which did not exist in JavaSE-12.0.2 or earlier.
After tracing it I found out that com.jidesoft.utils.SystemInfo.JavaVersion
is not detecting Java version correctly and is reporting it as Java v1.4 !
Looking at the code was obvious why; I see that the RegEx used to parse Java version:
private static Pattern SUN_JAVA_VERSION = Pattern.compile("(\\d+\\.\\d+)(\\.(\\d+))?(_([^-]+))?(.*)");
is expecting at least a version with two digits separated by a dot which is not the case any more thanks to the new Java 10 versioning scheme, now we are going to encounter versions like "13" which is what I have.
The fix is straight forward, something like this which I've applied and things are now working fine for me on JavaSE-13:
private static Pattern SUN_JAVA_VERSION = Pattern.compile("(\\d+(?:\\.\\d+)?)(\\.(\\d+))?(_([^-]+))?(.*)");
I think it would be wise to change the other safe net RegEx, too:
private static Pattern SUN_JAVA_VERSION_SIMPLE = Pattern.compile("(\\d+(?:\\.\\d+)?)(\\.(\\d+))?(.*)");
We use a customized treemodel that implements TreeModel
that does not work with TreeNode
objects.
If we used the TreeModel constructor, everthing works fine:
cbtMain = new CheckBoxTree(new PositionenTreeModel(angebot, AngebotPosition.all(angebot)));
But if we used the empty constructor with following setModel(), a ClassCastException is thrown:
cbtMain = new CheckBoxTree();
cbtMain.setModel(new PositionenTreeModel(angebot, AngebotPosition.all(angebot)));
Exception in thread "main" java.lang.ClassCastException: de.rekers.ft._incubator.Angebot cannot be cast to javax.swing.tree.TreeNode
at javax.swing.tree.DefaultTreeModel.getChildCount(DefaultTreeModel.java:186)
at com.jidesoft.swing.CheckBoxTreeSelectionModel.getChildrenCount(CheckBoxTreeSelectionModel.java:557)
at com.jidesoft.swing.CheckBoxTreeSelectionModel.isPathSelected(CheckBoxTreeSelectionModel.java:169)
at com.jidesoft.swing.CheckBoxTreeCellRenderer.updateCheckBoxState(CheckBoxTreeCellRenderer.java:139)
at com.jidesoft.swing.CheckBoxTreeCellRenderer.getTreeCellRendererComponent(CheckBoxTreeCellRenderer.java:99)
at javax.swing.plaf.basic.BasicTreeUI$NodeDimensionsHandler.getNodeDimensions(BasicTreeUI.java:2807)
at javax.swing.tree.AbstractLayoutCache.getNodeDimensions(AbstractLayoutCache.java:492)
at javax.swing.tree.VariableHeightLayoutCache$TreeStateNode.updatePreferredSize(VariableHeightLayoutCache.java:1360)
at javax.swing.tree.VariableHeightLayoutCache$TreeStateNode.expand(VariableHeightLayoutCache.java:1473)
at javax.swing.tree.VariableHeightLayoutCache$TreeStateNode.expand(VariableHeightLayoutCache.java:1288)
at javax.swing.tree.VariableHeightLayoutCache.rebuild(VariableHeightLayoutCache.java:743)
at javax.swing.tree.VariableHeightLayoutCache.setModel(VariableHeightLayoutCache.java:109)
at javax.swing.plaf.basic.BasicTreeUI.setModel(BasicTreeUI.java:412)
at javax.swing.plaf.basic.BasicTreeUI$Handler.propertyChange(BasicTreeUI.java:3414)
at java.beans.PropertyChangeSupport.fire(PropertyChangeSupport.java:335)
at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:327)
at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:263)
at java.awt.Component.firePropertyChange(Component.java:8428)
at javax.swing.JTree.setModel(JTree.java:882)
at de.rekers.ft.app.angebotsverwaltung.AngebotPositionAuswahl.initUI(AngebotPositionAuswahl.java:50)
If 'rootVisible()' is set to false, no exception is thrown.
Our treemodel is not using 'DefaultTreeModel' but 'de.rekers.ft._incubator.Angebot'. It seems, that the old model from the empty constructor is accessing nodes from the new model.
Since we use a GUI-Designer, we need to use the standard constructor and set the model with setModel()
.
I think this happened some time ago. I think it might have been fixed(?).
But today I got the same problem again with 3.5.10:
[WARNING] The POM for com.jidesoft:jide-oss:jar:3.5.10 is invalid, transitive dependencies (if any) will not be available: 2 problems were encountered while building the effective model for com.jidesoft:jide-oss:3.5.10
[ERROR] 'dependencies.dependency.systemPath' for aqua_ui:ui:jar must specify an absolute path but is ${basedir}/libs/ui.jar @
[ERROR] 'dependencies.dependency.systemPath' for aqua_ui:jrs:jar must specify an absolute path but is ${basedir}/libs/ui.jar @
checkboxtree 三态状态有问题,当有两个以上节点时,选择其中一个父级就会全选。而demo是正确的,但是无论怎么设置属性,引用 的maven的包的版本都是错的
com/jidesoft/plaf/basic/folderChooser.properties
contains the following entry:
FolderChooser.delete.message2=Are you sure you want to permanently delete these {0} items?
This is used from some manual-pluralisation code:
if (selection.size() > 1) {
text = MessageFormat.format(
resourceBundle.getString("FolderChooser.delete.message2"), selection.size());
}
else {
text = resourceBundle.getString("FolderChooser.delete.message1");
}
This affects translations because not all languages have the same pluralisation rules as English.
I have WebLaF installed.
I called the following
LookAndFeelFactory.installJideExtension(LookAndFeelFactory.VSNET_STYLE);
right before I setup the JideTabbedPane as follows :
JideTabbedPane tabPanel = new JideTabbedPane();
In windows, it works well.
Somehow it doesn't work well in linux and keeps throwing ClassNotFoundException
in my app.
It can be traced to this line in LookAndFeelFactory class calling the method
else if (isWindowsLookAndFeel(lnf)) { ...
/**
* As of Java 10, com.sun.java.swing.plaf.windows.WindowsLookAndFeel is no longer available on macOS thus
* "instanceof WindowsLookAndFeel" directives will result in a NoClassDefFoundError during runtime. This method
* was introduced to avoid this exception.
*
* @param lnf
* @return true if it is a WindowsLookAndFeel.
*/
public static boolean isWindowsLookAndFeel(LookAndFeel lnf) {
if (lnf == null) {
return false;
}
else {
try {
Class c = Class.forName(WINDOWS_LNF);
return c.isInstance(lnf);
}
catch (ClassNotFoundException | NoClassDefFoundError ignore) {
// if it is not possible to load the Windows LnF class, the
// given lnf instance cannot be an instance of the Windows
// LnF class
return false;
}
}
}
Please help!
ListDataIntelliHints should not work for textfields that are not editable!
Right now, any user can use the keyboard to display the hints on a non-editable textfield and select a value from the suggested hints. The textfield, even if it not editable, changes it's value!
In the pom.xml
file in the 3.7.6 distribution and tag 3.7.6 (https://github.com/jidesoft/jide-oss/blob/3.7.6/pom.xml), the <version>
in the POM still says "3.7.4".
Maybe this is related to why there was trouble publishing 3.7.6 to Maven Central? (#27)
If I run my application with java web start on Oracle JDK10, I got the following exception (Meta L&F) when a CheckBoxTree is displayed:
java.lang.IllegalAccessError: superclass access check failed: class com.jidesoft.plaf.metal.MetalUtils$GradientPainter (in unnamed module @0x32990607) cannot access class sun.swing.CachedPainter (in module java.desktop) because module java.desktop does not export sun.swing to unnamed module @0x32990607
at java.base/java.lang.ClassLoader.defineClass1(Native Method)
at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1009)
at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174)
at jdk.deploy@10/com.sun.deploy.security.DeployURLClassLoader.defineClass(DeployURLClassLoader.java:390)
at jdk.deploy@10/com.sun.deploy.security.DeployURLClassLoader$1.run(DeployURLClassLoader.java:289)
at jdk.deploy@10/com.sun.deploy.security.DeployURLClassLoader$1.run(DeployURLClassLoader.java:283)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at jdk.deploy@10/com.sun.deploy.security.DeployURLClassLoader.findClass(DeployURLClassLoader.java:282)
at jdk.javaws@10/com.sun.jnlp.JNLPClassLoader.findClass(JNLPClassLoader.java:382)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:566)
at jdk.javaws@10/com.sun.jnlp.JNLPClassLoader.loadClass(JNLPClassLoader.java:136)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:499)
at com.jidesoft.plaf.metal.MetalUtils.drawGradient(MetalUtils.java:95)
at com.jidesoft.plaf.metal.MetalIconFactory$CheckBoxIcon.paintOceanIcon(MetalIconFactory.java:63)
at com.jidesoft.plaf.metal.MetalIconFactory$CheckBoxIcon.paintIcon(MetalIconFactory.java:87)
at java.desktop/javax.swing.plaf.metal.MetalRadioButtonUI.paint(MetalRadioButtonUI.java:226)
at java.desktop/javax.swing.plaf.ComponentUI.update(ComponentUI.java:161)
at java.desktop/javax.swing.JComponent.paintComponent(JComponent.java:797)
I tried the recommended add-exports and it fixed the problem but I can not ask my users to do so:
javaws -J--add-exports=java.desktop/sun.swing=ALL-UNNAMED -verbose http://www.jmmc.fr/apps/public/AppLauncher/AppLauncher.jnlp
Do you plan to fix the GradientPainter ( extends CachedPainter ) in com.jidesoft.plaf.metal.MetalUtils or have any other workaround ?
Hello,
the attached patch was applied in Debian to achieve the following:
https://gist.github.com/apoleon/6691463
Thanks for considering the patch.
Java 8, 9, and 10 are all at end of life.
What is the plan to support Java 11 or 12? Ant build reports several errors when trying to build on Java 11
(ps the closed issue #35, points to forums that are inop - return Internal Server 500 error)
Running jdepts on the current release (3.6.18) we get a couple of warnings :
jide-oss-3.6.18.jar -> JDK removed internal API
jide-oss-3.6.18.jar -> java.base
jide-oss-3.6.18.jar -> java.desktop
com.jidesoft.plaf.LookAndFeelFactory -> com.sun.java.swing.plaf.windows.WindowsLookAndFeel JDK internal API (java.desktop)
com.jidesoft.plaf.aqua.AquaJidePopupMenuUI -> com.apple.laf.AquaPopupMenuUI JDK internal API (JDK removed internal API)
com.jidesoft.plaf.aqua.AquaRangeSliderUI -> apple.laf.JRSUIConstants JDK internal API (JDK removed internal API)
com.jidesoft.plaf.aqua.AquaRangeSliderUI -> apple.laf.JRSUIConstants$Orientation JDK internal API (JDK removed internal API)
com.jidesoft.plaf.aqua.AquaRangeSliderUI -> apple.laf.JRSUIConstants$State JDK internal API (JDK removed internal API)
com.jidesoft.plaf.aqua.AquaRangeSliderUI -> com.apple.laf.AquaSliderUI JDK internal API (JDK removed internal API)
com.jidesoft.plaf.basic.BasicFolderChooserUI -> sun.awt.shell.ShellFolder JDK internal API (java.desktop)
(etc)
Do we need an update of the library for Java 9 ?
I checked out the 3.7.6 source distribution on my macOS 10.14.6 machine. The build failed using a Java 9 compiler.
[jide-oss-3.7.6] $ javac --version
javac 9.0.4
[jide-oss-3.7.6] $ mvn compile
[INFO] Scanning for projects...
[INFO]
[INFO] ----------------------< net.janklab.opp:jide-oss >----------------------
[INFO] Building JIDE Common Layer 3.7.4
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-enforcer-plugin:1.0:enforce (enforce-maven) @ jide-oss ---
[INFO]
[INFO] --- build-helper-maven-plugin:3.0.0:add-source (default) @ jide-oss ---
[INFO] Source directory: /Users/janke/local/repos/janklab-opp/jide-oss/jide-oss-3.7.6/project/jide-oss-3.7.6/src-jdk8 added.
[INFO] Source directory: /Users/janke/local/repos/janklab-opp/jide-oss/jide-oss-3.7.6/project/jide-oss-3.7.6/src-apple added.
[INFO]
[INFO] --- maven-resources-plugin:3.1.0:resources (default-resources) @ jide-oss ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 108 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.7.0:compile (default-compile) @ jide-oss ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-antrun-plugin:1.8:run (compile-java9) @ jide-oss ---
[WARNING] Parameter tasks is deprecated, use target instead
[INFO] Executing tasks
main:
[javac] Compiling 4 source files to /Users/janke/local/repos/janklab-opp/jide-oss/jide-oss-3.7.6/project/jide-oss-3.7.6/target/classes-jdk9
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.989 s
[INFO] Finished at: 2020-04-19T01:11:15-04:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.8:run (compile-java9) on project jide-oss: An Ant BuildException has occured: Error running /home/bourgesl/apps/jdk-9//bin/javac compiler
[ERROR] around Ant part ...<javac includeantruntime="false" fork="true" classpath="/Users/janke/local/repos/janklab-opp/jide-oss/jide-oss-3.7.6/project/jide-oss-3.7.6/target/classes" destdir="/Users/janke/local/repos/janklab-opp/jide-oss/jide-oss-3.7.6/project/jide-oss-3.7.6/target/classes-jdk9" srcdir="/Users/janke/local/repos/janklab-opp/jide-oss/jide-oss-3.7.6/project/jide-oss-3.7.6/src-jdk9" executable="/home/bourgesl/apps/jdk-9//bin/javac">... @ 5:425 in /Users/janke/local/repos/janklab-opp/jide-oss/jide-oss-3.7.6/project/jide-oss-3.7.6/target/antrun/build-main.xml: Cannot run program "/home/bourgesl/apps/jdk-9//bin/javac": error=2, No such file or directory
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[jide-oss-3.7.6] $ grep -r bourgesl *
pom.xml: <java9.jdk>/home/bourgesl/apps/jdk-9/</java9.jdk>
target/antrun/build-main.xml: <javac includeantruntime="false" fork="true" classpath="/Users/janke/local/repos/janklab-opp/jide-oss/jide-oss-3.7.6/project/jide-oss-3.7.6/target/classes" destdir="/Users/janke/local/repos/janklab-opp/jide-oss/jide-oss-3.7.6/project/jide-oss-3.7.6/target/classes-jdk9" srcdir="/Users/janke/local/repos/janklab-opp/jide-oss/jide-oss-3.7.6/project/jide-oss-3.7.6/src-jdk9" executable="/home/bourgesl/apps/jdk-9//bin/javac">
[jide-oss-3.7.6] $
That /home/bourgesl/
reference doesn't sound very portable.
From the POM:
<properties>
<!-- path to JDK9+ -->
<java9.jdk>/home/bourgesl/apps/jdk-9/</java9.jdk>
<java9.sourceDirectory>${project.basedir}/src-jdk9</java9.sourceDirectory>
<java9.build.outputDirectory>${project.build.directory}/classes-jdk9</java9.build.outputDirectory>
<!-- enable release tasks (javadoc, sources, release) -->
<skipRelease>true</skipRelease>
</properties>
Maybe there's a more portable way of defining the path to Java 9? Maybe this should be removed, and just rely on the caller setting up their $PATH
and $JAVA_HOME
environment variables correctly?
Hi,
I'm using JideTabbedPane in a application with PlasticXPLookAndFeel, I would like to use flat shape for tabs but when you set JideTabbedPane.defaultTabShape
to SHAPE_FLAT
the result is really weird:
If JideTabbedPane.defaultTabShape
isn't set, it gets well rendered:
I'm using jide-oss 3.6.10 and jgoodies-looks 2.7.0
Thanks!!
JComboBox
, JList
, ListModel
, ComboBoxModel
, and probably a lot of other classes gained generic parameters at some point after Java added generics. Usage of these now shows warnings if you omit the parameter.
I'm trying to remove these warnings from our code, but a large number of these are coming from things we're using in JIDE.
For instance, if we extend JideComboBox
, we get warnings when we use methods on the class.
setPrototypeDisplayValue("an example value");
Would give the warning:
Unchecked call to 'setPrototypeDisplayValue(E)' as a member of raw type 'javax.swing.JComboBox'
To fix this, JideComboBox
should add the <E>
parameter that its superclass possesses, so that subclasses of it can add the parameter. The same goes for any subclasses of that class, and so forth, parameters to methods, and potentially other things.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.