JTREE request edit mode for one node

hello,
my jtree is editable
tree.setEditable(true); // double click on a node and it goes in "edit mode"
I would like to set a specific node into "edit mode" (just like when you create a new folder in windows - new folder appears in edit mode - you just have to type the name of the folder)
//set the node selected
setSelectionPath(new TreePath(newfolder.getPath()));
// set the node in edit mode - does not exist ???
setEdit((new TreePath(newfolder.getPath())); ????
Second question:
how can I avoid a specific node from being editable ?
// set all the nodes editable !!
tree.setEditable(true);
thanks a lot !

polo777 wrote:
I would like to set a specific node into "edit mode" (just like when you create a new folder in windows - new folder appears in edit mode - you just have to type the name of the folder)[JTree.startEditingAtPath|http://java.sun.com/j2se/1.5.0/docs/api/javax/swing/JTree.html#startEditingAtPath(javax.swing.tree.TreePath)].
how can I avoid a specific node from being editable ?Override [JTree.isPathEditable|http://java.sun.com/j2se/1.5.0/docs/api/javax/swing/JTree.html#isPathEditable(javax.swing.tree.TreePath)].

Similar Messages

  • Edit mode for a single section

    Hi,
    How can one enable edit mode for a single section in a UITableView with group sections.
    Thanks.

    Something like this should work for you:
    @interface RootViewController : UITableViewController {
    NSNumber *sectionToEdit;
    @property (nonatomic, retain) NSNumber *sectionToEdit;
    - (IBAction)doEdit:(id)sender; // test bed only
    @end
    @implementation RootViewController
    @synthesize sectionToEdit;
    - (void)dealloc {
    [sectionToEdit release];
    [super dealloc];
    - (void)editSection:(BOOL)editing section:(int)section animated:(BOOL)animated {
    UITableView *tableView = self.tableView;
    self.sectionToEdit = editing ? [NSNumber numberWithInt:section] : nil;
    [tableView setEditing:editing animated:animated];
    // test bed driver
    - (IBAction)doEdit:(id)sender {
    static BOOL editing = NO;
    editing = !editing;
    [self editSection:editing section:2 animated:YES];
    #pragma mark Table view methods
    - (BOOL)tableView:(UITableView *)tableView
    canEditRowAtIndexPath:(NSIndexPath *)indexPath {
    if (sectionToEdit == nil)
    return YES;
    else if ([sectionToEdit intValue] == indexPath.section)
    return YES;
    else
    return NO;
    - (UITableViewCellEditingStyle)tableView:(UITableView *)tableView
    editingStyleForRowAtIndexPath:(NSIndexPath *)indexPath {
    return UITableViewCellEditingStyleInsert;
    - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
    return 3;
    - (NSInteger)tableView:(UITableView *)tableView
    numberOfRowsInSection:(NSInteger)section {
    return 3;
    - (UITableViewCell *)tableView:(UITableView *)tableView
    cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    static NSString *CellIdentifier = @"Cell";
    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
    if (cell == nil) {
    cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault
    reuseIdentifier:CellIdentifier] autorelease];
    cell.textLabel.text = [NSString stringWithFormat:@"Section %d - Row %d",
    indexPath.section, indexPath.row];
    return cell;
    Note that once a section is selected for editing, the above locks out all the other sections until the edit of the selected section is finished. I assume this is what you'd want. However if you're also providing a standard editing button to put the entire table in editing mode, you might want to change the control structure a little. E.g. if the standard button remains enabled during a section edit session, its action should probably set SectionToEdit to nil before starting the animation.
    - Ray

  • Making short text field in Display mode for one particular Purchasing

    Hi All,
    This is regarding Making the Short text field in Display mode of PR for one Particular Purchasing.. i am giving you a bit elaborate...We are into E-Catalog Procurement.I will do the shopping from the Vendors external catalog and i will return back to SAP.
    While doing so, i dont want the user to change the Short Text field. I want that field shud display the Description. When i tried with the Screen Layout settings, it is fully grayed out and i am not able to see the Description of the Material. Is there any other options to get this enabled?. Please advice me on this settings to be done. Thanks in Advance.
    With Regards,
    Saakithyan

    Hi
    Define a Field selection key (new not the one which is assigned to document type) which makes  short text editable in screen layout config. and assign it to functional authorization value in t.code OMET. (it should be numeric). Then assign that functional authorization value in user master SU01 for users with parameter id EFB.
    Then it will work
    Regards
    Antony

  • How can I get the number request's (count) for One interface

    Hi Guru's,
    I have a requirement,One interface say Hello world._How can I get the number request's (count) for this interface_.I thing with BAM it's possible.
    But I have no idea about BAM.If is there any alternative please give directions and instruction how to achieve this task.
    Can any body help.Thanks in advance.
    Regards
    Mani

    You have to query the SOA_INFRA schema to get the answer.
    Build a select query in cube_instance table.
    Thanks,
    Vijay

  • Can you create an album in Edit mode for Elements 8?

    I use a netbook and my screen resolution is maximized at 1024 x 600.  I found another post that stated the screen will be cut off if there was less than 1024x768.
    When I create an album I am not able to click "Done" at the bottom of the panel.  This doesn't happen in Edit mode, only Organizer
    I'm new to the program.  Is there a way around this?
    Thanks

    Perfect, thank you.  It worked.  When I r
    ight-clicked on the menu bar, "preoperties" didn't come up, but it did give me a "size" option.
    Thanks for your help

  • Presets or Editing Mode for MJPG

    I am trying to figure what Preset or Editing Mode in the General tab to start with for the following.
    I tried to use DV NTSC but I get the red bar on the bottom edge of my time line. doesnt this mean that my file and Premiere dont match?
    General
    Complete name         : E:\VelocityHD_Processed\Watts\Watts_0004_NTSC-HD_18_fps.avi
    Format                : AVI
    Format/Info           : Audio Video Interleave
    Format profile        : OpenDML
    File size             : 11.3 GiB
    Duration              : 6mn 11s
    Overall bit rate      : 262 Mbps
    Video
    ID                    : 0
    Format                : JPEG
    Codec ID              : MJPG
    Duration              : 6mn 11s
    Bit rate              : 262 Mbps
    Width                 : 1 920 pixels
    Height                : 1 080 pixels
    Display aspect ratio  : 16:9
    Frame rate            : 29.970 fps
    Color space           : YUV
    Chroma subsampling    : 4:2:2
    Bit depth             : 8 bits
    Scan type             : Interlaced
    Scan order            : Top Field First
    Compression mode      : Lossy
    Bits/(Pixel*Frame)    : 4.215
    Stream size           : 11.3 GiB (100%)
    Thanks

    Some previous discussions that may help... you don't give your camera brand, so I am putting all 3 discussions
    MJPEG http://forums.adobe.com/thread/730396
    - problems with Samsung codec http://forums.adobe.com/thread/699493
    - and Fuji http://forums.adobe.com/thread/1015922

  • Request: Bios mod for GT60-ONC 16F311 unlock

    Hi i would love to have a mod for this laptop GT60-ONC 16F311 so i can enable and disable options and overclock manually and push the ram a little futher.
    My current BIOS is,
    BIOS :E16F3IMS.10M (there is a raid version but i dont have raid)
    EC version : 16F3EMS2 ver 4.05
    Hope someone can help me with a unlocked ROM so i can use all options in the BIOS.

    Oh ok shame that there is not more possible ,such disable throttle and that kind of stuff but thx for your fast reply , and as soon there is a possibillity then i am the first who want it.
    Would love to play a little with this computer but since all is locked then there is not much option.

  • Maintenance Mode For One Monitor

    Is it possible to place one monitor in maintenance mode? Not the entire computer or object, but just that one monitor? I don't want other monitors for that object to be silenced though.

    Hi,
    A Windows Schedule task,
    http://technet.microsoft.com/en-us/library/cc748993.aspx
    Please read this one:
    Management Pack for the SCOM 2012 Maintenance Mode Scheduler
    http://blog.tyang.org/2014/05/22/management-pack-scom-2012-maintenance-mode-scheduler/
    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.

  • Make Editable only for one cell

    Hi,
    Is it possible to make one cell editable in a non-editable column of a matrix?
    I have made a column non-editable.  Now, based on a CFL value (which is in another column) selected, i want to make that row's non-editable column as editable.
    My code, which fails:
    If objMatrix.Columns.Item("V_1").Cells.Item(pVal.Row).Specific.value = 0 Then
                objMatrix.Columns.Item("V_0").Cells.Item(pVal.Row).Specific.Enabled = True
    End If

    If is column set to non editable, you cannot allow to user change the vaule in any cell. The only way is set the column as editable and catch the events as
    If pVal.ItemUID = "matrix" And pVal.BeforeAction = True And pVal.EventType = SAPbouiCOM.BoEventTypes.et_VALIDATE (for cghanges, gotfocus for accesing) And pVal.ColUID = "col" And pVal.ItemChanged = True Then
    which will catch the changes of cell and if the cell isnt enabled for changes, set bubleevent to true.

  • Changing shared variable reference modes for all nodes in applicatio​n. Shortcut?

    I have a large application which makes extensive use of both network-published and single-process shared variables.  I want to change the reference mode of every such node in the application from absolute to target-relative.  Is there any way to do this without having to open every subVI in the application and use the right-click menu on every node?
    Sean

    I don't know of any shortcut, but if you want to change the reference node of everything in the application you could probably script it.  I was thinking something similar to what I have below where you traverse the BD of a specific VI for all SharedVariableNodes and change the relative mode to Target Relative.
    Depending on how your project is organized you can add some additional functionality before the open VI reference to go through and open the reference of every VI in your project.
    Matt J
    Professional Googler and Kudo Addict
    National Instruments

  • How to apply Bundle Patch in Rolling Mode for 2 Node RAC

    Hi Guys,
    I have a 2 node RAC environment (11.2.0.3) where each node has there own local Grid_home and RDBMS_home.
    I am installing a Rolling Bundle Patch with OPatch in this environment. The installation document says that "The order of patching in RAC install is GRID_HOME, then RDBMS_HOME" so i did the following.
    1. stopped all oracle related services on node1
    2. set oracle_home=<Grid_home>
    3. applied the opatch
    4. opatch succeeded on node1 and it says "The node 'NODE2' will be patched next... Is the node ready for patching? y
    Here i am bit confused.
    1. Should i shutdown the oracle services in Node2 and continue to patch the Grid_home ? If yes then the DB will be completely down for user access. This defeats the purpose of rolling mode which says there is no downtime.
    2. Should i patch the RDBMS_home on node1 , start all the oracle services on node1 , stop the oracle services on node2 and then resume the opatch on node1 which is waiting to patch the Grid_home on node2 ?
    Please advice.
    Thanks,
    Ashok Kumar.G

    Hi Sebastian,
    14613223 patch install instruction did not mention about opatch -local option.
    Here is what i followed and completed the installation successfully.
    1. Shutdown all oracle services on node 1
    2. applied opatch for grid home and then rdbms home using "opatch apply -local" on node1
    3. Started all oracle services on node 1
    4. Shutdown all oracle services on node 2
    5. applied opatch for gridhome and then rdbms home using "opatch apply -local" on node 2
    6. Started all oracle services on node 2
    7. executed post installation steps on the DB (@catwinbundle.sql & @utlrp.sql )
    Thanks,
    Ashok Kumar.G

  • Elimination of Edit Mode for Views

    Hi all,
    I have created a view with a condition which says Activity is not "Save Request" . This is from within studio.
    When I deploy the process and see the workspace, I do see the condition being applied but I also see that the condition created from within studio appears as Editable inside the workspace for that view.
    I want to not show this condition to the end-user but at the same time, want to apply such a condition.
    How can I do this?
    This is in OBPM 10GR3.

    You have a property in the view called isHidden that I think is what you are looking for.
    Regards

  • Non-editable mode for customer master data in VA01 and VA02

    Hi all,
    User requirement is they don't want to give permission to change customer master data (payer & ship-to ). I didn't find any user exit to do screen non-editable.
    Can any one help me in this..
    Regards,
    Sudhakara

    Hi Sudhakar Reddy,
    For this transaction code user exits available :
    SDTRM001  Reschedule schedule lines without a new ATP check
    V45A0001  Determine alternative materials for product selection
    V45A0002  Predefine sold-to party in sales document
    V45A0003  Collector for customer function modulpool MV45A
    V45A0004  Copy packing proposal
    V45E0001  Update the purchase order from the sales order
    V45E0002  Data transfer in procurement elements (PRreq., assembly
    V45L0001  SD component supplier processing (customer enhancements
    V45P0001  SD customer function for cross-company code sales
    V45S0001  Update sales document from configuration
    V45S0003  MRP-relevance for incomplete configuration
    V45S0004  Effectivity type in sales order
    V45W0001  SD Service Management: Forward Contract Data to Item
    V46H0001  SD Customer functions for resource-related billing
    V60F0001  SD Billing plan (customer enhancement) diff. to billing
    For ur requirement whixh exit is suitable plz check it out. other wise put breakpoint for userexit and check it out.
    Rewards somr points.
    Rgds,
    P.Nag

  • How can we change the field confirmed work of SAP PPM from edit to not edit mode ? I need it into non edit mode for time recording with ChaRM

    Hello everyone,
    Do someone meet this issue ? Do you know if it has a link with customization of ppm or customization of ITSM ?
    Many thanks in advance for your replies !

    It seems that I've solved this issue. To get it work:
    1. Select checkbox Time Recording and Travel Expenses via CATS for project type. Path: SPRO —> SAP Customizing Implementation Guide —> SAP Portfolio and Project Management —> Project Management —> Structure => Define Project Types
    2. Run/schedule a synchronization with the report DPR_CATS_CPR_TRANSF (Transfer of CATS Itemizations to Project Management Application).
    Time Recording from a Request for Change to a PPM ProjectTask - Working with Projects - SAP Library
    Regards,
    Alex

  • How to view NEF (RAW) photos when in editing mode for PSE 9

    When I want to open a NEF photo to edit, all I cannot see the actual photo.  I have to go into another program to view the photos so that I can determine which file name I want to open and edit.

    In the editor, go to Help >Updates and see if it updates camera raw for you.

Maybe you are looking for