How do show JTree DnD drop location with custom TreeRenderer?
I am adding DnD support to a JTree with a custom renderer.
With the custom renderer I am losing the display of drop location on the tree.
Is there a method to determine if the passed in node object in the getTreeCellRendererComponent is currently a drop location?
I can tell if the node is selected, but not if a DnD is in action on the tree.
Thanks,
Chris
Is there a method to determine if the passed in node object in the getTreeCellRendererComponent is currently a drop location?
I can tell if the node is selected, but not if a DnD is in action on the tree.If you are using Java 1.6 you should be able to do something along these lines:Install a TransferHandler on your tree, and override the method canImport() that takes a TransferHandler.TransferSupport as input argument. That method is called repeatedly during the drag process.
In that method, ask the passed in TransferSupport for the current drop location, by calling getDropLocation(). For a JTree that will return a JTree.DropLocation, which in turn has methods for finding out which node is the current drop target. Store that node in a variable that your renderer can access.
Similar Messages
-
How do I add URI web link with custom tooltip like "CLICK HERE TO UPDATE" instead of URI web link in tooltip.
You've probably found an answer to this by now, but I think this has been addressed in another forum -- The link below suggested using a button and adding the tooltip to the button.
https://forums.adobe.com/thread/304974?start=0&tstart=0
Sounds like it would work but I haven't actually tried it.
Good luck~! -
How Can I replace newScale Text Strings with Custom Values?
How Can I replace newScale Text Strings with Custom Values?
How can I replace newScale text strings with custom values?
All newScale text is customizable. Follow the procedure below to change the value of any text string that appears in RequestCenter online pages.
Procedure
1. Find out the String ID of the text string you would like to overwrite by turning on the String ID display:
a) Navigate to the RequestCenter.ear/config directory.
b) Open the newscale.properties file and add the following name-value pair at the end of the file:res.format=2
c) Save the file.
d) Repeat steps b and c for the RmiConfig.prop and RequestCenter.prop files.
e) Stop and restart the RequestCenter service.
f) Log in to RequestCenter and browse to the page that has the text you want to overwrite. In front of the text you will now see the String ID.
g) Note down the String ID's you want to change.
2. Navigate to the directory: /RequestCenter.ear/RequestCenter.war/WEB-INF/classes/com/newscale/bfw.
3. Create the following sub-directory: res/resources
4. Create the following empty text files in the directory you just created:
RequestCenter_0.properties
RequestCenter_1.properties
RequestCenter_2.properties
RequestCenter_3.properties
RequestCenter_4.properties
RequestCenter_5.properties
RequestCenter_6.properties
RequestCenter_7.properties
5. Add the custom text strings to the appropriate RequestCenter_<Number>.properties file in the following manner (name-value pair) StringID=YourCustomTextString
Example: The StringID for "Available Work" in ServiceManager is 699.
If you wanted to change "Available Work" to "General Inbox", you would add the following line to the RequestCenter_0.properties file
699=General Inbox
Strings are divided into the following files, based on their numeric ID:
Strings are divided into the following files, based on their numeric ID:
String ID File Name
0 to 999 -> RequestCenter_0.properties
1000 to 1999 -> RequestCenter_1.properties
2000 to 2999 -> RequestCenter_2.properties
3000 to 3999 -> RequestCenter_3.properties
4000 to 4999 -> RequestCenter_4.properties
5000 to 5999 -> RequestCenter_5.properties
6000 to 6999 -> RequestCenter_6.properties
7000 to 7999 -> RequestCenter_7.properties
6. Turn off the String ID display by removing (or commenting out) the line "res.format=2" from the newscale.properties, RequestCenter.prop and RmiConfig.prop files
7. Restart RequestCenter.
Your customized text should be displayed.I've recently come across this information and it was very helpful in changing some of the inline text.
However, one place that seemed out of reach with this method was the three main buttons on an "Order" page. Specifically the "Add & Review Order" button was confusing some of our users.
Through the use of JavaScript we were able to modify the label of this button. We placed JS in the footer.html file that changes the value of the butt -
How to Create a multiefield in CQ with custom type?
Please can anyone guide me to create a multiefield component with custom xtypes...
Hi Karthi,
Bellow you find some example code for custom multifield
* @class CQ.wcm.QuestionsBlock
* @extends CQ.form.CompositeField
* The filter rule field lets the user select "include" or "exclude" and enter a regexp
* @constructor
* Creates a new QuestionsBlock.
* @param {Object} config The config object
CQ.wcm.QuestionsBlock = CQ.Ext.extend(CQ.form.CompositeField, {
* @private
* @type CQ.Ext.form.TextField
hiddenField: null,
* @private
* @type CQ.Ext.form.TextField
questionsblocktitle: null,
* @private
* @type CQ.Ext.form.NumberField
questionsnumber: null,
constructor: function(config) {
var formCfg = {"trackLabels":true,"type":"form"};
config = config || { };
var defaults = {
"border": true,
"layout": formCfg,
"padding": "7px",
"stateful": false,
"autoWidth": true,
"align": "left"
config = CQ.Util.applyDefaults(config, defaults);
CQ.wcm.QuestionsBlock.superclass.constructor.call(this, config);
// overriding CQ.Ext.Component#initComponent
initComponent: function() {
CQ.wcm.QuestionsBlock.superclass.initComponent.call(this);
this.hiddenField = new CQ.Ext.form.Hidden({
"name": this.name,
"stateful": false
this.add(this.hiddenField);
this.questionsblocktitle= new CQ.Ext.form.TextField({
"fieldLabel": "Question Block Title",
"allowBlank":false,
"stateful": false,
"mode": 'local',
"name": 'questionsblocktitle',
"width": '230px',
'labelStyle': 'width:120px;'
this.add(this.questionsblocktitle);
this.questionsnumber= new CQ.Ext.form.NumberField({
"fieldLabel": "Question Number",
"stateful": false,
"allowBlank":false,
"mode": 'local',
"name": 'questionsnumber',
'labelStyle': 'width:120px;',
"width": '230px'
this.add(this.questionsnumber);
// overriding CQ.form.CompositeField#setValue
setValue: function(value) {
var vArray = value.split(";");
this.questionsblocktitle.setValue(vArray[0]);
this.questionsnumber.setValue(vArray[1]);
// overriding CQ.form.CompositeField#getValue
getValue: function() {
return this.getRawValue();
// overriding CQ.form.CompositeField#getRawValue
getRawValue: function() {
var questionsblocktitle= this.questionsblocktitle.getValue();
var questionsnumber= this.questionsnumber.getValue();
var value = questionsblocktitle+ ";" + questionsnumber;
this.hiddenField.setValue(value);
return value;
* Loads the options of the selection if an optionsProvider is available.
* This method is usually called solely by {@link CQ.Dialog} after its
* content has been loaded.
* @param {String} path content path (optional)
* @private
processPath: function(path) {
var dialogPath = this.findParentByType("dialog").path;
this.doLayout();
// register xtype
CQ.Ext.reg('questionsblock', CQ.wcm.QuestionsBlock);
Regards,
kasq -
How to know drop location with a transfer handler?
Using the Swing TransferHandler, there doesn't seem to be a way to figure out the location of the drop!
Does this mean I must use the older mechanism instead of this new one, my situation here requires that I know where the object is being dropped so that I can add it in the right location.
Help!Hey, anybody using drag & drop at all?!?!
It's funny, you search around the web and the new features of 1.4 drag & drop are nowhere to be found/discussed!
:-( -
How To Show Different Artwork For CD With Same Name?
In 2002, Chris Botti released a holiday CD named December. In 2006 he also released another CD named December with the only difference being track 2 (Ave Maria) & track 7 (I Really Don't Want Much For Christmas which are not included on the 2002 release. These are not additional tracks but replace 2 songs from the original 2002 release. The album art is different for both CDs. So, how can I show these two CDs with the same name and same artist but with different artwork in Cover Flow mode? Help!
iMac G5 1.8 Ghz iMac 1.8 GHz G5 17" Mac OS X (10.4.8) 1.5 GB RAM Mac OS X (10.4.8)If you store Album artwork the way i described using Command I (get info) - then the artwork is actually EMBEDDED in each song and is carried with that song wherever it goes.. and in this case it doesnt matter if u had 3 copies of the same album - all identical. You could even save a diff image for each tarck if u wanted.
If there is no artwork embedded, then coverflow places the image in a separate folder that is only referenced by iTunes for the whole CD.
You also might want to turn off coverlfow and continue doing what u had been doing in the past - add you won.
I also think i know what may be happening. You say they are identical except for track 2 - But problem is - I don't think iTunes can handle 2 identical CD's from the same artist.
Here's an experiment:
Goto any of the songs.... right-click and select "Show in Finder" the Finder will open and show you the song file and its location. Do you see one album once or 1 album twice?
If you see 2 of everything, i would recommend the following:
Rename the first album "December (2002)" and the second "December (2006)" then iTunes will definately separate them out. -
How to show shuttle component pre-populated with SelectedItems
Well i am trying to get this thing working and literally failed many times.. once the user selects some items in a shuttle... i want to get the selected values and store it somewhere.. Next time when the user logs in for second time the Shuttle should be
pre - populated with the previously selected items .Can anybody suggest me and guide me about how to get this thing working...
Please if anyone from oracle Jdeveloper team can show some light on it ...Hi,
assuming the code hasn't changed between 10.1.3 and 11, you can have a look at these examples
http://thepeninsulasedge.com/frank_nimphius/2007/07/15/adf-faces-adf-faces-shuttle-with-pre-selected-values-from-a-selectoncechoice/
Let me know in case the code has changed
Frank -
How to show CVD as CENVATABLE (ie with set-off) in Import Purchase Order
Dear Sir,
In our existing SAP system , the Import Purchase having CVD are showing CVD as Delivery Cost . However we desire that CVD being CENVATABLE should get reflected with a Set-off in the similar fashion as cenvatable EXCISE-DUTY is being shown incase of DOMESTIC Purchase Order .
We request you to kindly pl guide us about this pl .
With Regards
Sonia AgarwalHi friends
As suggested in the posted reply , I have done following :
a) For CVD condition , Maintained accrual as FR3 in pricing procedure
b) Tick the condition as Statistical
c) In J1ID maintained Material as Raw-material
But still , the net value appearing in Purchase Order , includes the CVD .
Kindly guide us pl .
Regards
Sonia Agarwal -
Hello everyone,
Iam sending mail using java, my mail format consisit of colored text and images,that should be diplsyed to reciever in mail box,my code is working fine reciever gets mail in inbox but problem is when we recieve mail like that images doesnot show up in the mail automaticaly,when i click on show images link in my mail box only then images become visible,i tested my mail in gmail,rediff and yahoo and in all cases i have to mannually click on "show images" link to view images that i sent with my mail,why so? is this due to security reasons in mailbox??? can i write such code that can overcome this problem i.e my images shows directly in anymailbox without clicking on showimages link.
Please help.
Thanks.anie wrote:
can i write such code that can overcome this problem i.e my images shows directly in anymailbox without clicking on showimages link.No. That's a security function of the browser, and not something you can control.
On another note, please refrain from posting unnecessary, excessive punctuation. It only clutters up your message, which isn't a good thing. Thanks!
~ -
How to show another table's field with LOV??
Hi all!
On my JSP application I'm using an LOV based on 2 tables (datasources). I take the EMP and DEPT tables as an example:
The user can click on the LOV button to select a department for a specific employee. I use the following code for the LOV:
<jbo:DataSource id="dsEmp" appid="am" viewobject="EmpView" />
<jbo:DataSource id="dsDept" appid="am" viewobject="DeptView" />
<jbo:InputSelectLOV datasource="dsEmp" dataitem="DeptId" displaydatasource="dsDept" displaydataitem="Id,Dname" displayvaluedataitem="Id" formname="my_form" />
So, the LOV windows shows the ID and Department Name from the DEPT table and returns Dept.Id into Emp.DeptId. This works fine but in the Edit JSP I want to display the Department Name instead of the Department Number. I don't know how I can pick the Department Name from the DEPT table. I tried to change the displayvaluedataitem="Name" but, as I thought, this didn't work.
Is there any possibility to handle this problem?!
Thanks a lot!Hi all!
On my JSP application I'm using an LOV based on 2 tables (datasources). I take the EMP and DEPT tables as an example:
The user can click on the LOV button to select a department for a specific employee. I use the following code for the LOV:
<jbo:DataSource id="dsEmp" appid="am" viewobject="EmpView" />
<jbo:DataSource id="dsDept" appid="am" viewobject="DeptView" />
<jbo:InputSelectLOV datasource="dsEmp" dataitem="DeptId" displaydatasource="dsDept" displaydataitem="Id,Dname" displayvaluedataitem="Id" formname="my_form" />
So, the LOV windows shows the ID and Department Name from the DEPT table and returns Dept.Id into Emp.DeptId. This works fine but in the Edit JSP I want to display the Department Name instead of the Department Number. I don't know how I can pick the Department Name from the DEPT table. I tried to change the displayvaluedataitem="Name" but, as I thought, this didn't work.
Is there any possibility to handle this problem?!
Thanks a lot! PS: I'm using JDeveloper9i -
How to show specific colums in tables with debugging
I don't know if it is possible but I get always very simple if I have to debug with tables that I can't get the fieldvalues that interest me in a column straight away.
for instance I have a table which contains a field aufnr. only aufnr is field nr 200 in the table. so I have to skip to that field and it is very unhandy.
is it possible to show just 1 column of a table in debugging ??
I tried under variables to append it with the fieldname but no succes TA_VBDPR[]-maufnr
kind regards
arthur de smidtIf you are using the New Debugger:
Open your table in the table control inside the Debugger
Right Click on the Table Name (not table control) > Services of this Tool
Select "Change Columns".
Press Enter
Select your Column (AUFNR) from the Right Pan to Left Pan.
Right Click on the Table Name (not table control) > Services of this Tool
Select "Save Columns".
Press Enter
It will retain the order of the columns.
If you are using the Old Debugger:
Just type the name of the column in the column name area.
Regards,
Naimesh Patel
the first part works but I can't find the 'Save Columns'
currently we work with sap gui 6.4 so it is the new debugger but I believe not as fancy as the 7.1 gui has (as I saw at sapteched)
kind regards
arthur -
How to show two seperate pivot tables with one select column
Hi All
My client wishes to have two pivot tables, one showing positive results and the other showing negative results.
For Example:
DIMENSION
BUSINESS A 1000
BUSINESS B 500
BUSINESS C 100
DIMENSION
BUSINESS A -1000
BUSINESS B -500
BUSINESS C -100
Is it possible to then select the different DIMENSION with one select column for both?
ThanksNot sure I got it right try this
for Number column pull twice and set col*-1
use 2 pivot table for each number type
cool as ~ http://cool-bi.com -
How do you stop airtunes dropping out with AEX/Extreme bridged airports?
I finally found out how to get my Airports networked so that I could use the internet and airtunes to work at the same time, only now neither works well. The connection to my speakers cuts out every few minutes, simultaneously disconnecting from the internet. This is driving me nuts. Does anyone know how I can get this to stop?
Thanks,
PeterI finally found out how to get my Airports networked so that I could use the internet and airtunes to work at the same time, only now neither works well. The connection to my speakers cuts out every few minutes, simultaneously disconnecting from the internet. This is driving me nuts. Does anyone know how I can get this to stop?
Thanks,
Peter -
How to show JTree on html,jsp
Any help?What to use JFrame, scrollpane or what?
Thanxs1. You could use an applet
2. You could transform your JTree into javascript -
How to show the all the users with dequeue or enqueue privileges on a queue
Hi
As dba I want to know which users has which rights on a queue.
Is there a sys table or view where I can see that?
Something like dba_tab_privs for tables etc.
Or is the there a plsql procedure which can help me?
ruud van der walyes... dba_tab_privs
select * from dba_tab_privs where privilege in ('ENQUEUE','DEQUEUE');
Maybe you are looking for
-
Hi, I am working on the PM cube 0PM_C01 .I have to enhance this data source to get some additional data . The requirement is to create a custom stagin DSO for this cube 0PM_C01 & then perform the reporting from a cube . Should I copy the Std InfoSo
-
Please Help!!!
-
Hi, I record with 1920*1080 50i (AVCHD). When I finish a project and export it, how can I make sure its at the best Quality? Can I export it as a Quicktime Movie in Full Quality? What I want to do, is to export the finished cut movie in Full HD Quali
-
TEI class- want to instantiate a Bean into the page
I have a TEI class which I am using to add an object to the page. I am able to address this object by using (psuedo code below) <%= object.getName() %> however, if I try to call the object with a usebean tag, like
-
Pass Hidden Field (Rep ID) as Parameter when user logs into site
I have set-up user validation to my site based on a userID and password, but I want to also pass a hidden field/parameter (RepID) to the rest of the site pages so that I can filter my record sets on those pages based on that RepID parameter. I have c