JTree in JScrollPane not resizing after model change.

I have a JTree in a JScrollPane that's put in a JPanel using the JGoodies FormLayout as it's layout manager. The column definition defines the column to grow so the JScrollPane should have enough space. The tree is empty when I create it and put it in the JScrollPane.
After adding some nodes to the tree the JScrollPane does not resize automatically, it only resizes when a forced repaint occurs (moving or resizing the window , etc).
I've tried calling invalidate(), repaint(),revalidate() on both the JTree and the JScrollPane. I also do a reload() on the TreeModel after adding the nodes (which is probably unnecessary as I use insertNodeInto(node,parent,position) from the DefaultTreeModel to add the new nodes).
Anybody knows what I'm missing here?
Thanks a lot in advance !

Update:
The card is running now. I had another Arch system (arch2) on the same network (to compare with), and after I shut that down and rebooted the first one (arch1) the network interfaces show up, both lo and eth0.
However, the startup routine hangs about 2-3 minutes on the network daemon (with blinking router lights and hdd activity), so it's still not perfect. Another thing is that I can't get the right gateway from the router's dhcp. Here's an overview of the setup:
Home: 192.168.2.x
arch1 .2.102-------|
|
arch2 .2.101-------| old SMC router: .2.1
|
fritzbox .2.2 -----|
router/modem
|
|
~~~~~
internet
The gateway is supposed to be the fritzbox with ip 192.168.2.2. The old SMC router serves addresses in the range .2.101-110. I set it up this way because I need the 8 ports on the SMC (and I like watching the lights).
Here's my /etc/rc.conf for both systems:
arch1 (starts slow):
eth0="dhcp"
ROUTES=(!gateway)
arch2 (working):
eth0="eth0 192.168.2.101 netmask 255.255.255.0 broadcast 192.168.2.255"
gateway="default gw 192.168.2.2"
ROUTES=(gateway)
arch1 gets the SMC as gateway, arch2 gets the fritzbox.
Ideally all computers on the network should get their IPs from the SMC dhcp, which also gives them the fritzbox as gateway. But that just doesn't work for the arch1. arch2 and the windows PCs get online just fine.
I had also tried setting arch1 the same as arch2 except for the ip=2.102. Then the network starts faster, but the gateway is still stuck at the SMC router -> no internet.
Rather complicated, but what are networks for? Anyone see daylight in this mess?
Last edited by bitpal (2009-08-13 21:24:02)

