swingx

Getting location of cell in JXTreeTable

前提是你 提交于 2019-12-13 14:58:04
问题 How to determine the location of a particular cell in JXTreeTable on screen? 回答1: not sure, but merging some information gathered on topic. this link shows the way to compute swing component coordinates: Getting coordinates of a component in java this link shows, that JXTreeTable extends JTable : http://download.java.net/javadesktop/swinglabs/releases/0.8/docs/api/org/jdesktop/swingx/JXTreeTable.html this link shows the way to retrieve coordinates of cell in JTable : http://www.java-forums

SwingX AutoCompleteDecorator : no suitable methode found for decorate

谁说胖子不能爱 提交于 2019-12-13 00:56:32
问题 I am trying to test SwingX for the first time,For this, I read the doc : http://www.jdocs.com/swingx/1.0/org/jdesktop/swingx/autocomplete/AutoCompleteDecorator.html I'd like to make a suggestion on a JTextField like this: List items = [...]; JTextField textField = [...]; AutoCompleteDecorator.decorate(textField, items); so I create a project on netbeans, this is my code: package test_swingx; import java.awt.Dimension; import java.awt.HeadlessException; import java.util.ArrayList; import java

Column dividers in JTable or JXTable

有些话、适合烂在心里 提交于 2019-12-12 15:23:08
问题 I Have a JTable (or a JXTable to be more precise) with 3 sections of grouped columns I want to divide. I used to have 3 tables which i programmatically linked (the scrollbar position, the sorting, the selection). I used a lot of code to get this linked, and I want to get rid of this. Now I Am switching to 1 JXTable, because there are some things a lot nicer in this table class. I found some (not very satisfying) solutions to almost the same problem. Maybe some one has a good suggestion for me

Column span with most recent JXTreeTable?

谁说胖子不能爱 提交于 2019-12-11 11:36:03
问题 I'm trying to have a particular cell span several columns, like this I can't figure it out though, the forum I found that image has some code that doesn't work due to their being random variables I don't know how to get. From some other questions though it seems the way he did it was the wrong way anyway. Does anyone know how to do this with the most recent version of SwingX, potentially with a new feature that's been added since 2009? 来源: https://stackoverflow.com/questions/15231662/column

SwingX : a One keyword and several suggestions

杀马特。学长 韩版系。学妹 提交于 2019-12-11 10:38:57
问题 I'd like to create a JTextField with a list of suggestions(Like google,netbeans....),In other words when I wrote a word in my JTextField a list is displayed ... so I tried this : import java.awt.BorderLayout; import java.awt.HeadlessException; import javax.swing.*; import org.jdesktop.swingx.autocomplete.AutoCompleteDecorator; /** * * @author marwen */ public class Test_swingx extends JFrame { public Test_swingx(String title) throws HeadlessException { JPanel pan = new JPanel(); pan.setLayout

JXMultiSplitPane causes repaint during slider adjustment?

痴心易碎 提交于 2019-12-11 02:09:26
问题 I seem to be getting frequent repaint requests during adjustment of the splitter in JXMultiSplitPane. (see program below) Why? I have setContinuousLayout(false) . Just to clarify: I understand the repaint should occur after the split-panes are resized. But during splitter adjustment, nothing is being resized; the splitter is moving around on the screen. import java.awt.BorderLayout; import java.awt.Color; import java.awt.Component; import java.awt.Dimension; import java.awt.Graphics; import

JXTable column sorting changes between 1.0 and 1.6

走远了吗. 提交于 2019-12-10 21:07:31
问题 I recently updated the SwingX library in an application from version 1.0 to 1.6.2 since we updated to JDK1.6 . I know the sorting has been changed to re-use some of the Core JDK components which were introduced in JDK 1.6 . However, in version 1.0 it was possible to sort a column by clicking on the header, subsequent clicks reverted the sort order, and shift click removed the sorting and reverted back to the original order. After the update to version 1.6.2, the shift click behavior is no

How to make a JXTreeTable sort its top elements

做~自己de王妃 提交于 2019-12-08 22:58:27
问题 I'm aware (I've looked at the sources ;) ) that sorting on JXTreeTable has been disabled. However, I would like to allow sorting on all columns based only on the values of the direct children of the root node. Say I have a structure like this: Name / Date / File UID (Root) |- Mr. X / 1996/10/22 / AE123F6D |--- File1 / 2012/01/10 / DFC2345Q |--- File2 / 2012/01/11 / D321FEC6 |- Mrs. Y / 1975/03/03 / G2GF35EZ |--- File3 / 2012/02/29 / 35GERR32 |--- File4 / 2012/01/22 / LKJY2342 . . . What I

How to use Ctrl+Z and Ctrl+Y with all Text Components?

北战南征 提交于 2019-12-08 15:55:50
问题 In fact i know how to implement using CTRL + Z (Undo) and CTRL + Y (Redo) with one JTextField. But i have hundreds of Text Components in my Swing application, so is there a way to apply this for all Text Components in my application, so when i click CTRL + Z in any Text Component it would undo the last entry in that Field ? I have tried to implement it in EventQueue, but it did not work ! 回答1: you can gel list of built_in KeyBindings short_cuts implemented in the API's notice you have to

AutoCompleteDecorator is interrupting ItemListener

守給你的承諾、 提交于 2019-12-08 11:42:39
问题 I have an editable JComboBox which is integrated with the AutoCompleteDecorator of SwingX library. My JComboBox is also having an ItemListener registered to it as well. Now, Please have a look at the below code. AutoCompleteDecorator.decorate(ClientNameCombo); ClientNameCombo.addItemListener(new ClientNameComboAction()); private class ClientNameComboAction implements ItemListener { @Override public void itemStateChanged(ItemEvent e) { String selectedClientName= ClientNameCombo.getSelectedItem