PageRenderTime 53ms CodeModel.GetById 21ms RepoModel.GetById 1ms app.codeStats 0ms

/AODL/Document/Styles/Properties/ListLevelProperties.cs

https://bitbucket.org/chrisc/aodl
C# | 75 lines | 26 code | 8 blank | 41 comment | 0 complexity | 3f5e8329594c4cc5a08a5fc1330dacf8 MD5 | raw file
  1. /*************************************************************************
  2. *
  3. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER
  4. *
  5. * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
  6. *
  7. * Use is subject to license terms.
  8. *
  9. * Licensed under the Apache License, Version 2.0 (the "License"); you may not
  10. * use this file except in compliance with the License. You may obtain a copy
  11. * of the License at http://www.apache.org/licenses/LICENSE-2.0. You can also
  12. * obtain a copy of the License at http://odftoolkit.org/docs/license.txt
  13. *
  14. * Unless required by applicable law or agreed to in writing, software
  15. * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
  16. * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  17. *
  18. * See the License for the specific language governing permissions and
  19. * limitations under the License.
  20. *
  21. ************************************************************************/
  22. using System.Xml.Linq;
  23. namespace AODL.Document.Styles.Properties
  24. {
  25. /// <summary>
  26. /// Represent the properties of the list levels.
  27. /// </summary>
  28. public class ListLevelProperties : IProperty
  29. {
  30. /// <summary>
  31. /// Constructor create a new ListLevelProperties object.
  32. /// </summary>
  33. public ListLevelProperties(IStyle style)
  34. {
  35. Style = style;
  36. Node = new XElement(Ns.Style + "list-level-properties");
  37. }
  38. #region IProperty Member
  39. /// <summary>
  40. /// The XElement.
  41. /// </summary>
  42. public XElement Node { get; set; }
  43. /// <summary>
  44. /// The style to this ListLevelProperties object belongs.
  45. /// </summary>
  46. public IStyle Style { get; set; }
  47. #endregion
  48. /// <summary>
  49. /// Gets or sets the space before.
  50. /// </summary>
  51. /// <value>The space before.</value>
  52. public string SpaceBefore
  53. {
  54. get { return (string) Node.Attribute(Ns.Text + "space-before"); }
  55. set { Node.SetAttributeValue(Ns.Text + "space-before", value); }
  56. }
  57. /// <summary>
  58. /// Gets or sets the width of the min label.
  59. /// </summary>
  60. /// <value>The width of the min label.</value>
  61. public string MinLabelWidth
  62. {
  63. get { return (string) Node.Attribute(Ns.Text + "min-label-width"); }
  64. set { Node.SetAttributeValue(Ns.Text + "min-label-width", value); }
  65. }
  66. }
  67. }