Exemple #1
0
        public override void ReadExternal(IMemento memento, ExternalizeContext context)
        {
            base.ReadExternal(memento, context);

            _font                = (FontDescription)memento.ReadSerializable("Font");
            _fontColor           = (Color)memento.ReadSerializable("FontColor");
            _foreground          = (Color)memento.ReadSerializable("Foreground");
            _background          = (IBrushDescription)memento.ReadSerializable("Background");
            _isForegroundEnabled = memento.ReadBool("IsForegroundEnabled");
            _isBackgroundEnabled = memento.ReadBool("IsBackgroundEnabled");
            _borderWidth         = memento.ReadInt("BorderWidth");
            _borderDashStyle     = (DashStyle)memento.ReadSerializable("BorderDashStyle");
            _minSize             = (Size)memento.ReadSerializable("MinSize");
            _maxSize             = (Size)memento.ReadSerializable("MaxSize");
            _autoSize            = (AutoSizeKinds)memento.ReadSerializable("AutoSize");

            _padding = (Insets)memento.ReadSerializable("Padding");

            _selectionBorderColor = (Color)memento.ReadSerializable("SelectionBorderColor");
            _selectionBrush       = (IBrushDescription)memento.ReadSerializable("SelectionBrush");
            StyledText            = (StyledText)memento.ReadSerializable("StyledText");

            _text = memento.ReadString("Text");
            _textHorizontalAlignment =
                (DataType::HorizontalAlignment)memento.ReadSerializable("TextHorizontalAlignment");
            _textVerticalAlignment =
                (VerticalAlignment)memento.ReadSerializable("TextVerticalAlignment");
        }
        internal virtual void createFilenamePanel()
        {
            Container     contentPane   = this.getContentPane();
            GridBagLayout gridBagLayout = new GridBagLayout();

            contentPane.setLayout(gridBagLayout);
            this.filename = new JTextField(12);
            JLabel jlabel = new JLabel("Filename:");

            jlabel.setLabelFor(this.filename);
            Insets             insets             = new Insets(12, 12, 0, 0);
            GridBagConstraints gridBagConstraints = new GridBagConstraints(0, 0, 1, 1, (double)0f, (double)0f, 17, 0, insets, 0, 0);

            gridBagLayout.setConstraints(jlabel, gridBagConstraints);
            contentPane.add(jlabel);
            insets             = new Insets(12, 7, 0, 12);
            gridBagConstraints = new GridBagConstraints(1, 0, 1, 1, (double)1f, (double)1f, 17, 2, insets, 0, 0);
            gridBagLayout.setConstraints(this.filename, gridBagConstraints);
            contentPane.add(this.filename);
            JButton jbutton = new JButton("Save");

            jbutton.addActionListener(new FilenameDialog_2(this));
            insets             = new Insets(0, 12, 12, 12);
            gridBagConstraints = new GridBagConstraints(0, 2, 2, 1, (double)1f, (double)1f, 13, 0, insets, 0, 0);
            gridBagLayout.setConstraints(jbutton, gridBagConstraints);
            contentPane.add(jbutton);
            this.getRootPane().setDefaultButton(jbutton);
        }
Exemple #3
0
            public virtual Dimension minimumLayoutSize(Container param1Container)
            {
                Insets insets = param1Container.Insets;
                int    i      = 0;
                int    j      = 0;
                int    k      = outerInstance.BandGap;
                int    m      = outerInstance.TaskToggleButtonHeight;

                if (!outerInstance.UsingTitlePane)
                {
                    m += outerInstance.TaskbarHeight;
                }
                if (outerInstance.ribbon.TaskCount > 0)
                {
                    bool       @bool      = outerInstance.ribbon.Minimized;
                    RibbonTask ribbonTask = outerInstance.ribbon.SelectedTask;
                    foreach (AbstractRibbonBand abstractRibbonBand in ribbonTask.Bands)
                    {
                        int          n            = (abstractRibbonBand.MinimumSize).height;
                        Insets       insets1      = abstractRibbonBand.Insets;
                        RibbonBandUI ribbonBandUI = abstractRibbonBand.UI;
                        i += ribbonBandUI.PreferredCollapsedWidth;
                        if (!@bool)
                        {
                            j = Math.Max(j, n + insets1.top + insets1.bottom);
                        }
                    }
                    i += k * (ribbonTask.BandCount - 1);
                }
                else
                {
                    i = 50;
                }
                return(new Dimension(i, j + m + insets.top + insets.bottom));
            }
