Cant get current node from TreeCellEditor isCellEditable().
I have a custom TreeCellEditor but I do not want to allow the user to edit the root node.
I was hoping to use isCellEditable() but I can not seem to get the node that is being edited from the EventObject.
I can get the JTree, (from event.getSource(), but there is no way to get the node that is being tested. I have tried using:
tree.getEditingPath()
tree.getLastPathComponent()
tree.getSelectionPath()But they all return null at the time isCellEditable() is called.
Does anyone know of a way to get the node that is being tested?
Thanks,
Jerome.
well, that method is meant to be generic such that it decides if editing is possible for the type of event.
JTable has a separate isCellEditable method, but so does TableModel, so typically, you have a custom table model that implements the method there to return, and in that you know what cell.
For JTree, I don't know why there's no similar method in the TreeModel interface. There is in JTree, but I really think that should be a function of the model, not the view.
For JTable, I believe it's only there as a pass-thru, calling the table model's method underneath to get the value.
Similar Messages
-
Ipod cracked therefore i cant get it repaired from apple with my apple care warranty.
Ipod cracked therefore i cant get it repaired from apple with my apple care warranty for any thing else.
jermainer180 wrote:
What about a major scratch..
What about it?
Warranties on most any product cover manufacturer defects, NOT damage that you do to the product.
If you scratch your tv does the warranty cover it?
Your computer?
Your car?
Anything? -
i recently switched to an android and now i cant get any messages from other iphone users due to imessage. how do i fix this?
As Peter noted and please pay attention to this line
"If you can't deactivate iMessage after you perform the steps above or you can't access the iPhone, please contact Apple Support" -
I made a new apple id and after that i cant get my updates from my iTunes on my pc. How can I do to get it back
Sign out from the new Apple ID with iTunes on your computer and sign in with your old iTunes account with iTunes.
-
How to get current node element for recursive node.
Hello Xperts,
I have a requirement where I need to find the current node element of the recursive node.
I was trying following code for the same
Data:
selected_elem type ref to if_wd_context_element.
selected_elem = WDEVENT->GET_CONTEXT_ELEMENT( NAME = 'CONTEXT_ELEMENT' ).
selected_elem ->get_static_attributes(
IMPORTING
static_attributes = sel_attri ).
But it does not work for me and I always get 1st node value.
Please help me in this issue.
-AshutoshHello ,
If you implementing a simple tree ( not table tree ) and you want the selected element for
OnLoadChildren event .
Then create an importing parameter CONTEXT_ELEMENT of type IF_WD_CONTEXT_ELEMENT
in the event handler of onLoadChildren .
Webdynpro framework automatically filled up the context element with the current node in the tree .
I tried it , It really worked for me .
If you have a table tree then you need to create an importing parameter PATH of type String in tha event handler .
Webdynpro frame automatically fills the PATH .
the use can use the following method to get the element from the PATH .
wd_context->path_get_element( path ).
I tried it , It also worked for me .
Regards
Vivek
PS : please provide the points if answer is helpful . -
How to Get Current Date from MS Access in a Select Statement
From a java method, I want to use JDBC to get the current date from MS Access. In Oracle I would do "select sysdate from dual", but I can't figure out how to do it in MS Access. Here are some of my attempts. I have a table in my Access db called PARM.
// String sql = "SELECT '0', NOW() FROM PARM";
//rs.next() is false
// String sql = "SELECT NOW() AS CURR_DT FROM PARM";
//rs.next() is false
// String sql = "SELECT DATE() AS CURR_DT FROM PARM";
//rs.next() is false
// String sql = "SELECT NOW()";
//StringIndexOutOfBoundsException: String index out of range: -1
// String sql = "select { fn now() } from parm";
String sql = "SELECT Date()";
//java.lang.StringIndexOutOfBoundsException: String index out of range: -1
ResultSet rs = stmt.executeQuery(sql);
if (rs.next()) {
return rs.getString(1);
} else {
return null;
}Why are you getting it as a String? You should be getting it as a timestamp.
Although getString works for me too. There is something else wrong that you haven't shown.
Here is some shoddy, but simple, test code that demonstrates it working.
import java.sql.*;
public class Test{
public static void main(String args[])throws Exception{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection c = DriverManager.getConnection("jdbc:odbc:stats");
Statement s = c.createStatement();
ResultSet rs = s.executeQuery("SELECT NOW()");
while(rs.next()){
System.out.println(rs.getTimestamp(1));
rs.close();
s.close();
c.close();
} -
How to get current URL from Internet Explorer ?
Hi,
I have design an add-on for IE and I'm
trying to get URL from IE which is currently opened that is which is currently user sees. Is there any way to get it? I want to store that address in label and use it for something useful. Is it possible with C# ?
I have did the following code to get current URL but it showing last opened URL instead of current URL which is user see
using SHDocVw;
SHDocVw.ShellWindows shellWindows = new SHDocVw.ShellWindows();
string filename;
foreach (SHDocVw.InternetExplorer ie in shellWindows)
filename = Path.GetFileNameWithoutExtension(ie.FullName).ToLower();
if (filename.Equals("iexplore"))
label1.Text=ie.LocationURL;
label1.Text = ie.LocationName;
and I have tried this one also
foreach (InternetExplorer ie innew ShellWindows())
label1.Text = ie.LocationURL.ToString();
label2.Text = ie.LocationName.ToString();
Please give me any suggestion or code to solve this problem.
Thanks.
PriyankaYou already got addon running in the active ie instance. You just need to catch the WindowStateChanged event in every instance so you can write down the last event with OLECMDIDF_WINDOWSTATE_USERVISIBLE somewhere. When you need the active IE instance, just
pull from your save.
Note an IE tab may crash and take your addon with it. It is better to start a broker process to store your global data.
Visual C++ MVP -
Get Parent node from Base member
Hi ,
My user select base member from CV .
I want parent node for that base member .
I am using =EVPRO( App name , memmber id , "PARENTH1" ) .
I am not getting parent member from this funcation .
Pls let me know any other way for this ?
regards,
PSRHi,
EVPRO for getting the value for PARENTH1 of any member should work. Please check whether you have included all the parameters of this function inside double quotes.
EVPRO("APPNAME","MEMBER_ID","PROPERTY")
Hope this helps,
Regards,
G.Vijaya Kumar -
Installing I cant get the code from entering the redemption code on lightroom, just bought it
Its not a tech issue other than I cant get the serial number from your site adobe.com/go/getserial, I just bought this today at Office Depot they were moving their store and it was like everything else discounted.
Redemption Code Help
http://helpx.adobe.com/x-productkb/global/redemption-code-help.html -
I cant get any volume from YouTube video with safari. With Chrome it's OK
I cant get any audio volume from YouTube video playing in Safari. In Chrome its OK
1. System Preferences > Flash Player > Advanced > Delete All
Press the "Delete All" button under “Browsing Data and Settings”.
Install Adobe Flash Player.
http://get.adobe.com/flashplayer/
Download it first.
The next step is important.
Click Safari in the menubar and select “Quit Safari”.
Follow the prompts and install it.
Restart computer. Relaunch Safari.
2. Allow Plug-ins
Safari > Preferences > Security
Internet Plug-ins > "Allow plug-ins"
Enable it.
3. Safari > Preferences > Privacy > Cookies and website data:
Press the “ Remove All Website Data” button.
Press the “Details” button.
Remove YouTube related cookies.
4. Safari > Preferences > Extensions
Turn those off and relaunch Safari.
Turn those on one by one and test. -
I have lost access to about 36 hours of music and can't get any help from itunes, any suggestions?
HelplessGG wrote:
I have lost access to about 36 hours of music
Download Past Purchases > http://support.apple.com/kb/HT2519
HelplessGG wrote:
...can't get any help from itunes, ...
To Contact iTunes Customer Service and request assistance
Use this Link > Apple Support iTunes Store Contact
Suggestion:
Once you get this resolved... Create and Maintain a Backup of iTunes.
> http://support.apple.com/kb/HT1751 -
I switchedfrom an Iphone to an android and now I cant get text messages from I phones
I need to know why I cant receive text messages from people with I phones, I just switched from an I phone to an android.
The reason is you need to de-register your iPhone iMessage.
iOS: Deactivating iMessage -
How to get current month from filename and bulk insert from text file into table?
I set up some dynamic SQL to help my bulk copy data from a text file to a table. This works fine for files that come in every day; I get the previous day’s data, based on the file name that’s placed
in the folder. That’s why I’m using the ‘-1’. The dates will look like this: '20140131', so I'm using type 112.
declare @fullpath1 varchar(1000)
select @fullpath1 = '''\\system.local\ms\london\FTP\' + convert(varchar, getdate()-1, 112) + '_INDEXPRICES_EOM.SPC'''
declare @cmd1 nvarchar(1000)
print (@cmd1)
select @cmd1 = 'bulk insert [dbo].[SB_Monthly] from ' + @fullpath1 + ' with (FIELDTERMINATOR = ''\t'', FIRSTROW = 5, LASTROW = 675, ROWTERMINATOR=''0x0a'')'
print(@cmd1)
exec (@cmd1)
I think the syntax will be somewhat similar to this:
YEAR(date_column)=YEAR(getdate()) AND MONTH(date_column)=MONTH(getdate())
I’m not totally sure how to incorporate that into my current syntax.
Knowledge is the only thing that I can give you, and still retain, and we are both better off for it.I tried a couple versions of this.
Declare @StartDate Date, @EndDate Date
Select @StartDate = convert(varchar, getdate()-28, 112), @EndDate = convert(varchar, getdate()-1, 112)
BEGIN
declare @fullpath1 varchar(1000)
select @fullpath1 = '''\\ms\london\FTP\' + ''' between ''' + Convert(Varchar(10), @StartDate, 101) + ''' and ''' + Convert(Varchar(10), @EndDate, 101) + '''_SP.SPC'''
declare @cmd1 nvarchar(1000)
print (@cmd1)
select @cmd1 = 'bulk insert [dbo].[SPBMI_Monthly] from ' + @fullpath1 + ' with (FIELDTERMINATOR = ''\t'', FIRSTROW = 5, LASTROW = 675, ROWTERMINATOR=''0x0a'')'
print(@cmd1)
exec (@cmd1)
END
Here’s the string:
bulk insert [dbo].[SPBMI_Monthly] from '\\ms\london\FTP\' between '02/03/2014' and '03/02/2014'_SP.SPC' with (FIELDTERMINATOR = '\t', FIRSTROW = 5, LASTROW = 675, ROWTERMINATOR='0x0a')
The error message I keep getting is:
Msg 156, Level 15, State 1, Line 1
Incorrect syntax near the keyword 'between'.
Msg 319, Level 15, State 1, Line 1
Incorrect syntax near the keyword 'with'. If this statement is a common table expression, an xmlnamespaces clause or a change tracking context clause, the previous statement must be terminated with a semicolon.
I feel like I’m already pushing this thing to the limit.
Maybe this last part isn’t possible.
Knowledge is the only thing that I can give you, and still retain, and we are both better off for it. -
Cant get audio out from iPad airplay on optical audio
I have an apple tv in school for streaming video of drama classes to big screen. Apple tv is plugged into HDMI on projector and i airplay the videos from iPad. My issue is getting sound - the projector has no speaker in it so no sound is currently playing. I purchased an optical audio to 3.5mm jack lead to go from the rear of the apple tv to a set of speakers on my desk. Nothing seems to be happening - will this setup just not work or is there a way for my classes to hear the soound as i airplay it?
Any help GREATLY appreaciated!
ThanksWhere did you get the lead - it would ordinarily require a D/A converter between the optical connector and the 3.5mm jack...
-
Get current node IP(network) address
hello,
i am looking at how to get the current IP address of the node without connecting to a server.i.e at the host itself similar to running the "ipconfig" utility or the "ifconfig" .http://java.sun.com/j2se/1.5.0/docs/api/java/net/InetAddress.html#getLocalHost()
Maybe you are looking for
-
HT4906 deleting photos in photo stream Stuck in Yahoo mail Applications Attachments
Using Yahoo mail and there new Applications and in file Attachments i have some pictures and Movie 3 items total. In Yahoo mail it does not allow me to move the 3 items to trash. The pictures and movies has been deleted and trashed in iPhoto and iMov
-
Pre ordered album is available, but can't find it in the downloads section on ipad 2
The new album by coldplay is released and I received an e-mail with a download link. If Infollow the link on my ipad, it says to check the downloads section, but the album isn't there...
-
Can't deactivate apps off Creative Cloud's desktop.
Hi, when I first installed Creative Cloud I installed the apps that I thought I needed. When I realized I didn't need some of them I tried to remove it from my computer, but eventually I did a system restore because it was not cooperating. Now the ap
-
What are the access permissions on Site Contents?
Hello I don't want outsiders accessing Site Contents. What are the access permissions? Can anyone see that page? Mel Mel
-
Device Mapper and -fallback.img - stock, ck and beyond
Hi! I have similar findings to superstoned, see at the end of http://bbs.archlinux.org/viewtopic.php?t=27696 device mapper module is not the part of the kernel26*-fallback.img. I understand the fallback images as the ones that contain all modules and