Importing new data in a j2me game

We are currently developing a game (Zelda) in j2me and we have a problem :
We made a very cool map editor in J2RE but we don't find any solutions to import new map in the game.
For the moment we are putting it before the compilation of the project but it's not exactly what we want. Do you know how can we do to import map without recompiling all the game everytime ?
In the futur players must be able to create map with the editor and play with without having programation knowledge

Hi,
Game could use gprs service to download maps from some url. User should be able to insert url path maybe or your service site where they can upload their maps and log from game - then no url inserting not needed.
Margus

Similar Messages

  • SCSM Connector not importing new data from collection

    Hello -
    I just installed SCSM with SP1.  I set up a test collection in SCCM with 20 machines.  I created an SCCM connector and ran the import.
    all machines in the collection with a client showed up and with all data.  I then installed the SCCM client on one of the machines that didn't have it.  That machine has not been updated with any data in SCSM even though resource explorer in SCCM
    shows all the hardware and software inventory.
    Further, I added more machines to the collection and did a manual 'resynch' and those machines did not show up in SCSM - also waited several hours and did a scheduled import and the newly added machines are not showing up in SCSM.
    has anyone experienced this?
    Thanks

    Hello Andreas -
    I see that the import started successfully with event ID 3333, Source Lfx Service
    I then see event 3339, more 3333, and then an event 34012 that says: 'imported 64 changes for data of type Microsoft.SystemCenter.ConfigurationManager.CollectionInfo from cache table Collections.
    Those events are repeated throughout the collecton process which takes approximately 20 minutes I also see event IDs 34011 several times throughout those 20 minutes.  The last event related to the synchronization is a 3339 which indicates 'Finished'.
    I see no errors, it looks like data was imported according to the events, but the data does not show up in the 'all computers' list.
    I'm concerned because the data I want imported is going to change frequently and I want the data for SCSM to match what is in SCCM.
    I have anothe question also - If a computer is removed from SCCM will it be removed from SCSM?
    Thanks,

  • Adding new Data Object while migrating from MI 2.5 to NM7.1

    Dear All,
          We have a custom MI 2.5 application which we need to migrate to 7.1. While migration, we want to add a newly created data object also in migrated application. But when I try to import MBO model, it is not letting me import new data object. The import finishes successfully. But changes in merepmeta.xml are not done. It creates a file with back up of existing merepmeta.xml i.e. merepmeta.xml.bak and create new merepmeta.xml but it is blank. Am I missing something???
           When I import MBO only with existing data objects (syncbos), it is allowing me perfectly. It is changing the merepmeta.xml accordingly as well without creating backup.
    Thanks in advance,
    Saptak Kulkarni.

    Dear Arjun,
         To answer your questions, previously all the SyncBOs were downloaded independently taking username as the import parameter in getList. (Default values). Yes we can provide the same with 7.1 but we wanted to have some sorts of associations between all SyncBOs.
         So first of all, we changed all the BAPI wrappers of old SyncBOs to download all the data independent of user. Now we created new Data Object to only download user specific data. We associated all other Data Objects on this DO. Created a rule for this data object to only download the sync user instance. We were expecting that whenever a user syncs, a single instance of new user data object will get downloaded and subsequently all other data objects having relationship on user will get downloaded. I hope this is not much confusing.
          Now while we import the MBO model, if we don't import new user data object, then also other data object instance get downloaded and fortunately properly filtered. We don't receive any kind of error over here.
          The new data object is not used anywhere in the application. The associations are in new data object and not in the older one. New data object is the leading one wherein others follow.
          Not a single instance is getting dropped for other Data Objects.
          The xml is blank only when we try to import the new Data Object and correctly it gives an error as expected when I try to deploy the application.
    Thanks in advance,
    Saptak.

  • Not enough space on my new SSD drive to import my data from time machine backup, how can I import my latest backup minus some big files?

    I just got a new 256GB SSD drive for my mac, I want to import my data from time machine backup, but its larger than 256GB since it used to be on my old optical drive. How can I import my latest backup keeping out some big files on the external drive?

    Hello Salemr,
    When you restore from a Time Machine back up, you can tell it to not transfer folders like Desktop, Documents. Downloads, Movies, Music, Pictures and Public. Take a look at the article below for the steps to restore from your back up.  
    Move your data to a new Mac
    http://support.apple.com/en-us/ht5872
    Regards,
    -Norm G. 

  • New site about J2ME game programming and optimization

    Hello!
    I just wanted to tell you about a new J2ME development site
    SupremeJ2ME found at
    http://supremej2me.bambalam.se
    It has a lot of useful guides and tips about mobile J2ME game development and optimization, a forum and information about the best J2ME tools.
    Check it out!
    cheers,
    Cranky

    J2ME Polish have licensing costs associated with it:
    http://www.j2mepolish.org/licenses.html
    As for Canvas VS GameCanvas:
    GameCanvas is MIDP 2.0 and up, so depending which devices your app supports you might want to stick with Canvas. GameCanvas eases graphics flushing, but double buffering can be implemented on Canvas like so:
    Image offscreen = isDoubleBuffered () ? null :
               Image.createImage (getWidth (), getHeight ());See http://www.developer.com/java/j2me/article.php/10934_1561591_8
    section: Avoiding Flickering

  • I'm going from an IPAD1 to an IPAD4. If I back up my IPAD to the cloud and then download to the new IPAD, will it retain game data so I won't have to start my games over?

    I'm going from an IPAD1 to an IPAD4. If I back up my IPAD to the cloud and then download to the new IPAD, will it retain game data so I won't have to start my games over?

    Welcome to the Apple Community.
    Babs5819 wrote:
    .....will it retain game data so I won't have to start my games over?
    Yes, however you would be much better backing it up to iTunes to do this rather than iCloud.

  • J2ME game project advice

    Hey guys, i was hoping to get some advice on a project i am about to start. basically I have just started learning J2ME, using Netbeans. i have went through few tutorials from Hello World to Pong and completed them working fully. Now my project is something not too difficult I hope what i wanted to do was create a dungeons and dragons type game.
    Basically I see my game as a start screen, the user presses start and then the player enters a castle and then there are either 1-4 doors available to walk into one on each side of the screen, the bottom door will always be to take the player to the previous screen.
    I have just started the project, but before I even enter any code i was hoping I could get some advice form you guys first. IN each room I hope to have things for teh player to interact with, wether it is a treasure chest, dragon, another human or traps, I have not decided yet.
    I was thinking of having a class one for each screen, but many screens means many classes. I am not even sure how to start with the titlescreen as i am completely new to J2ME.
    any help would greatly appreciated!
    Thanks!

    I was thinking of having a class one for each screen, but many screens means many classes. I am not even sure how to start with the titlescreen as i am completely new to J2ME.No, that is not what you want. Like you should always do in programming, do-not-start-with-the-code. Very bad practice!
    Start with a piece of paper and draw some simple screen designs. Menu, in game screen, control widgets, etc. Get something visual going quickly.
    Next, Use some proper non-programming related terms to describe the game and stick to them. You do not have screens, you have rooms. Each room has doors in its walls which leads to another room. All the rooms together form a maze. Each room has different properties. It can have 1-4 doors, it might hold an item, a trap, an enemy, etc.
    Given from the short description I have given you, you should already be able to distill a simple design. You can already easily identify two main classes: Maze and Room. A Maze consists of rooms. Each room links to 1-4 other rooms through a door. Each room has zero or more elements in it which are different from room to room. You will want to be able to control per room what it contains. I smell a simple grid based data structure; but then you still need a way to actually create the data for the game. There are two basic options: create a level editor, or auto-generate the mazes based on some simple rules. The latter would be the best choice in this case, as you get endless levels. The former has the benefit of having precise control over the design and difficultly of a maze.
    Auto generated levels become more difficult when you want to add an option to save progress though, as you'd need to be able to not only recreate the level (hint: generate based on a seed) but also restore the progress that the player made in that level. Its up to you really.
    When you have your game fleshed out, its time to start taking the technology into account. You'll have a nice set of functional and technical requirements that you need to fulfill; a good resource on J2ME game programming will probably help you to fulfill most of them. Don't expect to just be able to do this, you'll need to study J2ME a lot and probably do a whole set of test and play programs before to figure out how to do even the simplest things. I recommend you get a good book in stead of trying to piece it together using the internet, in moments like this you need something coherent in stead of something as fragmented as the web.

  • Adding New Data To Same Page - HELP

    I am trying to put together a invoice on the fly, the products are added to the invoice by selecting the disired product from a drop down menu and hitting the add button. You SHOULD then be able to select more products from the same drop down menu and htting add again will include it in the invoice.... simple?? Well the problem i have is that when i hit the add button to add another item it just replaces the one i have already added.... this is very annoying... i cannot think of a way to take the product data through the form submission ready for adding too.
    Any Ideas this is really bugging me, and the more time i spend on it, the worse its getting. Code Below
    <%@ page buffer="32kb" %>
    <%@ page import="java.sql.*, javax.servlet.ServletException, java.io.IOException, com.stock_control.*" %>
    <%!
    String convertResultsToSelect ( ResultSet rs, String selectName, String idCol, String descCol ) throws SQLException
    StringBuffer sb = new StringBuffer ( "<select name=" + selectName +">" );
    if (rs != null) {
    while (rs.next()) {
              sb.append ( "<option value=" );
    sb.append ( rs.getString(idCol) );
    sb.append ( ">" );
    sb.append ( rs.getString(descCol) );
    sb.append ( "</option>" );
    sb.append ( "</select>" );
    return sb.toString ();
    %>
    <html>
    <head>
    <title>Members Area - Stock Check</title>
    </head>
    <body bgcolor="#CCCCCC" topmargin="0">
    <%@ include file="topConn.jsp" %>
    <%
              String msg = "";
              String name = "";
              String address1 = "";
              String address2 = "";
              String town ="";
              String postcode = "";
              String country = "";
              String phone = "";
              String mail = "";
              String comments = "";
              float total = 0;
              int nextFree = 0;
              String prodResults;
              int numberOfItems = 0;
         String shop = (String)session.getValue("SHOP");
         String selectProd = "SELECT ProductID, ProductName FROM product WHERE ShopID=";
         rs1 = stmt.executeQuery(selectProd+shop);
         prodResults = convertResultsToSelect( rs1, "product","ProductID","ProductName");
         rs = stmt.executeQuery("SELECT COUNT(*) AS stockLevel FROM product WHERE ShopID ="+shop);     
    while(rs.next())
         numberOfItems = rs.getInt("stockLevel");
         Product[] products = new Product[numberOfItems];
    if (request.getParameter("add")!=null)
              // get values from all text boxes....
              name = request.getParameter("name");
              address1 = request.getParameter("address1");
              address2 = request.getParameter("address2");
              town = request.getParameter("town");
              postcode = request.getParameter("postcode");
              country = request.getParameter("country");
              phone = request.getParameter("phone");
              mail = request.getParameter("mail");
              comments = request.getParameter("comments");
                   // add data from dropdown
              String newProduct = request.getParameter("product");
              //connect to database and put product data into array + increment
                   int thenewid = 0;
                   String theName = "";
                   float thePrice = 0;
                   String nono = "0";
              String getProd = "SELECT * FROM product WHERE ProductID=";
              rs = stmt.executeQuery(getProd+newProduct);
              if(rs.next())
                   thenewid = Integer.parseInt(newProduct);
                   theName = rs.getString("ProductName");
                   thePrice = rs.getFloat("SalePrice");
                   Product addProduct = new Product(thenewid, theName, thePrice, nono);
                   products[nextFree] = addProduct; //PROBLEM
                   nextFree++;
    // reload page with new data in form
    //for loop arround array     
    %>
    <form method="GET">
    <div align=center>
    <p>
    <%=prodResults%>
    <input type="submit" value="Add" name="add"></p>
    <TABLE width=100% height="1">
    <TBODY>
    <tr>
    <td width="4%" height="19"> </td>
    <td width="96%" height="19"> 
    </td>
    </tr>
    <tr>
    <td width="4%" height="198"> </td>
    <td width="96%" height="198">
    <div align="center"></div>
    <table border="0" cellpadding="2" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber5">
    <tr>
    <td width="4%"> </td>
    <td width="15%"><font face="Verdana" size="2">Customer Name</font></td>
    <td width="30%"><input type="text" name="name" size="30" value="<%=name%>"></td>
    <td width="19%"><font face="Verdana" size="2">Customer Phone #</font></td>
    <td width="26%"><input name="phone" type="text" size="30" value="<%=phone%>"></td>
    <td width="6%"> </td>
    </tr>
    <tr>
    <td> </td>
    <td><font face="Verdana" size="2">Address Line 1</font></td>
    <td><input type="text" name="address1" size="40" value="<%=address1%>"></td>
    <td><font face="Verdana" size="2">Customer E-mail</font></td>
    <td><input name="mail" type="text" size="30" value="<%=mail%>"></td>
    <td> </td>
    </tr>
    <tr>
    <td height="32"> </td>
    <td><font face="Verdana" size="2">Address Line 2</font></td>
    <td> </td>
    <td><font face="Verdana" size="2">Comments</font></td>
    <td width="26%" rowspan="5"><p>
    <textarea name="comments" cols="29" rows="5"><%=comments%></textarea>
    </p>
    <p>  </p></td>
    <td> </td>
    </tr>
    <tr>
    <td> </td>
    <td><font size="2" face="Verdana">Town/City</font></td>
    <td><input name="town" type="text" size="40" value="<%=town%>">
    <input name="address2" type="text" size="40" value="<%=address2%>"></td>
    <td> </td>
    <td> </td>
    </tr>
    <tr>
    <td> </td>
    <td><font size="2" face="Verdana">Post Code</font></td>
    <td><input type="text" name="postcode" size="10" value="<%=postcode%>"></td>
    <td> </td>
    <td> </td>
    </tr>
    <tr>
    <td> </td>
    <td><font size="2" face="Verdana">Country</font></td>
    <td><input type="text" name="country" size="40" value="<%=country%>"></td>
    <td> </td>
    <td> </td>
    </tr>
    <tr>
    <td height="24"> </td>
    <td> </td>
    <td> </td>
    <td> </td>
    <td> </td>
    </tr>
    <tr>
    <td height="23"> </td>
    <td><strong><font size="2" face="Verdana">Product Code</font></strong></td>
    <td><strong><font size="2" face="Verdana">Name</font></strong></td>
    <td><strong><font size="2" face="Verdana">Price</font></strong></td>
    <td> </td>
    <td> </td>
    </tr>
    <%
    if (request.getParameter("add")!=null)
    for(int i=0; i<nextFree; i++)
    Product temp = products;
    int prodID = temp.getid();
    String prodName = temp.getname();
    float prodPrice = temp.getprice();
    total = total + prodPrice;
    // work out total on the fly
    %>
    <tr>
    <td height="23"> </td>
    <td> <font size="2" face="Verdana, Arial, Helvetica, sans-serif"><%=prodID%> </font></td>
    <td><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><%=prodName%></font></td>
    <td><font size="2" face="Verdana, Arial, Helvetica, sans-serif">&pound;<%=prodPrice%></font></td>
    <td><font size="2" face="Verdana, Arial, Helvetica, sans-serif"> </font></td>
    <td> </td>
    </tr>
    <%
    %>
    <tr>
    <td width="4%" height="23"> </td>
    <td width="15%"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"> </font></td>
    <td width="30%"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"> </font></td>
    <td width="19%"><strong><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Total:</font></strong></td>
    <td width="26%"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><%=total%></font></td>
    <td width="6%"> </td>
    </tr>
    </table>
    <p align="center">
    <input type="submit" value="Continue" name="continue">
              </form>
    </p>
    </td> </tr> </TBODY></table>
    <%@ include file="bottomConn.jsp" %>
    </body>
    </html>

    anyone?

  • SQL modeler can not import from data dictionary

    It was very frustruted to see that the SQL Modeler hang in import from data dictionary of a database as part of revise engineering. I have to question myself if sql modeler is a serious tool and should I give up.

    I am not sure if Data Modeller is still in Beta./Production. First couple off initial versions of a new product are normally buggy.
    Regards
    Alternatively, If this product is still in Beta, then you can contact the development team or report the issue so that they can take care of this issue in next beta release.
    Edited by: skvaish1 on Mar 30, 2010 3:18 PM
    Edited by: skvaish1 on Mar 30, 2010 3:26 PM

  • TableSorter errors when adding new data

    so here is the deal:
    I am using the TableSorter.java helper class with DefaultTableModel
    from: http://java.sun.com/docs/books/tutorial/uiswing/components/table.html
    It works great when the data is static and I get it for the first time. however, occationally, when adding new data I get a NullPointerException error.
    in use:
    DefaultTableModel.addRow()
    DefaultTableModel.removeRow() and
    DefaultTableModel.insertRow() methods.
    Error:
    java.lang.ArrayIndexOutOfBoundsException: 5
         at com.shared.model.TableSorter.modelIndex(TableSorter.java:294)
         at com.shared.model.TableSorter.getValueAt(TableSorter.java:340)
         at javax.swing.JTable.getValueAt(Unknown Source)
         at javax.swing.JTable.prepareRenderer(Unknown Source)...
    code problem I:
        public Object getValueAt(int row, int column)
            return tableModel.getValueAt(modelIndex(row), column);
        }code problem II:
        public int modelIndex(int viewIndex)
                 return getViewToModel()[viewIndex].modelIndex;     
        }TableSroter class:
    package com.shared.model;
    import java.awt.*;
    import java.awt.event.*;
    import java.util.*;
    import java.util.List;
    import javax.swing.*;
    import javax.swing.event.TableModelEvent;
    import javax.swing.event.TableModelListener;
    import javax.swing.table.*;
    * TableSorter is a decorator for TableModels; adding sorting
    * functionality to a supplied TableModel. TableSorter does
    * not store or copy the data in its TableModel; instead it maintains
    * a map from the row indexes of the view to the row indexes of the
    * model. As requests are made of the sorter (like getValueAt(row, col))
    * they are passed to the underlying model after the row numbers
    * have been translated via the internal mapping array. This way,
    * the TableSorter appears to hold another copy of the table
    * with the rows in a different order.
    * <p/>
    * TableSorter registers itself as a listener to the underlying model,
    * just as the JTable itself would. Events recieved from the model
    * are examined, sometimes manipulated (typically widened), and then
    * passed on to the TableSorter's listeners (typically the JTable).
    * If a change to the model has invalidated the order of TableSorter's
    * rows, a note of this is made and the sorter will resort the
    * rows the next time a value is requested.
    * <p/>
    * When the tableHeader property is set, either by using the
    * setTableHeader() method or the two argument constructor, the
    * table header may be used as a complete UI for TableSorter.
    * The default renderer of the tableHeader is decorated with a renderer
    * that indicates the sorting status of each column. In addition,
    * a mouse listener is installed with the following behavior:
    * <ul>
    * <li>
    * Mouse-click: Clears the sorting status of all other columns
    * and advances the sorting status of that column through three
    * values: {NOT_SORTED, ASCENDING, DESCENDING} (then back to
    * NOT_SORTED again).
    * <li>
    * SHIFT-mouse-click: Clears the sorting status of all other columns
    * and cycles the sorting status of the column through the same
    * three values, in the opposite order: {NOT_SORTED, DESCENDING, ASCENDING}.
    * <li>
    * CONTROL-mouse-click and CONTROL-SHIFT-mouse-click: as above except
    * that the changes to the column do not cancel the statuses of columns
    * that are already sorting - giving a way to initiate a compound
    * sort.
    * </ul>
    * <p/>
    * This is a long overdue rewrite of a class of the same name that
    * first appeared in the swing table demos in 1997.
    * @author Philip Milne
    * @author Brendon McLean
    * @author Dan van Enckevort
    * @author Parwinder Sekhon
    * @version 2.0 02/27/04
    public class TableSorter extends AbstractTableModel
        protected TableModel tableModel;
        public static final int DESCENDING = -1;
        public static final int NOT_SORTED = 0;
        public static final int ASCENDING = 1;
        private static Directive EMPTY_DIRECTIVE = new Directive(-1, NOT_SORTED);
        public static final Comparator COMPARABLE_COMAPRATOR = new Comparator()
            public int compare(Object o1, Object o2)
                return ((Comparable) o1).compareTo(o2);
        public static final Comparator LEXICAL_COMPARATOR = new Comparator()
            public int compare(Object o1, Object o2)
                return o1.toString().compareTo(o2.toString());
        private Row[] viewToModel;
        private int[] modelToView;
        private JTableHeader tableHeader;
        private MouseListener mouseListener;
        private TableModelListener tableModelListener;
        private Map columnComparators = new HashMap();
        private List sortingColumns = new ArrayList();
        public TableSorter()
            this.mouseListener = new MouseHandler();
            this.tableModelListener = new TableModelHandler();
        public TableSorter(TableModel tableModel)
            this();
            setTableModel(tableModel);
        public TableSorter(TableModel tableModel, JTableHeader tableHeader)
            this();
            setTableHeader(tableHeader);
            setTableModel(tableModel);
        private void clearSortingState()
            viewToModel = null;
            modelToView = null;
        public TableModel getTableModel()
            return tableModel;
        public void setTableModel(TableModel tableModel)
            if (this.tableModel != null)
                this.tableModel.removeTableModelListener(tableModelListener);
            this.tableModel = tableModel;
            if (this.tableModel != null)
                this.tableModel.addTableModelListener(tableModelListener);
            clearSortingState();
            fireTableStructureChanged();
        public JTableHeader getTableHeader()
            return tableHeader;
        public void setTableHeader(JTableHeader tableHeader)
            if (this.tableHeader != null)
                this.tableHeader.removeMouseListener(mouseListener);
                TableCellRenderer defaultRenderer = this.tableHeader.getDefaultRenderer();
                if (defaultRenderer instanceof SortableHeaderRenderer)
                    this.tableHeader.setDefaultRenderer(((SortableHeaderRenderer) defaultRenderer).tableCellRenderer);
            this.tableHeader = tableHeader;
            if (this.tableHeader != null)
                this.tableHeader.addMouseListener(mouseListener);
                this.tableHeader.setDefaultRenderer
                        new SortableHeaderRenderer(this.tableHeader.getDefaultRenderer())
        public boolean isSorting()
            return sortingColumns.size() != 0;
        private Directive getDirective(int column)
            for (int i = 0; i < sortingColumns.size(); i++)
                Directive directive = (Directive)sortingColumns.get(i);
                if (directive.column == column)
                    return directive;
            return EMPTY_DIRECTIVE;
        public int getSortingStatus(int column)
            return getDirective(column).direction;
        private void sortingStatusChanged()
            clearSortingState();
            fireTableDataChanged();
            if (tableHeader != null)
                tableHeader.repaint();
        public void setSortingStatus(int column, int status)
            Directive directive = getDirective(column);
            if (directive != EMPTY_DIRECTIVE)
                sortingColumns.remove(directive);
            if (status != NOT_SORTED)
                sortingColumns.add(new Directive(column, status));
            sortingStatusChanged();
        protected Icon getHeaderRendererIcon(int column, int size)
            Directive directive = getDirective(column);
            if (directive == EMPTY_DIRECTIVE)
                return null;
            return new Arrow(directive.direction == DESCENDING, size, sortingColumns.indexOf(directive));
        private void cancelSorting()
            sortingColumns.clear();
            sortingStatusChanged();
        public void setColumnComparator(Class type, Comparator comparator)
            if (comparator == null)
                columnComparators.remove(type);
            else
                columnComparators.put(type, comparator);
        protected Comparator getComparator(int column)
            Class columnType = tableModel.getColumnClass(column);
            Comparator comparator = (Comparator) columnComparators.get(columnType);
            if (comparator != null)
                return comparator;
            if (Comparable.class.isAssignableFrom(columnType))
                return COMPARABLE_COMAPRATOR;
            return LEXICAL_COMPARATOR;
        private Row[] getViewToModel()
            if (viewToModel == null)
                int tableModelRowCount = tableModel.getRowCount();
                viewToModel = new Row[tableModelRowCount];
                for (int row = 0; row < tableModelRowCount; row++)
                    viewToModel[row] = new Row(row);
                if (isSorting())
                    Arrays.sort(viewToModel);
            return viewToModel;
        public int modelIndex(int viewIndex)
                 return getViewToModel()[viewIndex].modelIndex;     
        private int[] getModelToView()
            if (modelToView == null)
                int n = getViewToModel().length;
                modelToView = new int[n];
                for (int i = 0; i < n; i++)
                    modelToView[modelIndex(i)] = i;
            return modelToView;
        // TableModel interface methods
        public int getRowCount()
            return (tableModel == null) ? 0 : tableModel.getRowCount();
        public int getColumnCount()
            return (tableModel == null) ? 0 : tableModel.getColumnCount();
        public String getColumnName(int column)
            return tableModel.getColumnName(column);
        public Class getColumnClass(int column)
            return tableModel.getColumnClass(column);
        public boolean isCellEditable(int row, int column)
            return tableModel.isCellEditable(modelIndex(row), column);
        public Object getValueAt(int row, int column)
            return tableModel.getValueAt(modelIndex(row), column);
        public void setValueAt(Object aValue, int row, int column)
            tableModel.setValueAt(aValue, modelIndex(row), column);
        // Helper classes
        private class Row implements Comparable
            private int modelIndex;
            public Row(int index)
                this.modelIndex = index;
            public int compareTo(Object o)
                int row1 = modelIndex;
                int row2 = ((Row) o).modelIndex;
                for (Iterator it = sortingColumns.iterator(); it.hasNext();)
                    Directive directive = (Directive) it.next();
                    int column = directive.column;
                    Object o1 = tableModel.getValueAt(row1, column);
                    Object o2 = tableModel.getValueAt(row2, column);
                    int comparison = 0;
                    // Define null less than everything, except null.
                    if (o1 == null && o2 == null)
                        comparison = 0;
                    } else if (o1 == null)
                        comparison = -1;
                    } else if (o2 == null)
                        comparison = 1;
                    } else {
                        comparison = getComparator(column).compare(o1, o2);
                    if (comparison != 0)
                        return directive.direction == DESCENDING ? -comparison : comparison;
                return 0;
        private class TableModelHandler implements TableModelListener
            public void tableChanged(TableModelEvent e)
                // If we're not sorting by anything, just pass the event along.            
                if (!isSorting())
                    clearSortingState();
                    fireTableChanged(e);
                    return;
                // If the table structure has changed, cancel the sorting; the            
                // sorting columns may have been either moved or deleted from            
                // the model.
                if (e.getFirstRow() == TableModelEvent.HEADER_ROW)
                    cancelSorting();
                    fireTableChanged(e);
                    return;
                // We can map a cell event through to the view without widening            
                // when the following conditions apply:
                // a) all the changes are on one row (e.getFirstRow() == e.getLastRow()) and,
                // b) all the changes are in one column (column != TableModelEvent.ALL_COLUMNS) and,
                // c) we are not sorting on that column (getSortingStatus(column) == NOT_SORTED) and,
                // d) a reverse lookup will not trigger a sort (modelToView != null)
                // Note: INSERT and DELETE events fail this test as they have column == ALL_COLUMNS.
                // The last check, for (modelToView != null) is to see if modelToView
                // is already allocated. If we don't do this check; sorting can become
                // a performance bottleneck for applications where cells 
                // change rapidly in different parts of the table. If cells
                // change alternately in the sorting column and then outside of            
                // it this class can end up re-sorting on alternate cell updates -
                // which can be a performance problem for large tables. The last
                // clause avoids this problem.
                int column = e.getColumn();
                if (e.getFirstRow() == e.getLastRow()
                        && column != TableModelEvent.ALL_COLUMNS
                        && getSortingStatus(column) == NOT_SORTED
                        && modelToView != null)
                    int viewIndex = getModelToView()[e.getFirstRow()];
                    fireTableChanged(new TableModelEvent(TableSorter.this,
                                                         viewIndex, viewIndex,
                                                         column, e.getType()));
                    return;
                // Something has happened to the data that may have invalidated the row order.
                clearSortingState();
                fireTableDataChanged();
                return;
        private class MouseHandler extends MouseAdapter
            public void mouseClicked(MouseEvent e)
                JTableHeader h = (JTableHeader) e.getSource();
                TableColumnModel columnModel = h.getColumnModel();
                int viewColumn = columnModel.getColumnIndexAtX(e.getX());
                int column = columnModel.getColumn(viewColumn).getModelIndex();
                if (column != -1)
                    int status = getSortingStatus(column);
                    if (!e.isControlDown())
                        cancelSorting();
                    // Cycle the sorting states through {NOT_SORTED, ASCENDING, DESCENDING} or
                    // {NOT_SORTED, DESCENDING, ASCENDING} depending on whether shift is pressed.
                    status = status + (e.isShiftDown() ? -1 : 1);
                    status = (status + 4) % 3 - 1; // signed mod, returning {-1, 0, 1}
                    setSortingStatus(column, status);
        private static class Arrow implements Icon
            private boolean descending;
            private int size;
            private int priority;
            public Arrow(boolean descending, int size, int priority)
                this.descending = descending;
                this.size = size;
                this.priority = priority;
            public void paintIcon(Component c, Graphics g, int x, int y)
                Color color = c == null ? Color.GRAY : c.getBackground();            
                // In a compound sort, make each succesive triangle 20%
                // smaller than the previous one.
                int dx = (int)(size/2*Math.pow(0.8, priority));
                int dy = descending ? dx : -dx;
                // Align icon (roughly) with font baseline.
                y = y + 5*size/6 + (descending ? -dy : 0);
                int shift = descending ? 1 : -1;
                g.translate(x, y);
                // Right diagonal.
                g.setColor(color.darker());
                g.drawLine(dx / 2, dy, 0, 0);
                g.drawLine(dx / 2, dy + shift, 0, shift);
                // Left diagonal.
                g.setColor(color.brighter());
                g.drawLine(dx / 2, dy, dx, 0);
                g.drawLine(dx / 2, dy + shift, dx, shift);
                // Horizontal line.
                if (descending) {
                    g.setColor(color.darker().darker());
                } else {
                    g.setColor(color.brighter().brighter());
                g.drawLine(dx, 0, 0, 0);
                g.setColor(color);
                g.translate(-x, -y);
            public int getIconWidth()
                return size;
            public int getIconHeight()
                return size;
        private class SortableHeaderRenderer implements TableCellRenderer
            private TableCellRenderer tableCellRenderer;
            public SortableHeaderRenderer(TableCellRenderer tableCellRenderer)
                this.tableCellRenderer = tableCellRenderer;
            public Component getTableCellRendererComponent(JTable table,
                                                           Object value,
                                                           boolean isSelected,
                                                           boolean hasFocus,
                                                           int row,
                                                           int column)
                Component c = tableCellRenderer.getTableCellRendererComponent(table,
                        value, isSelected, hasFocus, row, column);
                if (c instanceof JLabel) {
                    JLabel l = (JLabel) c;
                    l.setHorizontalTextPosition(JLabel.LEFT);
                    int modelColumn = table.convertColumnIndexToModel(column);
                    l.setIcon(getHeaderRendererIcon(modelColumn, l.getFont().getSize()));
                return c;
        private static class Directive
            private int column;
            private int direction;
            public Directive(int column, int direction)
                this.column = column;
                this.direction = direction;
    }any input will be appreciated.
    thanks
    Peter

    The code you posted doesn't help us at all. Its just a duplicate of the code from the tutorial. The custom code is what you have written. For example do you update the TableModel from the Event Thread? Do you update the SortModel or the DefaultTableModel? If you actually provide your test code and somebody has already downloaded the sort classes, then maybe they will test your code against the classes. But I doubt if people will download the sort classes and create a test program just to see if they can duplicate your results (at least I know I'm not about to).

  • I wonder how pro photographers use aperture?I shoot raw and my harddrive is alreay full.I'm not able to import new pictures.Is it ok if i create a vault and delete all my projects in the HD.Can I use an external HD use aperture through the vault??

    I wonder how pro photographers use aperture?I shoot raw and my harddrive is alreay full.I'm not able to import new pictures. I don't know what to do. I created a vault. My plan was to create a vault(put all my master files into an external harddrive) and then delete all my projects in my mac pro's harddrive. Is it the correct way to do it ? What should I do if I have thousands of raw files ? How should my workflow be? Can I use an external HD and use aperture through the vault,without keeping the master files on my computer's hard drive?? Or should I shoot raw+jpeg and store raw files in an external backup harddrive and import only jpegs into my aperture library?

    There's a bit to learn.  It will slowly make sense.
    Aperture is an empty field.  You're given a tractor and a whole bunch of attachments. What you grow, how, and where, is entirely up to you.
    Vaults are for back-up and only for back-up.  They have nothing to do with storing your working files.
    When your Library outgrows your system drive (and for good performance, you should leave c. 20% of every drive empty), it's time to convert some of your image's Masters from Managed to Referenced.  ("Managed" and "Referenced" refer to Masters, not to Libraries.)
    There are hundreds of posts in the forum, and several pages in the User Manual on using Masters.
    Many people run Aperture with the Library on their system disk, and most (or all) of their images' Masters on external FW drives.  This is a good set-up.  Note that you will likely have to take steps to back-up the data on your external drives.
    If you do the above, there should be no reason to delete any Projects.
    The choice of RAW or RAW+JPEG or JPEG depends on the kind of work you are doing.  I capture RAW only -- but I don't do any commercial shoots.  Pros on deadlines report that the RAW+JPEG works well for them.  Capture JPEG if it saves you time.  IMHO, there is not a good reason to shoot JPEG to save space (space is cheap; time expensive).
    Short-term solution: buy and use a FW800 external 1 TB drive, formatted "Mac OS Extended (Journaled)", and using Aperture relocate the Masters of all images older than 30 days to that drive.  (Be sure to change your back-up strategy to include this new drive; you may need a second new drive.)
    This general post of mine might help you understand more about Aperture.

  • Can't import ical dates into iphoto calendar

    Hi all,
    I'm trying to make an iphoto calendar for a friend and I'm running into a frustrating problelm. My friend emailed me an ical birthday calendar which he would like to have included in the iphoto calendar. I imported the ical calendar into my own ical as a new calendar. I have created my calendar in iphoto but I cannot import these dates into it. When I go to settings and click the calendar tab I am given the option of which ical calendars I would like to import to my calendar. I see two, one is my own normal calendar and the other is the birthday calendar sent to me by my friend. I check the birthday calendar and then click ok and ical appears to be importing the dates but when I look at my calendar the dates have not imported. If I try importing my normal calendar I have no problem. What's going on here??? Please help I am getting really frustrated.

    There are many video formats. iPhoto can't read all of them; in fact, it can't read most of them. Here's something that can:
    VideoLAN - Download official VLC media player for Mac OS X
    On the other hand, the videos are just files. You can copy them anywhere you want in the Finder.

  • Importing iCal dates into Address book

    I have a calendar in iCal that stored severyone's brithday and I would like now to import these dates into my address book.  Is there any way?
    Thanks

    Hi,
    You may be able do this with an Applescript. However there is not enough information supplied to know.
    How are ther events formatted in iCal? Do they contain the full name of the person? Do they say how old they are? Are the people already in Address Book, or would they all be new cards?
    Best wishes
    John M

  • In IPhoto I changed movie dates after thumb nails were created in IMovie but the new dates are not showing up in IMovie.  Is there someway to refresh the IPhoto event in IMovie?

    Background:  I'm transferring file folders from a Visa laptop via an external hard drive to my IMac.  In the folders are photos and videos from different cameras.  SO I first tried to import to IMovie but it would not recognize any of the files.  So then I imported into IPhoto and both photos and videos were imported and I created events for each folder.  When I first opened IMovie I had to wait for it to create "thumb nails".  Then I could view the events in IMovie BUT the video clips are not together because they have vastly different dates and are mixed with videos from other events.  I looked at the dates and said I can fix that in IPhoto which i did but those new dates are not showing up in IMovie.    I think I need to somehow refresh the event data that Imovie is using but have not found how to do that in either IPhoto or IMovie. 
    I'm doing this on three events with about 100 photos and videos.  But I have many 1000s more to do so need to know how to either fix this or delete these events, reimport, change the dates, then open again in IMovie.   I'm sure that would work but I can't understand why changing the dates in IPhoto is not being reflected in IMovie.  
    Appreciate any tips or pointers.
    OBTW this is my first question as a first time Apple owner. 

    It was suggested I move this question to IPhoto or IMovie which I did. 
    Well moving to a different discussion group did not provide an answer to this question either. But what I finally did was import one batch of photos and videos into IPhoto for a given day at a time. Working with these I could change the date and times in order to get them in the original sequench taken. Then I would create an album with that batch. These would all be on the same day (IMove was closed for this phase). Then I would open IMovie, generate the thumbnails for that album, and select the album I had created. This was necessary because the importing process in IPhoto was using incorrect dates for my video so it was a real struggle finding them in IMove until I developed this approach.
    I believe that this whole process was so screwy because I was importing from an external hard drive not a camera. I had these photos on a PC and did not have the original cameras to use to import directly which I am fairly sure would have made this easier!

  • Import excel data from OWB10.2

    I wanted to import excel data into OWB 10gr2. So i have followed the steps in the attached link. But i cannot perform the operations from step 6 in OWB 10rR2.
    In OWB10.2 how could i create a new database link. Inorder to create a new module below ODBC i have to give the location. I cannot create the location.
    Step 6: Create an ODBC Source Module and a Database Link
    Use the following steps to create an ODBC source module and database link:
    1. From the Warehouse Builder console, create an ODBC source module. On the
    navigation tree, ODBC modules are listed under the Others node of the Databases
    node.
    2. On the Connection Information page, click New Database Link to create a new
    database link that reads data using the data source created. Figure 3–3 shows the
    entries used on the New Database Link dialog.
    Note: Ensure that the initialization parameter GLOBAL_NAMES is set
    to FALSE in the database's initialization parameter file. FALSE is the
    default setting for this parameter.
    Step 6: Create an ODBC Source Module and a Database Link
    3-4 Oracle Warehouse Builder Case Book
    Figure 3–3 New Database Link Dialog
    Notice that the Oracle Service Name field uses the Oracle system identifier
    specified for the agent.
    3. Ensure that the Use for Heterogeneous Services option is selected.
    Because you are not accessing an Oracle database, you can enter any value for
    username and password.
    4. Create and test this database link. Close the New Database Link dialog.
    5. Leave the Schema name <unspecified>. Click the Change Schema button and
    select <unspecified>. The Connection Information page now looks as shown in
    Figure 3–4.
    Step 8: Create a Mapping to Load Data Into the Target Table
    How Do I Load Data Stored in a Microsoft Excel File? 3-5
    Figure 3–4 Connection Information Page
    6. Create a new deployment location for the module or specify an existing location.
    http://www.oracle.com/technology/products/warehouse/pdf/Cases/case3.pdf
    But i cannot create in OWB10.2.
    Can any body suggest me the process.

    Gillies,
    I am not able to create a new location for ODBC in connection explorer.
    Which option should i consider. Should i consider database link or host:port:service or sql*net connection. suppose If i take database link option what is the description i have to enter in database link box. Should i create a database link manually from sql*plus.

Maybe you are looking for

  • Why can't I import photos saved onto my iphone hard drive onto my computer to delete them off my phone?

    Every time I try to import photos onto iphoto I am only allowed to import photos I have taken on my iphone 5s, but not from my previous phone. I cannot upgrade my phone because I have so many photos on it. I want to delete the photos that were transf

  • Smartform output in word format

    dear all i have created a smartform which needs to send to external mail ID.s as an .doc attachment. how to do this.  even i have no basic idea also.  kindly help out. regards

  • Problems using Myfaces1.1 - can't find tld files

    I have used Nitrox 2.1 with Myfaces 1.0 - everything was fine, but now we're changing to Myfaces1.1. All I do is changing the old myfaces.jar with the newer myfaces-all.jar (ver 1.1.1). The problem is that Nitrox IDE doesn't seem to recognize the tld

  • I really hate HND program!!!

    I just bought the linksys router N Ultrarange.. well everything works out fine so I liked it.. but!! home network defender blocked every single thing! I can't even go ebay for selling my item!! so how to fix it? if i cant i'll just change to other ro

  • MTA causing Failed Logins

    I tried posting this on novell.support.netware.6x.administration-tools and someone referred me here. I have a NW 6.5 sp5 server that is showing a very high number of 'Failed Logins Per Hour' in the Health Monitor. All the login attempts are as follow