Exemple #4
0
            public virtual Dimension preferredLayoutSize(Container param1Container)
            {
                Insets insets = param1Container.Insets;
                int    i      = 0;
                bool   @bool  = outerInstance.ribbon.Minimized;

                if (!@bool && outerInstance.ribbon.TaskCount > 0)
                {
                    RibbonTask ribbonTask = outerInstance.ribbon.SelectedTask;
                    foreach (AbstractRibbonBand abstractRibbonBand in ribbonTask.Bands)
                    {
                        int    m       = (abstractRibbonBand.PreferredSize).height;
                        Insets insets1 = abstractRibbonBand.Insets;
                        i = Math.Max(i, m + insets1.top + insets1.bottom);
                    }
                }
                int j = outerInstance.TaskToggleButtonHeight;

                if (!outerInstance.UsingTitlePane)
                {
                    j += outerInstance.TaskbarHeight;
                }
                int k = i + j + insets.top + insets.bottom;

                return(new Dimension(param1Container.Width, k));
            }
Exemple #5
0
 // ========================================
 // constructor
 // ========================================
 public ListLayout(Insets padding, bool extendLast)
 {
     _padding         = padding;
     _extendLast      = extendLast;
     _itemSpace       = 0;
     _adjustItemWidth = true;
 }
        /// <summary>
        /// Constructor. </summary>
        /// <param name="annotationDataList"> list of annotation data, if available (can pass null and reset the list
        /// later by calling setAnnotationData()). </param>
        /// <param name="hideIfEmpty"> if true, set the panel to not visible if the list is empty - this may be appropriate
        /// if UI real estate is in short supply and annotations should only be shown if used </param>
        public StateMod_Network_AnnotationDataListJPanel(IList <StateMod_Network_AnnotationData> annotationDataList, StateMod_Network_JComponent networkJComponent, bool hideIfEmpty) : base()
        {
            // Set up the layout manager
            this.setLayout(new GridBagLayout());
            this.setBorder(BorderFactory.createTitledBorder("Annotations"));
            int    y          = 0;
            Insets insetsTLBR = new Insets(0, 0, 0, 0);

            __annotationJList = new JList();
            if (annotationDataList != null)
            {
                setAnnotationData(annotationDataList);
            }
            JGUIUtil.addComponent(this, new JScrollPane(__annotationJList), 0, y, 1, 1, 1.0, 1.0, insetsTLBR, GridBagConstraints.BOTH, GridBagConstraints.SOUTH);
            __hideIfEmpty       = hideIfEmpty;
            __networkJComponent = networkJComponent;

            // Add popup for actions on annotations

//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final javax.swing.JPopupMenu popupMenu = new javax.swing.JPopupMenu();
            JPopupMenu popupMenu = new JPopupMenu();
            JMenuItem  removeAllAnnotationsJMenuItem = new JMenuItem(__RemoveAllAnnotationsString);

            removeAllAnnotationsJMenuItem.addActionListener(this);
            popupMenu.add(removeAllAnnotationsJMenuItem);
            __annotationJList.addMouseListener(new MouseAdapterAnonymousInnerClass(this, popupMenu));

            checkVisibility();
        }
Exemple #7
0
            public override void paintComponent(Graphics g)
            {
                if (Memory.isAddressGood(outerInstance.startAddress))
                {
                    Insets insets   = Insets;
                    int    minWidth = System.Math.Min(outerInstance.imageWidth, outerInstance.bufferWidth);

                    g.Color = backgRoundColors[outerInstance.backgRoundColor];
                    g.fillRect(insets.left, insets.top, minWidth, outerInstance.imageHeight);

                    IMemoryReader imageReader = ImageReader.getImageReader(outerInstance.startAddress, outerInstance.imageWidth, outerInstance.imageHeight, outerInstance.bufferWidth, outerInstance.pixelFormat, outerInstance.imageSwizzle, outerInstance.clutAddress, outerInstance.clutFormat, outerInstance.clutNumberBlocks, outerInstance.clutStart, outerInstance.clutShift, outerInstance.clutMask, null, null);

                    for (int y = 0; y < outerInstance.imageHeight; y++)
                    {
                        for (int x = 0; x < minWidth; x++)
                        {
                            int colorABGR = imageReader.readNext();
                            int colorARGB = ImageReader.colorABGRtoARGB(colorABGR);
                            g.Color = new Color(colorARGB, outerInstance.useAlpha);

                            drawPixel(g, x + insets.left, y + insets.top);
                        }
                    }
                }
            }
        public BevelDividerBorder(int paramInt1, int paramInt2, Color paramColor1, Color paramColor2)
        {
            if (paramInt1 < 1 || paramInt1 > 4)
            {
                paramInt1 = 3;
            }
            this.location = paramInt1;
            this.slack    = paramInt2;
            this.light    = paramColor1;
            this.dark     = paramColor2;
            this.insets   = new Insets(0, 0, 0, 0);
            switch (paramInt1)
            {
            case 1:
                this.insets.top = 2;
                break;

            case 2:
                this.insets.left = 2;
                break;

            case 3:
                this.insets.bottom = 2;
                break;

            case 4:
                this.insets.right = 2;
                break;
            }
        }
