title: Add a variable with getter and setter to an existing class
body: <p>I am trying to make a program using the <code>TreeView</code>, but I need<br>
  each object of type <code>TreeItem</code> to contain a boolean called <code>CanEdit</code><br>
  along with a setter of <code>setCanEdit()</code> and a getter of <code>getCanEdit()</code>,  </p>
  
  <p><strong>How would I add these things to <code>TreeItem</code>class?</strong></p>