I have an abstract class extending Composite (AbstractWhiteBoard). Then I have a concrete class extending AbstractWhiteBoard. When I instantiate the concrete class and try to add it to the RootPanel, the program simply stops executing. There is no error or any output to direct me to a log file. I have no idea what is going wrong.
Here is my abstract class:
public abstract class AbstractWhiteBoard extends Composite {
/*
* FIELDS
*/
protected HorizontalPanel WhiteBoardWrapperPanel;
public AbstractWhiteBoard( ) {
WhiteBoardWrapperPanel = new HorizontalPanel();
WhiteBoardWrapperPanel.setStyleName("WhiteBoard-Wrapper");
initWidget(WhiteBoardWrapperPanel);
}
/*
* ABSTRACT PUBLIC METHODS
*/
abstract public void addNotecard( Notecard nc );
abstract public void addPostit( Postit postit );
/*
* ABSTRACT PROTECTED HELPER METHODS
*/
abstract protected void registerDragDropControllers();
}
And here is my concrete implementation class:
public class ConcreteWhiteBoard extends AbstractWhiteBoard {
/*
* CONTSTRUCTORS
*/
public ConcreteWhiteBoard() {
super();
}
/*
* PUBLIC METHOD OVERRIDES
*/
@Override
public void addNotecard(Notecard nc) {
// TODO Auto-generated method stub
}
@Override
public void addPostit(Postit postit) {
// TODO Auto-generated method stub
}
/*
* PRIVATE HELPER METHOD OVERRIDES
*/
@Override
protected void registerDragDropControllers() {
// TODO Auto-generated method stub
}
}
So, what is happening, is I have this code:
AbstractWhiteBoard wb = new ConcreteWhiteBoard();
RootPanel.get().add(wb);
Window.alert("wb added!");
But after I add wb to the RootPanel, execution stops. The alert statement never even gets called. There is no error and I don't see anything in the log.
Is there something wrong with having an abstract class that extends Composite? Or is it something entirely different that I am just not seeing? any help is greatly appreciated!
thisinside the last code snippet was a typo. It isn't actually there.