Profile cover photo
Profile photo
Matthew Heap
25 followers -
With a new found love for all things design...
With a new found love for all things design...

25 followers
About
Matthew's posts

Post has attachment

Post has attachment

Post has attachment

Post has attachment
After some help please.

Code also at pastebin for better readability: http://pastebin.com/mtBYp3NB


How can I get a reference to my main GUI form from the class that has been called by that form. From the snippets below, is this a correct way to have a GUI form updated by other classes etc… will I run into problems if I continue with this route?

For example:


Main:

public class Main {
public static void main(String[] args) {
// some standard setup, look and feel etc

OrderTracker orderTracker = OrderTracker.getInstance();

// some initial setup
// other routines

// create new instance of main GUI form, pass orderTracker instance
OrderTrackerMainForm orderTrackerMainForm = new OrderTrackerMainForm(orderTracker);

}
}

OrderTracker:

Singleton class, contains main routines for order tracker - eg obtains prefs, resources (labels etc),perform tasks on orders - eg progress status, update customer details etc…

public class OrderTracker {
public static volatile OrderTracker orderTrackerInstance = new OrderTracker();

// routine to set order in context - eg show details in order details form
// allow it to be worked on etc
public void setOrderInContext(int orderNumber) {
// orderNumber is received from SeachForm as expected
this.orderInContext = orderNumber)

// here is where I’d want to call a method to show the order details in the form
// how can I get a reference to OrderTrackerMainForm or it’s instance so I can 
// create the orderDetails panel?
}
}

OrderTrackerMainForm:

public class OrderTrackerMainForm extends JFrame {
public OrderTrackerMainForm(final OrderTracker orderTracker) {
// standard routines to create menu, tool bars, action listeners, panels etc

class SearchAction implements ActionListener {
public void actionPerformed(ActionEvent e) {
if (null == searchForm) {
                    searchForm = new SearchForm(orderTracker);
                } else {
                    searchForm.setVisible(true);
                    searchForm.toFront();
                    searchForm.requestFocus();
                }

            }
        }

searchToolBarButton.addActionListener(new SearchAction());
}
}

SearchForm:

public class SearchForm extends JFrame {
public SearchForm(OrderTracker orderTracker) {
// shows search form, receives instance of orderTracker

// swing worker routines to query DB and return search results

// selecting a search result from the table should return user back to main form
// and show details

// action listener for double click action
private void passBackToOrderTracker(int orderReference) {
        orderTracker.setItemInContext(orderReference);
        dispose();
    }
}

Post has attachment

Post has attachment
Video
Video
15/02/2015
2 Photos - View album

Post has attachment

Post has attachment

Hi all, need help with Assetic and including images in CSS.

I'm using Dropzone.js which is located at:
.../app/src/MyCompany/MyBundle/Resources/public/js/dropzone

Which contains:
      dropzone.js
      css/dropzone.css
      images/spritemap.png

The css references the spritemap by:
background-image: url("../images/spritemap.png");

Using assetic, I can dump all the js/css files but not the images.  I've tried cssrewrite but this isn't generating the correct file locations.

What am I missing, how can I get assetic to dump the image assets correctly?

Post has attachment
WHP <3
Wait while more posts are being loaded