private void resizeTo(Dimension newSize, boolean isLoading, boolean fireUndoEvent) {
		setPreferredSize(newSize);
		Dimension oldSize = getSize();
		if (oldSize.width == 0 || oldSize.height == 0)
			System.err.println("view size error");
		ancestor.setBounds(ancestor.getX(), ancestor.getY(), ancestor.getWidth() + newSize.width - oldSize.width, ancestor.getHeight() + newSize.height - oldSize.height);
		ancestor.validate();
		if (!getSize().equals(getPreferredSize())) {
			getModel().notifyModelListeners(new ModelEvent(getModel(), "Resize error", getSize(), getPreferredSize()));
		} else {
			if (!isLoading) {
				getModel().notifyPageComponentListeners(new PageComponentEvent(getModel(), PageComponentEvent.COMPONENT_RESIZED));
				if (fireUndoEvent) {
					getModel().getUndoManager().undoableEditHappened(new UndoableEditEvent(getModel(), new UndoableResizing(oldSize, newSize)));
					updateUndoUIComponents();
				}
			}
		}
	}