Wednesday, October 22, 2008

Java final keyword

Wikipedia has a great article on the subject so there is no need to re-state it:


The final keyword is especially important when you write a lot of asynchronous code (GWT), or write complex subclassing.

Thursday, October 16, 2008

GWT: Override StackPanel onBroswerEvent()

An inner class is a customized class that is used inside a java class. The main purpose of inner class is to use a generic method that may be problematic to use in the actual class. This is a useful concept when using when using onBrowserEvent(Event event) method for instance in google web toolkit because I could not initialize an event in the original java class. Below are the step t implement this:


- Create a private inner class StackPanelNav  that extends the container/super class StackPanel:


private class StackPanelNav extends StackPanel
    {
public StackPanelNav()
{
    super();
}

@Override
public void onBrowserEvent(Event event)
{
    super.onBrowserEvent(event);
    switch (this.getSelectedIndex())
    {
    case 0:
    {
        // Handle selected
    }
break;
}

Friday, October 10, 2008

GWT: Auto-saving a TextArea

    You can use this inner class:

 private class TextAreaAutoSave extends TextArea
 {
   public TextAreaAutoSave()
   {
    super();
   }

   @Override
   protected void onDetach()
   {
      if (saveButton != null)
     saveButton.click();
   }
 }

HTML: superScript


ChicagoMarathon Inc

Tuesday, October 7, 2008

HTML: adding bullets

To add an .html bullets, insert below code to get a circle bullets:
Circles:



  • First element
  • Second element
  • Third element


If you need square shaped bullets, insert below code:



  • First element
  • Second element
  • Third element


Source: http://www.w3schools.com/TAGS/tag_textarea.asp

Friday, October 3, 2008

Mac: changing default internet browser


To change your default internet browser in Mac, follow bellow steps:
1. Open your current internet browser.
2. Click on Safari menu -> Preferences -> General tab.
3. Select your preferred browser from the drop down as illustrated in the picture.