Exemple #9
0
 public IBoxTexture LoadTexture(string texture, Insets border, Insets margin)
 {
     if (texture == null)
     {
         return(new BoxTexture(null, border, margin));
     }
     return(new BoxTexture(mgr.Load <Texture2D>(texture), border, margin));
 }
Exemple #10
0
 public IBoxTexture LoadTexture(string texture, Insets border, Insets margin)
 {
     if (texture == null)
     {
         return(parent.LoadTexture(null, border, margin));
     }
     return(parent.LoadTexture(Combine(ContextPath, texture), border, margin));
 }
 public virtual Insets getBorderInsets(Component param1Component, Insets param1Insets)
 {
     param1Insets.left   = 2 + this.padding.left;
     param1Insets.top    = 2 + this.padding.top;
     param1Insets.right  = 2 + this.padding.right;
     param1Insets.bottom = 2 + this.padding.bottom;
     return(param1Insets);
 }
 public TestUITexture(Rectangle bounds, Insets cornerArea, Insets margins, string name = null)
 {
     Bounds     = bounds;
     CornerArea = cornerArea;
     Margins    = margins;
     Name       = name;
     Texture    = null;
 }
Exemple #13
0
 public void actionPerformed(ActionEvent param1ActionEvent)
 {
     SwingUtilities.invokeLater(() =>
     {
         CostOSRibbonUI.null.this.this$0.scrollAndRevealTaskToggleButton(taskToggleButton);
         CostOSRibbonUI.null.this.this$0.ribbon.SelectedTask = task;
         if (CostOSRibbonUI.null.this.this$0.ribbon.Minimized)
         {
             if (true.Equals(CostOSRibbonUI.null.this.this$0.ribbon.getClientProperty("ribbon.internal.justMinimized")))
             {
                 CostOSRibbonUI.null.this.this$0.ribbon.putClientProperty("ribbon.internal.justMinimized", null);
                 return;
             }
             System.Collections.IList list = PopupPanelManager.defaultManager().ShownPath;
             if (list.size() > 0)
             {
                 foreach (PopupPanelManager.PopupInfo popupInfo in list)
                 {
                     if (popupInfo.PopupOriginator == taskToggleButton)
                     {
                         PopupPanelManager.defaultManager().hidePopups(null);
                         return;
                     }
                 }
             }
             PopupPanelManager.defaultManager().hidePopups(null);
             CostOSRibbonUI.null.this.this$0.ribbon.remove(CostOSRibbonUI.null.this.this$0.bandScrollablePanel);
             int i         = (((BasicRibbonUI.BandHostPanel) this.this$1.this$0.bandScrollablePanel.View).PreferredSize).height;
             Insets insets = CostOSRibbonUI.null.this.this$0.ribbon.Insets;
             i            += insets.top + insets.bottom;
             AbstractRibbonBand abstractRibbonBand = (CostOSRibbonUI.null.this.this$0.ribbon.SelectedTask.BandCount > 0) ? CostOSRibbonUI.null.this.this$0.ribbon.SelectedTask.getBand(0) : null;
             if (abstractRibbonBand != null)
             {
                 Insets insets1 = abstractRibbonBand.Insets;
                 i += insets1.top + insets1.bottom;
             }
             CostOSRibbonUI.OfficeBandHostPopupPanel officeBandHostPopupPanel = new CostOSRibbonUI.OfficeBandHostPopupPanel(CostOSRibbonUI.null.this.this$0.bandScrollablePanel, new Dimension(CostOSRibbonUI.null.this.this$0.ribbon.Width, i));
             int j = (this.this$1.this$0.ribbon.LocationOnScreen).x;
             int k = (this.this$1.this$0.ribbon.LocationOnScreen).y + CostOSRibbonUI.null.this.this$0.ribbon.Height;
             Rectangle rectangle = CostOSRibbonUI.null.this.this$0.ribbon.GraphicsConfiguration.Bounds;
             int m = (officeBandHostPopupPanel.PreferredSize).width;
             if (j + m > rectangle.x + rectangle.width)
             {
                 j = rectangle.x + rectangle.width - m;
             }
             int n = (officeBandHostPopupPanel.PreferredSize).height;
             if (k + n > rectangle.y + rectangle.height)
             {
                 k = rectangle.y + rectangle.height - n;
             }
             officeBandHostPopupPanel.PreferredSize = new Dimension(CostOSRibbonUI.null.this.this$0.ribbon.Width, i);
             Popup popup = PopupFactory.SharedInstance.getPopup(taskToggleButton, officeBandHostPopupPanel, j, k);
             PopupPanelManager.PopupListener popupListener = new PopupListenerAnonymousInnerClass(this);
             PopupPanelManager.defaultManager().addPopupListener(popupListener);
             PopupPanelManager.defaultManager().addPopup(taskToggleButton, popup, officeBandHostPopupPanel);
         }
     });
 }
 private static Insets GetNewPadding(Insets oldPadding, int delta)
 {
     return(new Insets(
                oldPadding.Left + (StyledTextConsts.IndentPaddingWidth * delta),
                oldPadding.Top,
                oldPadding.Right,
                oldPadding.Bottom
                ));
 }
