Archive

Archive for the ‘Tutorials’ Category

Configuring the IntelliJ IDEA JVM on OS X

June 16th, 2009 Tom Cornilliac 2 comments

Out of the box the JVM arguments for IntelliJ IDEA need a bit of tweaking if you plan on doing any serious development. Lately, in addition to Flex 4,  I’ve been cutting my teeth on Groovy and Grails and I’ve found IDEA’s 256mb default heap size to be barely adequate for the task. Bringing the heap maximum up to 512mb (-Xmx512m) makes a huge difference in how the IDE and framework perform.

When I went Googling for information on how to set the IDEA JVM on OS X I assumed I would find a wealth of information for said task. Turns out I was both right and wrong. There is a wealth of information but it’s all for Windows and since the IDEA config under Windows is different than OS X I was left wanting. In the end I was able to Google one lonely site with the correct information for OS X but the site was offline and I ended up having to use Google cache to get the information. Hopefully this post will help the next poor soul who goes looking for how to set the IDEA JVM heap maximum under OS X.

  1. Locate the App. If you have a standard installation it will be under /Applications
    Using Finder select the App file
    .
    .
  2. Open the App package
    idea_jvm_edit2
    .
    .

  3. Using your text editor of choice open the info.plist file under “contents”
    Idea_jvm_edit3
    .
    .

  4. Edit the “VMOptions” key. I have my heap maximum set at 512mb and my minimum at 64mb
    idea_jvm_edit4

That’s it. Restart IDEA if it’s running and you should see your heap changes in right corner of the application status bar.

By the way, if you’re doing any Groovy or Grails development, IntelliJ IDEA is a fantastic IDE with undoubtedly the best Grails support around.

Categories: IDE, Java, Tutorials Tags: , , ,

Applying Flash Filters to Flex Components

January 24th, 2007 admin 1 comment

Lately I have been spending a lot of time considering Flex application design. I work in a really small shop (two of us) and we don’t have the luxury of a Designer on staff. As a result when it comes time to make our Flex applications look muy bonito it’s yours truly who has to put on the designer hat. Since  I’m “design challenged” my options to date have been limited to CSS. Skinning is beyond my abilities as I don’t get Flash (timeline….huh?). So the Flex Style Explorer has been my designer buddy for awhile.

Yesterday while researching the depths of Flex CSS I discovered you can apply Flash Filters to Flex Components. That’s what I want to explore in this post. Flash filters can not only make your application look better but they can also improve the user experience. You could us the Glow filter to provide user feedback based on mouse movements or you might use Blur filter to direct the user’s attention to an object on screen (similar to a modal Title Window but with more options). The flash.filters package contains 13 filters you can use and combine to create some amazing styles without having to resort to skinning.

There are two methods for implementing Flash Filters in your Flex application.

  1. You can create a new namespace linked to the flash.filters.* package, just like you would a Flex Component.
  2. You can apply filters through ActionScript

Both of these approaches have their own benefits and it’s really up to the developer/designer as to which method to use. Let’s look at the basic syntax of each method.

Using Flash Filters in MXML
<mx:Application>
    xmlns:mx="http://www.adobe.com/2006/mxml"
    xmlns="*"
    xmlns:flashFilter="flash.filters.*"&gt;

<mx:TextArea>
    width="150" height="100"
    cornerRadius="6" text="Some text"&gt;
         <mx:filters>
             <flashFilter:DropShadowFilter>
                 inner="true" distance="3"
                 angle="120" color="0x000000"
                 alpha="0.4" /&gt;
            </flashFilter:DropShadowFilter>
        </mx:filters>
</mx:TextArea>

</mx:Application>
Using Flash Filters in ActionScript
import flash.filters.*;

private function addGlow(event:MouseEvent):void
{
    var g:GlowFilter = new GlowFilter(0x006666, 0.65, 15, 15);
    var newFilters:Array = new Array();
    newFilters.push(g);
    event.currentTarget.filters = newFilters;
}

As you can see Flash Filters are easy to implement and you don’t need any other software.

Flash Filters Demonstrated

I’ve created a very small Flex app to demonstrate both of these techniques as well as give you something to look at. View Source is enabled so right + click and select view source to download the app and view the full source.

Other Resources

Categories: Actionscript, Design, Flex, Tutorials Tags: