DITA Maps Manager Icons

Post here questions and problems related to oXygen frameworks/document types.
abhik
Posts: 17
Joined: Tue Sep 05, 2023 12:14 am

DITA Maps Manager Icons

Post by abhik »

Hi Team,
We are implementing custom panel for some references of ditamap. We want to keep the icons in custom panel consistent with icons used in DITA Maps Manager. I have checked Icons.class and it has lots of icons already defined.
How to get the particular icon used in DITA Maps Manager? (Given that I have AuthorNode object of a reference in ditamap)

Regards,
Abhi_K
Radu
Posts: 9059
Joined: Fri Jul 09, 2004 5:18 pm

Re: DITA Maps Manager Icons

Post by Radu »

Hi,
The constants from the Icons class that we use for icons in the DITA Maps Manager are these ones:

Code: Select all

  /**
   * Dita chapter ref tree node.
   */
  public static final String DITA_CHAPTER_REF =
    "/images/DitaChapterRef16.png";
  /**
   * Dita chapter ref tree node.
   */
  public static final String DITA_CHAPTER_REF_CLOSED =
    "/images/DitaClosedChapterRef16.png";
  /**
   * Dita appendix ref tree node.
   */
  public static final String DITA_APPENDIX_REF =
    "/images/DitaAppendixRef16.png";
  /**
   * Dita frontmatter ref tree node.
   */
  public static final String DITA_FRONTMATTER_REF =
    "/images/DitaFrontmatterRef16.png";
  /**
   * Dita backmatter ref tree node.
   */
  public static final String DITA_BACKMATTER_REF =
    "/images/DitaBackmatterRef16.png";
  /**
   * Dita Part ref tree node.
   */
  public static final String DITA_PART_REF =
    "/images/DitaPart16.png";
  /**
   * Dita Booklists ref tree node.
   */
  public static final String DITA_BOOKLISTS_REF =
    "/images/DitaBookLists16.png";
  /**
   * Dita tablelist ref tree node.
   */
  public static final String DITA_TABLELIST_REF =
    "/images/DitaTableList16.png";
  /**
   * Dita figurelist ref tree node.
   */
  public static final String DITA_FIGURELIST_REF =
    "/images/DitaFigureList16.png";
  /**
   * Dita glossarylist ref tree node.
   */
  public static final String DITA_GLOSSARYLIST_REF =
    "/images/DitaGlossaryList16.png";
  /**
   * Dita preface ref tree node.
   */
  public static final String DITA_PREFACE_REF =
    "/images/DitaPreface16.png";
  /**
   * Dita notices ref tree node.
   */
  public static final String DITA_NOTICES_REF =
    "/images/DitaNotices16.png";
  /**
   * Dita toc ref tree node.
   */
  public static final String DITA_TOC_REF =
    "/images/DitaToc16.png";
  /**
   * Dita indexlist ref tree node.
   */
  public static final String DITA_INDEXLIST_REF =
    "/images/DitaIndex16.png";

  /**
   * Dita Composite ref tree node.
   */
  public static final String DITA_COMPOSITE_REF =
    "/images/DitaCompositeRef16.png";
  /**
   * Dita Task ref tree node.
   */
  public static final String DITA_TASK_REF =
    "/images/DitaTaskRef16.png";
  /**
   * Dita topic ref tree node.
   */
  public static final String DITA_TOPIC_REF =
    "/images/DitaTopicRef16.png";
  /**
   * Dita keydef tree node.
   */
  public static final String DITA_KEYDEF =
    "/images/DitaKeydef16.png";
  /**
   * Dita keydef with keyword tree node.
   */
  public static final String DITA_KEYDEF_WITH_KEYWORD =
    "/images/DitaKeydefWithKeyword16.png";
  /**
   * Dita concept ref tree node.
   */
  public static final String DITA_CONCEPT_REF =
    "/images/DitaConceptRef16.png";
  /**
   * Dita reference ref tree node.
   */
  public static final String DITA_REFERENCE_REF =
    "/images/DitaReferenceRef16.png";
Other than that you can check if the AuthorNode you have is an AuthorElement, and if it is use the AuthorElement API to read the "class" attribute value for the node and decide on what icon to use:
https://www.oxygenxml.com/InstData/Edit ... ng.String-
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
abhik
Posts: 17
Joined: Tue Sep 05, 2023 12:14 am

Re: DITA Maps Manager Icons

Post by abhik »

Hi Radu,

Thank you for the response.

Actually this is exactly what I'm looking for. Given class attribute of node, I need to decide which icon to use.
I checked the icon list shared by you. There are lots of other icons which are being used in DITA Maps Manager. (like DITA_MAP_REF, DITA_MAP_DITAVALREF, TOPIC_HEAD_PROJECT, DITA_MAP_NAVREF etc)

Is there any public API which can help me to pick the exact icon for class attribute?
Can you please share the Oxygen logic to decide the icons?

Thanks & Regards,
Abhi_K
Radu
Posts: 9059
Joined: Fri Jul 09, 2004 5:18 pm

Re: DITA Maps Manager Icons

Post by Radu »

Hi Abhi_K,
s there any public API which can help me to pick the exact icon for class attribute?
Can you please share the Oxygen logic to decide the icons?
No, you should create your own logic. You can use the AuthorElement API to read the "class" attribute value for the node and decide based on that class attribute value what icon to display.
One more thing, when you have a topicref to a DITA concept for example:

Code: Select all

<topicref href="concept.xml"/>
The element is <topicref> but in order to decide if it refers to a DITA task/concept/topic our DITA Maps Manager attempts to parse the target "concept.xml" and extract from it the type of file and the title.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Post Reply