Exemple #15
0
        private bool _showBlockBreak = false; /// transient

        // ========================================
        // constructor
        // ========================================
        public AbstractNode() : base()
        {
            _font                = SystemFontDescriptions.DefaultFont;
            _fontColor           = FigureConsts.WindowTextColor;
            _foreground          = FigureConsts.WindowTextColor;
            _background          = FigureConsts.WindowBrush;
            _isForegroundEnabled = true;
            _isBackgroundEnabled = true;
            _borderWidth         = 1;
            _borderDashStyle     = DashStyle.Solid;
            _minSize             = new Size(4, 4);
            _maxSize             = new Size(int.MaxValue, int.MaxValue);
            _autoSize            = AutoSizeKinds.None;

            _padding = new Insets(2);

            _text                    = string.Empty;
            _textSizeCache           = Size.Empty;
            _textHorizontalAlignment = DataType::HorizontalAlignment.Left;
            _textVerticalAlignment   = VerticalAlignment.Top;

            _styledText            = null;
            _selectionBorderColor  = FigureConsts.HighlightColor;
            _selectionBrush        = FigureConsts.HighlightBrush;
            _fontCache             = new FontCache();
            _updateStyledTextDepth = 0;

            _ResourceCache.RegisterResourceCreator(
                FontResourceKey,
                () => _font.CreateFont(),
                ResourceDisposingPolicy.Explicit
                );
            _ResourceCache.RegisterResourceCreator(
                PenResourceKey,
                () => {
                var ret       = new Pen(_foreground, _borderWidth);
                ret.DashStyle = _borderDashStyle;
                return(ret);
            },
                ResourceDisposingPolicy.Immediate
                );
            _ResourceCache.RegisterResourceCreator(
                BrushResourceKey,
                () => _background == null? null: _background.CreateBrush(Bounds),
                ResourceDisposingPolicy.Immediate
                );
            _ResourceCache.RegisterResourceCreator(
                SelectionPenResourceKey,
                () => new Pen(_selectionBorderColor),
                ResourceDisposingPolicy.Immediate
                );
            _ResourceCache.RegisterResourceCreator(
                SelectionBrushResourceKey,
                () => _selectionBrush.CreateBrush(Bounds),
                ResourceDisposingPolicy.Immediate
                );
        }
Exemple #16
0
        // ========================================
        // constructor
        // ========================================
        public FlowLayout(Insets padding, HorizontalAlignment hAlign, int hGap, int vGap)
        {
            _padding = padding;
            _hAlign  = hAlign;
            _hGap    = hGap;
            _vGap    = vGap;

            _adjustChildrenSize = false;
            _emptyPreferredSize = Size.Empty;
        }
        private Rectangle calculateViewportBounds(Point2D paramPoint2D)
        {
            Insets insets = Insets;
            int    i      = Width - insets.left - insets.right;
            int    j      = Height - insets.top - insets.bottom;
            double d1     = paramPoint2D.X - (i / 2);
            double d2     = paramPoint2D.Y - (j / 2);

            return(new Rectangle((int)d1, (int)d2, i, j));
        }
