@Override
    public Dimension getPreferredSize()
    {
        Graphics g = getGraphics();
        FontMetrics fm = g.getFontMetrics();
        Dimension d;
        Insets insets = getInsets();
        int width = 0;
        int height = 0;
        int w;

        if (operationExpressionText != null)
            {
            d = operationNameText.getPreferredSize();
            w = d.width;
            if (w > width)
                {
                width = w;
                }
            height += d.height;

            width += fm.stringWidth(OperationMid);

            d = operationExpressionText.getPreferredSize();
            width += d.width;
            height += d.height;
            }
        else
            {
            /*
             * Operation Header
             */

            d = operationNameText.getPreferredSize();
            w = OperationName + OperationHeaderSpace + d.width + OperationHeaderSpace + OperationExtraLine;
            if (w > width)
                {
                width = w;
                }
            height += d.height + InterVMargin;

            /*
             * Delta List
             */
            if (deltaListView != null)
                {
                d = deltaListView.getPreferredSize();
                if ((d.width + OperationContentOffset) > width)
                    {
                    width = d.width + OperationContentOffset;
                    }
                height += d.height + InterVMargin;
                }

            /*
             * Declaration
             */

            if (declarationText != null)
                {
                d = declarationText.getPreferredSize();
                if ((d.width + OperationContentOffset) > width)
                    {
                    width = d.width + OperationContentOffset;
                    }
                height += d.height + InterVMargin;
                }

            /*
             * Predicates
             */

            if (predicateText != null)
                {
                height += OperationLineMargin;

                d = predicateText.getPreferredSize();
                if ((d.width + OperationContentOffset) > width)
                    {
                    width = d.width + OperationContentOffset;
                    }
                height += d.height + InterVMargin;
                }
            }

        width += insets.left + insets.right;
        height += insets.top + insets.bottom;

        width += HMargin * 2;
        height += VMargin * 2;

        return new Dimension(width, height);
    }