Similar Messages

  • Bug: View does not resize after soft keyboard dismissal

    On Android when resizeForSoftKeyboard=true, the view does not resize after dismissing the soft keyboard. This simple app demonstrates the bug.
    <?xml version="1.0" encoding="utf-8"?>
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                   xmlns:s="library://ns.adobe.com/flex/spark"
                   applicationDPI="160"
                   resizeForSoftKeyboard="true"
                   applicationComplete="applicationComplete()">
        <fx:Script>
            <![CDATA[
                private function applicationComplete():void {
                    keywordTextInput.setFocus();
                private function keywordTextInputEnter():void {
                    stage.focus = null;
            ]]>
        </fx:Script>
        <s:Rect id="rect1" width="100%" height="100%">
            <s:stroke>
                <s:SolidColorStroke color="#FF0000" weight="4"/>
            </s:stroke>
        </s:Rect>
        <s:TextInput id="keywordTextInput" enter="keywordTextInputEnter()" returnKeyLabel="go"/>
    </s:Application>
    1) Start app.
    2) Click on the "go" button on the soft keyboard
    I observe that the red rectangle remains the same size (about half the screen). I expect the red rectangle to resize to fill the entire screen as it does on iOS.
    My environment:
    Flash Builder 4.7 beta
    Flex 4.6.0
    AIR 3.4
    ASUS Transformer (Android 4.0.3)

    Submitted bug:
    https://bugbase.adobe.com/index.cfm?event=bug&id=3657721

  • OWB repository not working after SID changed ?

    Hi,
    We have an OWB repository in a database named TEST. Recently the SID has been changed from TEST to TEST_2, and now the control center fails. Do I need to recreate the repository in the database after SID change, or could I just do some reconfigurations ? And if I could, how do I reconfigure the repository & control center based on the new SID name ?
    Thanks

    You don't need to recreate repository,
    but you should update OWB repository table ( for more details look at this thread
    Re: Unable to connect control center and start runtime service
    ) and maybe you need perform additional steps from Metalink note 434272.1 (for updating target location info).
    Regards,
    Oleg

  • Mx922 not working after ink changed. now computer can't find the printer! Help!

    Computer said the ink was low. Changed the ink when it finally stopped because of an insufficent amount of ink. Now the computer can't detect the printer, let alone the ink change! I have read some other posts and tried to reset the drivers, that didn't work either. Now I can't even reinstall the drivers because the computer can't detect the printer. The printer is on and says that it's connected to the wireless network. It says my only other option is to connect via the USB, well Canon does not provide this model with a USB cord. So what now I have to go out and get a USB cord so that I can use my EXPENSIVE printer! That is why I paid more, so I wouldn't have to use wires!
    Please if anyone has any solutions that I have overlooked please tell me! I really need to print for work.

    I had a similar issue with my new Macbook Air. I ended up going and finding the bluetooth preferences (/Library/Preferences)  and deleting them. Then I restarted. This time around it could see the printer.

  • ADFf 11g, view does not refresh when model changes

    Hi,
    I am really missing something about adf faces (jdev 11.1.1.3.0).
    I have a web app, with jspx, tabpanels and pojo data controls.
    Since there is a complex logic to open new pages/tabs, sometimes I have to open new pages/tabs programmatically, and also sometimes I have
    to refresh the model behind pages/tabs programmatically.
    When I say "programmatically" I mean that the model refresh is not started by an user action on the webpage, but is started by logic in the model layer
    (say, for example, you receive a JMS message and you want to reload the content of an entire page).
    I can succesfully update the model, using debug println I can see the model is updated, but there is no way I can update the view.
    I tryed with the "addPartialTarget" code and so on, but it does not work.
    I've also bought and read "Oracle JDeveloper 11g Handbook" and "Oracle Fusion Developer Guide", but I can't find anything that can help me.
    Can someone explain me: what am I missing? I am sure there is some concept in ADF Faces I missed: this framework is too
    big not to offer what I need, so I miss something for sure.
    I hope to get an answer, I hope Shay reads this too.
    Thanks all.

    Hi,
    Active Data Services (chapter 20 in the book) is what would allow you to synchronize the screen with the model changes. The problem you face is because the data you see is what is stored in the iterators of the binding layer. An alternative solution to using ADS is to use an af:poll component that refreshes the display component when the model has changed. For this your model exposes a method that returns a time stamp that changes whenever the data has changed. Upon af:poll expiring, it calls a managed bean method, which - through the ADF binding layer - checks for the time stamp and compares it with a local saved copy (whenever the time stamp has changed, the client side will e.g. write it to the viewScope or pageFlowScope). If the time stamp has changed, the managed bean re-executes the method populating the iterator for the UI components and then issues a partial refresh of the component(s). Instead of PPR'ing each component in turn, you can try setting the ChangeEventPolicy property of the iterators to ppr"
    This should solve the problem. The latter example is also explained in chapter 20, but for ADF BC
    Frank

  • Chart does not update after table changes

    Simple X-Y chart using a data series from a table. The chart will not update after changing the table, for example after applying a filter. The chart will update if you close and reopen the file or go to Select Data on the chart.  I use named ranges
    because you can't use table nomenclature directly in the chart series definition.

    Seems to update for me OK. You need to apply the entire unfiltered range to the chart before filtering. Did you do this or filter first and only apply the visible range?
    If not the answer to you query then maybe I am not understanding the problem correctly so can you upload an example workbook?
    Guidelines to post a workbook on OneDrive
    Zip your workbooks. I prefer that you do not just save to OneDrive. (To Zip a file, in Windows Explorer  Right click on the selected file and select Send to -> Compressed (zipped) folder.)
    Go to this link.  https://onedrive.live.com
    Use the same login Id and Password that you use for this forum.
    Select Upload in the blue bar across the top and browse to the zipped folder to be uploaded and select Open (or just double click). (Be patient and give it time to display the file after initially seeing the popup indicating it is done.)
    Right click the file on OneDrive and select Share.
    Do NOT fill in the form; "Select Get a Link" on the left side.
    Click the button "Create a Link"
    Click in the box where the link is created and it will highlight.
    Copy the link and paste into your reply on this forum.
    Regards, OssieMac

  • SCOM is not opening after password change

    Hi
    I am unable to open SCOM after i change the password of account from which i have installed scom and sql server. Is there any way to fix this problem?? I used same account for all the accounts needed during installation of scom. It was working fine but when
    i changed my password of account, after that SCOM is not opening

    Hi 
    you need to change the password of services running with this account in service.msc on all scom servers to make scom to functional.
    Regards
    sridhar v

  • Iphone 3gs not turning after screen change

    iphone 3gs not turning after screen change

    Having a 3rd party replace your screen has voided your warranty.  Bring your phone back to whomever repaired it.  Nothing we users can do for you.

  • MobileMe iPhoto galleries not syncing after password change

    After changing the MobileMe Password iPhoto does not recognize the properly configured MobileMe Account anymore.
    All other Applications with MobileMe Upload/Sync/Publishing capability (iMovie, Aperture, MobileMe-Sync) still work flawless. After trying to publish a Photo to a MobileMe Gallery or clicking on an prior uploaded MobileMe , the MobileMe "Are you already a member" (Translated from German) screen pops up, asking me to login into MobileMe. A second windows states "An error occured with the publication of album "ALBUMNAME". Your MobileMe Account Information is not correct. The provided login or password is not valid" (Translated from German)."
    Even in the iPhoto Preferences/Setting under the "Web" Tab the used and max iDisk Capacity is not shown.
    After changing the MobileMe Password iPhoto does not recognize the MobileMe Account anymore.
    I'm having this problem on my late 2007 MacBook Pro 2,4GHz
    On my second Mac at home evrything works just fine, even in iPhoto.
    I've tried several things to solve this problem:
    - Logging Off & On with fake MobileMe username/password in the MobileMe Setting in System Preferences
    - Updating the password in publish.me.com in the keychain
    - replacing the keychain on this Mac (MBP) with the keychain from my Mac at (both have latest Snow Leopard and iPhoto Version)
    - deleted the com.apple.iPhoto.plist
    I took information/suggestions from these forum posts:
    http://discussions.apple.com/message.jspa?messageID=8168945
    http://discussions.apple.com/thread.jspa?messageID=10235638&#10235638
    http://discussions.apple.com/thread.jspa?threadID=1904914&start=0&tstart=0
    http://forums.macrumors.com/showthread.php?t=689762
    Any advice/ideas?
    Thanks
    Oliver

    http://discussions.apple.com/thread.jspa?messageID=10404438&#10404438
    found that thread and looked in the keychain - indeed it was still the old password - changed it and now working again...

  • Window.resizeTo in addon (overlay commonDialog) does not resize after some minimum size in FF v17 & 18

    I created an addon which overlay commonDialog.xul.
    In the load event, window.resizeTo is called and set to a very small size (like 10x10) so it is almost invisible to users.
    This works fine in FF 15. After upgrading to FF 17 or FF 18, this stops working.
    When I set the size big, it works fine. When setting it to a small size, it seems like when hitting a limit, the window size stays the same. The window size is the same when setting to 10x10 or 100x100.
    This is on a MAC, but same behavior is observed on Windows too.
    It seems like there is a minimum size predefined and the window does not get smaller than that.
    Aren't we supposed to be able to resize the window as we wish in the addon?

    If you create your own window with a unique ID then it should be possible to create more specific CSS rules for that window.
    How (when) do you resize that window when you need it to show with the default dimensions?
    If you have specific questions about developing extensions then it is best to ask advice at the MozillaZine Extension Development forum.
    *http://forums.mozillazine.org/viewforum.php?f=19
    The helpers at that forum are more knowledgeable.<br>
    You need to register at the MozillaZine forum site in order to post at that forum.

  • Broken Links not fixed after being changed-HELP PLEASE!

    I am trying to fix a website I created for a friend. I created it in Dreamweaver CS6 on a Mac. Everything was working on the website, the pitures were showing up and now 2 of the pages arent working. On both pages the spry bar is not working and some of the pictures will not show up. I have went to find broken links and redirected it to the correct file but it is not changing anything. I am not sure how to fix this problem, if anyone has any advice that would be great!! The website is www.serenityatthebeach.com.

    That line read correctly when I looked at it on the broken page colorcutstyle. I copied the code from the page if that would help. I hope this helps.
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <!-- TemplateBeginEditable name="doctitle" -->
    <title>Stlye Services</title>
    <!-- TemplateEndEditable -->
    <!-- TemplateBeginEditable name="head" -->
    <!-- TemplateEndEditable -->
    <style type="text/css">
    <!--
    @import url("webfonts/Jenna_Sue/stylesheet.css");
    body {
              font: 100%/1.4 Verdana, Arial, Helvetica, sans-serif;
              background-color: #A9AB36;
              margin: 0;
              padding: 0;
              color: #000;
              background-image: url(background.jpg);
    /* ~~ Element/tag selectors ~~ */
    ul, ol, dl { /* Due to variations between browsers, it's best practices to zero padding and margin on lists. For consistency, you can either specify the amounts you want here, or on the list items (LI, DT, DD) they contain. Remember that what you do here will cascade to the .nav list unless you write a more specific selector. */
              padding: 0;
              margin: 0;
    h1, h2, h3, h4, h5, h6, p {
              margin-top: 0;           /* removing the top margin gets around an issue where margins can escape from their containing div. The remaining bottom margin will hold it away from any elements that follow. */
              padding-right: 15px;
              padding-left: 15px; /* adding the padding to the sides of the elements within the divs, instead of the divs themselves, gets rid of any box model math. A nested div with side padding can also be used as an alternate method. */
              font-family: "Jenna Sue";
              font-size: 50pt;
              text-align: center;
    a img { /* this selector removes the default blue border displayed in some browsers around an image when it is surrounded by a link */
              border: none;
    /* ~~ Styling for your site's links must remain in this order - including the group of selectors that create the hover effect. ~~ */
    a:link {
              color: #A9AB36;
              text-decoration: underline; /* unless you style your links to look extremely unique, it's best to provide underlines for quick visual identification */
    a:visited {
              color: #6E6C64;
              text-decoration: underline;
    a:hover, a:active, a:focus { /* this group of selectors will give a keyboard navigator the same hover experience as the person using a mouse. */
              text-decoration: underline;
    /* ~~ this fixed width container surrounds the other divs ~~ */
    .container {
              width: 960px;
              background-color: #E5E3E4;
              margin: 0 auto; /* the auto value on the sides, coupled with the width, centers the layout */
    /* ~~ the header is not given a width. It will extend the full width of your layout. It contains an image placeholder that should be replaced with your own linked logo ~~ */
    .header {
              background-color: #ADB96E;
    /* ~~ This is the layout information. ~~
    1) Padding is only placed on the top and/or bottom of the div. The elements within this div have padding on their sides. This saves you from any "box model math". Keep in mind, if you add any side padding or border to the div itself, it will be added to the width you define to create the *total* width. You may also choose to remove the padding on the element in the div and place a second div within it with no width and the padding necessary for your design.
    .content {
              padding: 10px 0;
    /* ~~ The footer ~~ */
    .footer {
              padding: 10px 0;
              background-color: #A9AB36;
    /* ~~ miscellaneous float/clear classes ~~ */
    .fltrt {  /* this class can be used to float an element right in your page. The floated element must precede the element it should be next to on the page. */
              float: right;
              margin-left: 8px;
    .fltlft { /* this class can be used to float an element left in your page. The floated element must precede the element it should be next to on the page. */
              float: left;
              margin-right: 8px;
    .clearfloat { /* this class can be placed on a <br /> or empty div as the final element following the last floated div (within the #container) if the #footer is removed or taken out of the #container */
              clear:both;
              height:0;
              font-size: 1px;
              line-height: 0px;
    .container .content p {
              font-size: 30pt;
    .Headers {
              color: #A8A92B;
    -->
    </style>
    <link href="SpryAssets/SpryMenuBarHorizontal.css" rel="stylesheet" type="text/css" />
    <script src="SpryAssets/SpryMenuBar.js" type="text/javascript"></script>
    </head>
    <body>
    <div class="container">
      <div class="header"><!-- end .header -->
      <div align="right"><a href="http://www.aveda.com/index.tmpl"><img src="Header1.jpg" alt="Header" name="logo" width="961" height="423" id="logo" /></a></div>
      </div>
      <div class="content">
        <ul id="MenuBar1" class="MenuBarHorizontal">
          <li><a href="index.html">Home</a>      </li>
          <li><a href="colorcutstyle.html">Hair Services </a></li>
          <li><a href="../spapage.html">Spa Services </a>      </li>
          <li><a href="nailpage.html">Nail Services </a></li>
          <li><a href="makeup.html">Make-Up </a></li>
          <li><a href="../aboutus.html">About Us </a></li>
        </ul>
        <h1 class="Headers">Hair Services</h1>
        <p><img src="color.gif" width="792" height="612" alt="hairservice" /></p>
        <h1 class="Headers"><img src="IMG_2397.JPG" alt="salon picture" width="933" height="282" /></h1>
        <p>&quot;+&quot;indicates variations in the price determined by the work involved and the level of talent </p>
        <p align="left">24 hours cancellation notice is required </p>
      </div>
      <div class="footer">
        <p><a href="https://www.facebook.com/SerenityAtTheBeachSalonSpa?fref=ts"><img src="facebook-logo.png" alt="facebook" width="244" height="195" /></a><a href="https://plus.google.com/110271807602578049704/about?gl-us&hl=en"><img src="googleplus.png" alt="google plus" width="194" height="194" /></a><!-- end .footer --></p>
      </div>
      <!-- end .container --></div>
    <script type="text/javascript">
    var MenuBar1 = new Spry.Widget.MenuBar("MenuBar1", {imgDown:"SpryAssets/SpryMenuBarDownHover.gif", imgRight:"SpryAssets/SpryMenuBarRightHover.gif"});
    </script>
    </body>
    </html>

  • Release strategy does not reset after PO change - tried changeability 4 & 6

    Hi,
    After my PO is released, I change the item quantity/price such that the net PO value (increased) is changed MORE than the tolerance % set in the changeability.  I expect that the PO release should be reset but it does not.
    However if my PO value is changed (increase) such that my PO value is now in a different "release bracket/range" -- as it falls into a different release strategy, then the release is reset.
    Could anyone advise me what is wrong?  I tried everything - i tried changeability = 4 and 6. i deleted the whole release class, release strategies and recreated -- nothing.
    According to OSS note 493900 below, it should reset when the tolerance % is breached.
    I'm on SAP 4.7.
    Anyone could advise?
    thanks!
         3.  Question :
         Why is the release strategy not reset ?
         Answer :
         A reset of the release strategy only takes place if
                -  the changeability of the release indicator is set to '4' in
                   case of a purchase requisition and '4' or '6' in case of
                   another purchasing document (purchase order, request for
                   quotation, contract, scheduling agreement),
                -  the document is still subject to the previous release
                   strategy,
                -  the new TOTAL NET ORDER VALUE is higher than the old one.
         The total net order value is linked to CEKKO-GNETW for a purchase order,
         CEBAN-GSWRT for a purchase requisition item-wise release and CEBAN-GFWRT
         for a purchase requisition overall release.
         If you have maintained a Tolerance for value changes during release
         (V_161S-TLFAE), the release strategy is reset when the value of the
         document is higher than the percentage you have specified and if the
         document is still subject to the previous release strategy.

    Hi,
    Thanks.
    The release strategies are able to be determined correctly when the PO is created so I guess that means its all setup correctly?
    The issue is only with PO change - how to cause the reset when the PO value increases by more than the tolerance %.
    cheers.

  • Web Template not impacted after query changed and Transported

    Hi. All.
                        We have modified the query and transported to production But query changes not been
    impacted on Standard web teplate. But it works fine in Bex Analyzer.
                       Issue is there was a description was truncated earlier we used initially as short description.
    Later we mapped to Medium description and modified the entire flow and loaded. It works fine.
                      Only in production we are not seeing correct description in web report and it works fine with Analyzer. So we need to ask the user as after executing the report he needs to change characterstic property from Standard to Medium.
    But it would be bit inconvenience to users.
                So how can we solve this problem and why the query changes are not impacting on Web template.
    Please provide your views on this issue.
    Thanks & Regards
    Vijay

    Hi Vijay,
    one reason might be if you use the option "personalization" within the web template. If users can personalize the templates changes will not be visible and have to be deleted at the time a new version of the query is provided. There are background tables for the personalization as well where you can delete all objects for this template at once if necessary.
    Brgds,
    Marcel

  • JTable cell being edited after model changed.

    I have a fairly simple JTable, with a implementation of AbstractTableModel supplying the data. The cells are edited by using a JComboBox. I wrap these into a DefaultCellEditor. I have a KeyListener attached to the JTable listening for VK_DELETE, and when it finds one, instructs the model to delete the row represented by the selected row in the table.
    Everything works fine until I want to delete a row from the table. My scenario is:
    - I click in a cell, and the editor opens.
    - I select an entry in the list. The editor closes, the result is rendered, and the wee yellow box around the cell is shown
    - I hit the delete key.
    - My key listener picks up the event, and informs the model to delete the row. I remove the row from the model and invoke fireTableDataChanged().
    The result is that the row is deleted, but the table ends up with the cell editor deployed on the cell of the row below (which is now at the same row as the one I just deleted).
    My tracing shows that the isCellEditable is called on the model after the delete. I don't know why.
    Can anyone explain how to prevent this or what might be causing the table to think that the cell needs editing?
    Thanks, Andrew

    It will do whatever is the default. I wrap the JComboBox in a DefaultCellEditor. I can't see how the editor is involved at this point, or why the editor becomes involved after the row has been deleted.
    Remember, at the time that I hit the delete key, there is no editor rendered or visible. I have the JTable displayed, a row selected, and the yellow box around one of the (editable but not currently being edited) cells. This has been achieved by editing a cell (displaying the cell editor - a combo box) and selecting an entry. The editor is removed, and the cell displayed with the (default) cell renderer for the table.
    The delete action is caught by the listener on the table, the model is instructed to delete a row from its underlying data, which fires a fireTableDataChanged event.
    That is all I do. After that it is all swing. The table model starts getting asked about cells being editable after I have finished deleting the row. I'll post the relevant code below if that helps.
    The datamodel is of class ConstraintTableModel (see below) and the column model is of class DefaultTableColumnModel
    JTable table = new JTable( dataModel, columnModel );The column model is defined liike so:
    columnModel = new DefaultTableColumnModel();
    TableColumn labelColumn = new TableColumn(ConstraintTableModel.LABEL_COLUMN);
    labelColumn.setHeaderValue( dataModel.getColumnName(ConstraintTableModel.LABEL_COLUMN));
    labelColumn.setPreferredWidth( 5 );
    labelColumn.setMaxWidth( 5 );
    labelColumn.setResizable( false );
    TableColumn taskColumn = new TableColumn(ConstraintTableModel.TASK_COLUMN);
    taskColumn.setHeaderValue( dataModel.getColumnName(ConstraintTableModel.TASK_COLUMN));
    TableColumn typeColumn = new TableColumn(ConstraintTableModel.TYPE_COLUMN);
    typeColumn.setHeaderValue( dataModel.getColumnName(ConstraintTableModel.TYPE_COLUMN));
    columnModel.addColumn( labelColumn );
    columnModel.addColumn( taskColumn );
    columnModel.addColumn( typeColumn );I add the key listener like so:
    table.addKeyListener( new KeyAdapter()
        public void keyPressed( KeyEvent e )
          if( e.getKeyCode() == KeyEvent.VK_DELETE )
            log.debug("Delete pressed in listener attached to table ");
            JTable t = (JTable) e.getSource();
            int selectedRow = t.getSelectedRow();
            if( selectedRow >= 0 )
              log.debug("  Removing row " + selectedRow);
              ((ConstraintTableModel)t.getModel()).removeRow(selectedRow);
            log.debug("Finished with key press");
      } );The cell editor is created like this:
    JComboBox taskEditorComponent = new JComboBox( tasksModel );
    taskEditorComponent.setFont( GanttChart.tableFont );
    taskEditorComponent.setBackground( Color.WHITE );
    DefaultCellEditor taskEditor = new DefaultCellEditor(taskEditorComponent);
    taskEditor.setClickCountToStart( 1 );
    table.setDefaultEditor( GanttTask.class, taskEditor );The model is coded like so:
    class ConstraintTableModel extends AbstractTableModel
        // Constants
        public static final int LABEL_COLUMN = 0;
        public static final int TASK_COLUMN = 1;
        public static final int TYPE_COLUMN = 2;
        private Vector          columnNames;
        private ArrayList       dataRows;
        public ConstraintTableModel()
            super();
            this.buildDataVector();
            this.addPrimerRow();
         * Every row in the table is a GanttConstraint. Therefore when deciding what to
         * display in any particular column of the table, we need to determine what the
         * column is, and then use the informatino in the GanttConstraint to go out to the
         * lookup and get the relevant object, and value to display.
        public Object getValueAt( int row, int col )
            Object          returnObject = "";
            GanttConstraint aConstraint = (GanttConstraint) this.getDataRows().get( row );
            // We're rendering the task column. If there's no task id (partially filled in row)
            // return blank otherwise return the master task
            else if( col == ConstraintTableModel.TASK_COLUMN )
                if( aConstraint.getMasterId() != null )
                    GanttTask masterTask = (GanttTask) real.getLookup().get( aConstraint.getMasterId() );
                    returnObject = masterTask;
            // We're rendering the type column. If there's no type (partially filled in row)
            // return blank otherwise return the constraint type
            else if( col == ConstraintTableModel.TYPE_COLUMN )
                if( aConstraint.getType() != null )
                    GanttConstraintType constraintType = (GanttConstraintType) GanttConstraintType.getConstraintTypes()
                                                                                                     .get( aConstraint.getType()
                                                                                                                      .intValue() );
                    returnObject = constraintType;
            return returnObject;
         * When we receive this message, we are handed an object of the type specified in
         * getColumnClass. We need to take this object and place the relevant information into
         * the GanttConstraint row in the table model.
         * Depending on whether the row being modified is an existing row or a new row, set
         * the state of the constraint appropriately.
         * @see javax.swing.table.TableModel#setValueAt(java.lang.Object, int, int)
        public void setValueAt( Object value, int row, int col )
            log.debug( "+setValueAt (row/col) " + row + "/" + col );
            if ( value == null )
                log.debug( "  handed a null value. Returning" );
                return;
            GanttConstraint aConstraint = (GanttConstraint) this.getDataRows().get( row );
            // If we are modifying the primer row, add another primer row.
            if( row == ( this.getRowCount() - 1 ) ) // Last row is always the primer
                log.debug( "  adding a primer row" );
                this.addPrimerRow();
            // We're modifying the Task data. Get the GanttTask handed to us and place it
            // into the master slot in the constraint.
            if( col == ConstraintTableModel.TASK_COLUMN ) // Task
                log.debug( "  updating the master task" );
                GanttTask selectedTask = (GanttTask) value;
                aConstraint.setMaster( selectedTask );
            // We're modifying the Type data. Get the GanttConstraintType handed to us and place it
            // into the type slot in the constraint.
            if( col == ConstraintTableModel.TYPE_COLUMN ) // Constraint type
                log.debug( "  updating the constraint type" );
                GanttConstraintType selectedConstraintType = (GanttConstraintType) value;
                aConstraint.setType( selectedConstraintType.getType() );
            log.debug( "-setValueAt" );
        public Class getColumnClass( int col )
            Class columnClass = super.getColumnClass( col );
            if( col == ConstraintTableModel.LABEL_COLUMN )
                columnClass = String.class;
            if( col == ConstraintTableModel.TASK_COLUMN )
                columnClass = GanttTask.class;
            if( col == ConstraintTableModel.TYPE_COLUMN )
                columnClass = GanttConstraintType.class;
            return columnClass;
        // We are handing the data storage
        public void setDataRows( ArrayList dataRows )
            this.dataRows = dataRows;
        public boolean isCellEditable( int row, int col )
            log.debug( "+isCellEditable (row/col) " + row + "/" + col );
            if( !real.canEdit() )
                return false;
            if( ( col == ConstraintTableModel.TASK_COLUMN ) ||
                    ( col == ConstraintTableModel.TYPE_COLUMN ) )
                return true;
            else
                return false;
        // We are handing the data storage
        public ArrayList getDataRows()
            return this.dataRows;
        public String getColumnName( int column )
            return (String) this.getColumnNames().get( column );
         * Clean up rows that do not have both the master task and type set. Not interested in them
        public void removeDirtyRows()
            log.debug( "+removeDirtyRows" );
            Iterator dataIterator = this.getDataRows().iterator();
            while( dataIterator.hasNext() )
                GanttConstraint element = (GanttConstraint) dataIterator.next();
                if( ( element.getMasterId() == null ) || ( element.getType() == null ) )
                    element.setTransient();
                    dataIterator.remove();
            fireTableDataChanged();
            log.debug( "-removeDirtyRows" );
        public void removeRow( int row )
            log.debug( "+removeRow(" + row + ")" );
            if( row < this.getDataRows().size() )
                GanttConstraint aConstraint = (GanttConstraint) this.getDataRows().get( row );
                this.getDataRows().remove( row );
                if( aConstraint.isClone() )
                    aConstraint.setDeleted();
                else
                    aConstraint.setTransient();
                    getClone().removeConstraint( aConstraint );
                fireTableDataChanged();
            if( this.getRowCount() == 0 )
                this.addPrimerRow();
            log.debug( "-removeRow" );
        public void clearRow( int row )
            log.debug( "+clearRow(" + row + ")" );
            if( row < this.getDataRows().size() )
                GanttConstraint aConstraint = (GanttConstraint) this.getDataRows().get( row );
                aConstraint.setMasterId( null );
                aConstraint.setType( null );
                fireTableRowsUpdated( row, row );
            log.debug( "-clearRow" );
        public int getColumnCount()
            return getColumnNames().size();
        public int getRowCount()
            return dataRows.size();
         * The table will be filled with constraints relevant to 'clone'.
        private void buildDataVector()
            ArrayList  data = new ArrayList( 1 );
            Collection allConstraints = getClone().getStartConstraints();
            allConstraints.addAll( getClone().getEndConstraints() );
            Iterator constraintIter = allConstraints.iterator();
            while( constraintIter.hasNext() )
                GanttConstraint element = (GanttConstraint) constraintIter.next();
                if( element.getType().equals( GanttConstraint.START_SPECIFIED ) ||
                        element.getType().equals( GanttConstraint.FINISH_FROM_DURATION ) )
                    continue;
                else
                    data.add( element );
            this.setDataRows( data );
        private Vector getColumnNames()
            if( columnNames == null )
                columnNames = new Vector( 3 );
                columnNames.add( " " ); // Needs space otherwise all the headers disappear
                columnNames.add( "Task" );
                columnNames.add( "Constraint" );
            return columnNames;
        private void addPrimerRow()
            log.debug( "+addPrimerRow" );
            // Create a constraint for the 'clone' task. Set it as transient until validation
            // where we will deal with it if necessary.
            GanttConstraint primer = new GanttConstraint( real.getLookup() );
            primer.setObjectId( chart.getNextUniqueId() );
            primer.setTransient();
            primer.setSlave( getClone() );
            primer.setProject( getClone().getProject() );
            getClone().addConstraint( primer );
            this.getDataRows().add( primer );
            int lastRow = this.getRowCount() - 1;
            fireTableRowsInserted( lastRow, lastRow );
            log.debug( "-addPrimerRow" );

  • Ical not syncing after me change over

    After me shut down my calanders do not sync with iCloud. Still running snow leopard.

    Margie,
    Have a look at this previous post and see if anything in it helps you
    http://discussions.apple.com/message.jspa?messageID=11748544#11748544
    Also,
    In iTunes - Device - Info - Sync iCal Calendars
    Do you have the check box set for 'Do not sync events older than ... days'
    I have set mine to 30 days, but that's my preference.
    And also in iTunes - Device - Info - Advance, at the bottom of the window, if you tick the Calendars here, the phone's calendars will be replaced with iCal's on you mac.
    You will loose any changes you have made on the iPhone that haven't sync'ed, but it may get the conflicts resolved and get you up and running again.

Maybe you are looking for

  • Why are there empty imessages in my inbox with just the name but no message?

    There is just a name. For example, John Smith. But when I click it its empty, there are no messages. Does it mean that they tried to text me but it didn't go through?

  • No Wifi in new location on Mac Mini only.

    Hello, I've got a MacMini that I've brought with me to school and at home I have no problem connecting to my home router. But here at school, I don't even detect any of the available routers. Stranger still is that I my laptop has no problem detectin

  • Complaint re music downloading

    I was given £20 credit to download music from this music site I tried to download an album (Johnny Cash) it took payment but I only managed to download 5 songs when site crashed I rang up Nokia 2 weeks ago and the woman said she would look into it as

  • Populating a temp table with multiple records.

    I want to populate a temp table with a a set of recs. This table will be used for crossing/joining with my other tables to pull out data. ie: Main table (loc)contains these fields -> county,permit,utme,utmn Temp table ( tmpid) contains these fields -

  • I got a virus, how do i remove it?

    I just got a virus a week ago. I had the spyware sweeper asking to sweep it up. It said it had detected 3 virus'. how can i remove the virus?