Exemple #18
0
            public virtual Dimension minimumLayoutSize(Container param1Container)
            {
                Insets insets = param1Container.Insets;
                AbstractBandControlPanel abstractBandControlPanel = outerInstance.ribbonBand.ControlPanel;
                bool @bool = (abstractBandControlPanel == null || !abstractBandControlPanel.Visible) ? 1 : 0;
                int  i     = @bool ? (this.this$0.collapsedButton.MinimumSize).width : (abstractBandControlPanel.MinimumSize).width;
                int  j     = @bool ? ((this.this$0.collapsedButton.MinimumSize).height + outerInstance.BandTitleHeight) : ((abstractBandControlPanel.MinimumSize).height + outerInstance.BandTitleHeight);

                return(new Dimension(i + 2 + (!@bool ? (insets.left + insets.right) : 0), j + insets.top + insets.bottom));
            }
        private static Insets GetNewPadding(Insets oldPadding, ListKind listKind, int listLevel)
        {
            var indent = listKind == ListKind.None ? listLevel : listLevel + 1;

            return(new Insets(
                       oldPadding.Left + (StyledTextConsts.IndentPaddingWidth * indent),
                       oldPadding.Top,
                       oldPadding.Right,
                       oldPadding.Bottom
                       ));
        }
Exemple #20
0
        public virtual void paint(Graphics paramGraphics, JComponent paramJComponent)
        {
            paintBackground(paramGraphics);
            Insets insets = paramJComponent.Insets;
            int    i      = TaskToggleButtonHeight;

            if (!UsingTitlePane)
            {
                i += TaskbarHeight;
            }
            paintTaskArea(paramGraphics, 0, insets.top + i - 1, paramJComponent.Width, paramJComponent.Height - i - insets.top);
        }
            public void layoutContainer(Container param1Container)
            {
                Insets insets = param1Container.Insets;
                int    i      = insets.top;

                for (sbyte b = 0; b < param1Container.ComponentCount; b++)
                {
                    Component component = param1Container.getComponent(b);
                    Dimension dimension = component.PreferredSize;
                    component.setBounds(insets.left, i, param1Container.Width - insets.left - insets.right, dimension.height);
                    i += dimension.height;
                }
            }
Exemple #22
0
            public virtual void layoutContainer(Container param1Container)
            {
                Insets insets = param1Container.Insets;
                int    i      = outerInstance.BandGap;
                int    j      = insets.left + 1 + outerInstance.applicationMenuButton.X + 32;

                foreach (Component component in outerInstance.ribbon.TaskbarComponents)
                {
                    int k = (component.PreferredSize).width;
                    component.setBounds(j, 2, k, param1Container.Height - insets.top - insets.bottom - 4);
                    j += k + i;
                }
            }
Exemple #23
0
            public virtual Dimension preferredLayoutSize(Container param1Container)
            {
                Insets insets = param1Container.Insets;
                int    i      = 0;
                int    j      = outerInstance.BandGap;

                foreach (Component component in outerInstance.ribbon.TaskbarComponents)
                {
                    i += (component.PreferredSize).width;
                    i += j;
                }
                return(new Dimension(i + insets.left + insets.right, outerInstance.TaskbarHeight));
            }
Exemple #24
0
        protected override Rectangle ArrangeOverride(Rectangle layoutSize)
        {
            lineNumberRenderer.Arrange(lineNumberRenderer.ArrangeChild(layoutSize.IncreaseRectBy(Padding)));

            if (DisplayLineNumbers)
            {
                var insets      = new Insets(0, Math.Max(0, lineNumberRenderer.LayoutRect.Width - Padding.Left), 0, 0);
                var contentSize = layoutSize.ReduceRectBy(insets);
                var retval      = base.ArrangeOverride(contentSize);
                return(retval.IncreaseRectBy(insets));
            }

            return(base.ArrangeOverride(layoutSize));
        }
							  public void componentMoved(ComponentEvent param2ComponentEvent)
							  {
								Rectangle rectangle1 = f.GraphicsConfiguration.Bounds;
								Insets insets = Toolkit.DefaultToolkit.getScreenInsets(f.GraphicsConfiguration);
								Rectangle rectangle2 = new Rectangle(insets.left, insets.top, rectangle1.width - insets.left + insets.right, rectangle1.height - insets.top + insets.bottom);
								if (insets.left == 0 && insets.right == 0 && insets.top == 0 && insets.bottom == 0)
								{
								  f.MaximizedBounds = null;
								}
								else
								{
								  f.MaximizedBounds = rectangle2;
								}
							  }
            public Dimension preferredLayoutSize(Container param1Container)
            {
                int i = 0;
                int j = 0;

                for (sbyte b = 0; b < param1Container.ComponentCount; b++)
                {
                    Dimension dimension = param1Container.getComponent(b).PreferredSize;
                    i += dimension.height;
                    j  = Math.Max(j, dimension.width);
                }
                Insets insets = param1Container.Insets;

                return(new Dimension(j + insets.left + insets.right, i + insets.top + insets.bottom));
            }
Exemple #27
0
 // ========================================
 // constructor
 // ========================================
 public SetParagraphPropertiesCommand(
     Paragraph target,
     Insets padding,
     int lineSpace,
     HorizontalAlignment horizontalAlignment,
     ParagraphKind paragraphKind,
     ListKind listKind,
     int indentLevel,
     ListStateKind listState
     )
 {
     _target              = target;
     _padding             = padding;
     _lineSpace           = lineSpace;
     _horizontalAlignment = horizontalAlignment;
     _paragraphKind       = paragraphKind;
     _listKind            = listKind;
     _indentLevel         = indentLevel;
     _listState           = listState;
 }
        // ========================================
        // method
        // ========================================
        public override void Execute()
        {
            var newPadding = _target.Padding;

            newPadding = new Insets(
                newPadding.Left - StyledTextConsts.IndentPaddingWidth,
                newPadding.Top,
                newPadding.Right,
                newPadding.Bottom
                );
            _command = new SetParagraphPropertiesCommand(
                _target,
                newPadding,
                _target.LineSpace,
                _target.HorizontalAlignment,
                _target.ParagraphKind,
                _target.ListKind,
                _target.ListLevel - 1
                );
            _command.Execute();
        }
Exemple #29
0
        // ========================================
        // method
        // ========================================
        public override void Execute()
        {
            _oldPadding             = _target.Padding;
            _oldLineSpace           = _target.LineSpace;
            _oldHorizontalAlignment = _target.HorizontalAlignment;
            _oldParagraphKind       = _target.ParagraphKind;
            _oldListKind            = _target.ListKind;
            _oldIndentLevel         = _target.ListLevel;
            _oldListState           = _target.ListState;

            if (_padding != _oldPadding)
            {
                _target.Padding = _padding;
            }
            if (_lineSpace != _oldLineSpace)
            {
                _target.LineSpace = _lineSpace;
            }
            if (_horizontalAlignment != _oldHorizontalAlignment)
            {
                _target.HorizontalAlignment = _horizontalAlignment;
            }
            if (_paragraphKind != _oldParagraphKind)
            {
                _target.ParagraphKind = _paragraphKind;
            }
            if (_listKind != _oldListKind)
            {
                _target.ListKind = _listKind;
            }
            if (_indentLevel != _oldIndentLevel)
            {
                _target.ListLevel = _indentLevel;
            }
            if (_listState != _oldListState)
            {
                _target.ListState = _listState;
            }
        }
        public virtual void paint(Graphics paramGraphics, JComponent paramJComponent)
        {
            if (CostOSRibbonUI.Instance.BackstageShowing)
            {
                Graphics2D graphics2D1 = (Graphics2D)paramGraphics.create();
                Rectangle  rectangle1  = new Rectangle(26, 13, 36, 36);
                paintButtonIcon(graphics2D1, rectangle1);
                graphics2D1.dispose();
                return;
            }
            Graphics2D graphics2D = (Graphics2D)paramGraphics.create();
            Insets     insets     = paramJComponent.Insets;
            Rectangle  rectangle  = new Rectangle(insets.left, insets.top, paramJComponent.Width - insets.left - insets.right, paramJComponent.Height - insets.top - insets.bottom);

            paintButtonBackground(graphics2D, rectangle);
            CommandButtonLayoutManager.CommandButtonLayoutInfo commandButtonLayoutInfo = this.layoutManager.getLayoutInfo(this.commandButton, paramGraphics);
            this.commandButton.putClientProperty("icon.bounds", commandButtonLayoutInfo.iconRect);
            rectangle = new Rectangle(10, 5, 16, 16);
            paintButtonIcon(graphics2D, rectangle);
            paramGraphics.Color = CostOSWindowsLookAndFeel.ribbonBorderColor;
            paramGraphics.drawLine(29, 6, 29, 20);
            graphics2D.dispose();
        }